1
vote
1answer
123 views

Path to image in js with wp_localize_script [closed]

I'm trying to implement animated svg icons into my Wordpress theme. All's is great, except I can't figure out how to put proper url for svg images in this js file: var svgIconConfig = { plus : { ...
0
votes
1answer
463 views

Problem passing id-specific objects to javascript via wp_localize_script

I'm using wp_localize_script to pass multiple arrays of data into a javascript file. To differentiate between the different arrays (and prevent overwriting), they are labelled relative to the post id ...
0
votes
1answer
315 views

in jquery read a multidimensional array via wp_localize_script()

From PHP I am pushing a basic array to jQuery via wp_localize_script() and then using the array data in my script file. Now I have extended the array into a multidimensional array and can not figure ...
3
votes
1answer
142 views

How to intercept already localized scripts

If a plugin uses some script (prominent example: jQuery UI Datepicker), but you're not happy with how the script renders the output, then there're two possibilities: 1. Unregister the script > Add ...
0
votes
1answer
161 views

Localizing methods for jQuery append prepend wrap parent

So I am serializing some options in WordPress and then localizing them to be used in my jQuery script, however what I am trying to do next isn't working. jQuery('.advert')+ lu_ban_object.method ...
0
votes
1answer
677 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 ...
2
votes
3answers
496 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 ...