|Reported by:||bftrick||Owned by:|
It's never made any sense to me to call a function that makes data from a php file accessible to a js file localize script. The name localize script makes me think of passing language specific data to a script. That is a valid and useful use of that method but it is only one use. It is similar to calling a spoon a cereal delivery system.
If we can give it a better name then other developers will be better able to find it an use it instead of coming up with their own methods (like embedding JS in a php file; eek!).
If you do a Google search for "pass php variable to js in wordpress" you get a lot of: "I didn't know how to do this until someone told me about this function". Here's some of the confusion:
For backwards compatibility would could make the wp_localize_script function an alias of the new method.