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

WordPress Trac wp-trac at lists.automattic.com
Thu Dec 8 19:43:10 UTC 2011


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

Comment (by scribu):

 After a lengthy talk on IRC, some conclusions:

 {{{
 <koopersmith>to test: wp_add_script_before( 'utils', 'alert( !! jQuery );'
 );
 <koopersmith>with SCRIPT_DEBUG on, all works fine. with concat, you get an
 undefined error.
 }}}

 This is a fixable problem with the current {{{wp_add_script_before()}}}
 and a non-fixable problem with the proposed
 {{{wp_add_callback_before_script()}}}.

 Either way, to prevent plugins from shooting themselves in the foot with
 this, the consensus was that it's indeed better to remove
 wp_add_script_before() altogether, for now, at least.

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


More information about the wp-trac mailing list