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

WordPress Trac wp-trac at lists.automattic.com
Fri Apr 1 23:24:00 UTC 2011


#11520: print_scripts_l10n() should use json_encode()
------------------------------+---------------------
 Reporter:  scribu            |       Owner:  azaozz
     Type:  enhancement       |      Status:  new
 Priority:  normal            |   Milestone:  3.2
Component:  JavaScript        |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |
------------------------------+---------------------
Changes (by scribu):

 * keywords:  has-patch => has-patch commit
 * milestone:  Future Release => 3.2


Comment:

 PHP JSON support is covered (PHP 5)

 Browser JSON support doesn't even come into question: we're just
 generating an inline script tag.

 As an additional bonus, if we use JSON, we can ditch convertEntities(),
 which is a very ugly hack.

 I think it's better if we move in small, manageable steps:

 * take care of wp_localize_script() in WP 3.2
 * think about a more general API later (if it's even needed)

 Patch still applies cleanly

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


More information about the wp-trac mailing list