[wp-trac] [WordPress Trac] #11520: print_scripts_l10n() should use json_encode()

WordPress Trac wp-trac at lists.automattic.com
Thu Sep 29 14:44:01 UTC 2011


#11520: print_scripts_l10n() should use json_encode()
-------------------------+------------------------
 Reporter:  scribu       |       Owner:  azaozz
     Type:  enhancement  |      Status:  reviewing
 Priority:  normal       |   Milestone:  3.3
Component:  JavaScript   |     Version:
 Severity:  critical     |  Resolution:
 Keywords:               |
-------------------------+------------------------

Comment (by scribu):

 This was already discussed. In summary:

 * The difference between localization strings and other data is
 artificial. JavaScript doesn't have special constructs for localization.
 Therefore, there should be a single function.
 * wp_localize_script() was renamed to wp_add_script_data() to reflect it's
 broader purpose, but it was reverted, since it was argued that it's not
 worth the work that plugin developers would have to do.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11520#comment:73>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list