Opened 6 years ago
Last modified 6 years ago
#43781 new enhancement
adding apply_filters on $handle in localize
Reported by: | DuckDagobert | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 4.9.5 |
Component: | Script Loader | Keywords: | |
Focuses: | Cc: |
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.
Hello @DuckDagobert ,
I'm quiet new in Core Contrib :-/
Hope my patch can help