[wp-hackers] congratulations on wp_localize_script

Leo germani leogermani at gmail.com
Tue Mar 13 22:08:17 UTC 2012


Hi,

I just wanted to congratulate whoever was responsible for the recent
changes on wp_localize_script function.

This is the kind of improvement few people talk about, and I bet many
people are wondering what the hell happened:

wp_localize_script used to send all variables as javascript strings. And if
you tried to send an array, you would get an string "array" on the
javascript side.

Now you can pass strings, integers, booleans, arrays, arrays with keys,
multi dimensional arrays, etc. and you will get just the same thing on your
javascript. This is beautiful.

I wanted to let you know I noticed it! And Im very happy with it!

Thank you very much

Leo,,

-- 
leogermani.com.br


More information about the wp-hackers mailing list