[wp-trac] [WordPress Trac] #11520: print_scripts_l10n() should use json_encode()
WordPress Trac
wp-trac at lists.automattic.com
Sat Dec 19 22:48:11 UTC 2009
#11520: print_scripts_l10n() should use json_encode()
-------------------------+--------------------------------------------------
Reporter: scribu | Owner: azaozz
Type: enhancement | Status: new
Priority: normal | Milestone: 3.0
Component: JavaScript | Version:
Severity: normal | Keywords: has-patch
-------------------------+--------------------------------------------------
Two things make me think this is a good ideea:
1. json_encode() is already supported by WP 2.9 (see
[http://core.trac.wordpress.org/browser/branches/2.9/wp-
includes/compat.php#L126 here])
2. In practice, wp_localize_script() is used for passing arbitrary data to
JS. Currently, you can only pass strings.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11520>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list