Localizes a script, but only if script has already been added. Can also be used to include arbitrary Javascript data in a page.

learn more… | top users | synonyms

1
vote
1answer
196 views

How to localize admin.php only once

I am creating a set of plugins that all use AJAX. Now localizing the admin.php in all the plugins seems to be a bit of an overkill. Is there a way to localize the script only once.\ Now I do not know ...
4
votes
1answer
780 views

Multiple wp_localize_script

Is it possible to localize a script more than once? I want to send two separate arrays of params. Or is it only possible to localize a script once, in which case, I'll have to combine the arrays? ...
0
votes
1answer
756 views

Does wp_localize_script call a Javascript Function or Simply Pass PHP Parameters to It

Easy question: I'm trying to understand wp_localize_script. Does wp_localize_script call a JavaScript function or does it simply pass PHP parameters to JavaScript? I want to pass PHP parameters to ...
0
votes
2answers
404 views

wp_enqueue_script calling jQuery at different times for different browsers?

This makes no sense, but in looking at my view source across browsers, wp_localize_script() is inserting tags as expected for all browsers other than IE7,8,9. The script tag is simply not there in ...
1
vote
1answer
122 views

Find out if enqueued script uses wp_localize_script?

Is there a function that can check if an enqueued script has a call to wp_localize_script attached to it?
2
votes
3answers
529 views

wp_localize_script $handle

Can anyone tell me what the "$handle" ( first parameter ) of wp_localize_script is normally used for. Thanks. P.s.: I have no idea why but stackexchange is telling me this question dosen't meet ...