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

WordPress Trac wp-trac at lists.automattic.com
Thu Sep 29 13:01:00 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 westi):

 Replying to [comment:71 scribu]:
 > > I'm still no happy or sure we need the underlying change here - we
 seem to have spent a chunk of time on fixing something that wasn't a bug
 and worked perfectly well.
 >
 > It's not a bug; it's an enhancement.
 >
 > > I think that people doing this [passing arrays/objects instead of
 strings] are writing bugs.
 >
 > Please provide an example where doing this would introduce a bug and
 also please provide the correct way of doing it.

 The function was for localisation not passible random data to scripts.

 If we wanted to introduce something separate for that we should have done
 but not overloaded the meaning of an existing process and changed how it
 was implemented for no real benefit for the intended usage.

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


More information about the wp-trac mailing list