Opened 2 years ago
Closed 2 years ago
#60742 closed defect (bug) (fixed)
Script Modules: Module src not filterable.
| Reported by: | dd32 | Owned by: | swissspidy |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.5 |
| Component: | Script Loader | Version: | 6.5 |
| Severity: | normal | Keywords: | has-patch commit dev-reviewed fixed-major |
| Cc: | Focuses: |
Description
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 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.
Change History (8)
This ticket was mentioned in PR #6243 on WordPress/wordpress-develop by @dd32.
2 years ago
#1
- Keywords has-patch added
@swissspidy commented on PR #6243:
2 years ago
#6
Committed in https://core.trac.wordpress.org/changeset/57840
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Trac ticket: https://core.trac.wordpress.org/ticket/60742
See https://github.com/WordPress/wporg-mu-plugins/issues/587