Timeline for Can't seem to get wp_localize_script to work
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 16, 2013 at 1:12 | comment | added | s_ha_dum |
You have to tie it to a script. Not especially found of it but that is how wp_localize_script works.
|
|
Dec 16, 2013 at 0:47 | comment | added | INT | @s_ha_dum Tried your code but it doesn't seem to be working. I want to add some PHP vars to be used with JS without tying it to a specific script.. And nothing gets printed by your suggestion. Hm. | |
Mar 24, 2013 at 20:08 | comment | added | jackreichert | I had an unnecessary condition around my enqueue_script. Thanks for the help. | |
Mar 24, 2013 at 20:07 | vote | accept | jackreichert | ||
Mar 24, 2013 at 19:33 | history | answered | s_ha_dum | CC BY-SA 3.0 |