[wp-trac] [WordPress Trac] #26111: wp_localize_script array from callback for performance

WordPress Trac noreply at wordpress.org
Fri Jan 24 05:28:36 UTC 2014


#26111: wp_localize_script array from callback for performance
---------------------------+------------------------------
 Reporter:  ciantic        |       Owner:
     Type:  enhancement    |      Status:  new
 Priority:  low            |   Milestone:  Awaiting Review
Component:  Script Loader  |     Version:  2.6
 Severity:  normal         |  Resolution:
 Keywords:  close          |     Focuses:  performance
---------------------------+------------------------------
Changes (by nacin):

 * priority:  normal => low
 * focuses:   => performance
 * component:  Performance => Script Loader


Comment:

 I've wanted to move this (and post type labels) to a closure for a while.
 We still support PHP 5.2, though. I wouldn't mind adding it so others can
 benefit from it in their own environments, though it's not much of a
 priority as it's more than 50% of all WordPress sites.

 I'd be happy to consider a patch. I don't think a new parameter is needed.
 One would only need to check if the passed parameter is an array or a
 closure, and than handle that internal to WP_Scripts somehow.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/26111#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list