Interesting this produces a truthy or falsy string
<?php
wp_localize_script( 'pwcc-functions', 'pwccConfig', array(
'isSingle' => is_single(),
) );
but this is all lovely and boolean.
<?php
wp_localize_script( 'pwcc-functions', 'pwccConfig', array(
'is' => array(
'single' => is_single(),
)
) );
It’s an abuse of the localisation function so I can see why it expects a string.
Coincidently, a related trac ticket was opened a few hours after this post.
@pwcc related: core.trac.wordpress.org/ticket/25280, core.trac.wordpress.org/ticket/29722
@roundearth That’s some history, the difference between PHP versions is a fun ingredient :)
@pwcc fun!