Opened 8 years ago
Last modified 8 years ago
#43781 new enhancement
adding apply_filters on $handle in localize
| Reported by: | DuckDagobert | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Script Loader | Version: | 4.9.5 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
in functions.wp-scripts.php we have:
return $wp_scripts->localize( $handle, $object_name, $l10n );
it would be nice to have an apply_filters on the $handle (with object_name as an argument optionally), since it would make overwriting it e.g. for a global concat minified file much easier & faster.
(bc now I have to get the scripts, then loop over it, localize the group,...) while I could do the whole thing with an apply_filters within 1 line.
Attachments (1)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hello @DuckDagobert ,
I'm quiet new in Core Contrib :-/
Hope my patch can help