[wp-hackers] Creating alias for wp_localize_script()

Lutz Schröer latz at elektroelch.de
Tue Jul 26 10:33:27 UTC 2011


There are dozens of blog posts and tutorials about how to pass values 
to JavaScript scripts and they all tell you to use wp_localize_script().

In my mind the these tutorials weren't necessary if there would be a 
core function called "wp_pass_params_to_script()" or something like 
this. This function only needs to be an alias for wp_localize_script() 
but it would make the code much clearer and save the time of many 
developers searching for the correct function.

Latz


More information about the wp-hackers mailing list