[wp-trac] [WordPress Trac] #26111: wp_localize_script array from callback for performance
WordPress Trac
noreply at wordpress.org
Mon Apr 13 15:49:22 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 revert | Focuses: performance
-------------------------------------------+-----------------------------
Comment (by azaozz):
Replying to [comment:24 DrewAPicture]:
Think so too. The changes here made localizing a script quite more complex
and unfriendly. I don't see a point is adding them at all.
The only enhancement is that a closure could be used to supply the array
of translated strings. Unfortunately we still support PHP 5.2 so closures
are out of the question. There might be a minor speed up from not
translating 60-70 strings, but it's probably offset by calling functions
few times, using `is_callable()`, etc.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/26111#comment:25>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list