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

WordPress Trac wp-trac at lists.automattic.com
Mon Jul 25 17:06:50 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:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+------------------------

Comment (by azaozz):

 Replying to [comment:26 westi]:
 > The function name was better and we didn't need to do it - can't we keep
 the old function name and just do the switch to json here?

 We could but IMHO wp_localize_script() doesn't sound right for a function
 that can pass any data from PHP to JS.

 > With this new code can we do away with the l10n.js file now too?

 It's gone.

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


More information about the wp-trac mailing list