[wp-trac] [WordPress Trac] #60742: Script Modules: Module src not filterable.
WordPress Trac
noreply at wordpress.org
Mon Mar 11 03:35:43 UTC 2024
#60742: Script Modules: Module src not filterable.
---------------------------+-----------------------------
Reporter: dd32 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Script Loader | Version: trunk
Severity: normal | Keywords:
Focuses: |
---------------------------+-----------------------------
The new Script Modules feature doesn't allow the URL being imported to be
filtered, this means that it's not possible for plugins to either filter
it to load from a CDN, or add/alter params (Such as we do on
[https://github.com/WordPress/wporg-mu-plugins/issues/587 WordPress.org
for cache issues]).
At a minimum `WP_Script_Modules::get_versioned_src()` should have a
filter, ideally it could re-use the `script_loader_src` filter for maximum
compatibility with existing script-related filters, but it could use
something specific like `script_module_src` if required for some reason.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60742>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list