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

WordPress Trac noreply at wordpress.org
Sun Apr 12 21:50:37 UTC 2015


#26111: wp_localize_script array from callback for performance
------------------------------------+-----------------------------
 Reporter:  ciantic                 |       Owner:  wonderboymusic
     Type:  enhancement             |      Status:  reopened
 Priority:  high                    |   Milestone:  4.2
Component:  Script Loader           |     Version:  2.6
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:  performance
------------------------------------+-----------------------------

Comment (by SergeyBiryukov):

 How about making the 4th argument the actual callback, only used when the
 3rd argument is empty?
 {{{
 wp_localize_script( 'date_i18n', 'dateI18N', null, function() {
         ...
 });
 }}}

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


More information about the wp-trac mailing list