Opened 3 months ago
Closed 6 weeks ago
#64111 closed enhancement (worksforme)
Add `wp_script_module_attributes` filter to `print_enqueued_script_modules` to allow modifying script attributes
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | |
| Component: | General | Keywords: | has-patch has-unit-tests |
| Focuses: | Cc: |
Description
In https://github.com/WordPress/gutenberg/issues/70873 we find the need to selectively pre-load script modules for client side navigation with interactivity API's router to ensure that we don't load modules that are not needed.
To that end we will add a filter called wp_script_module_attributes in print_enqueued_script_modules to allow the augmenting of script attributes before printing them.
Change History (3)
This ticket was mentioned in PR #10324 on WordPress/wordpress-develop by @samueljseay.
3 months ago
#1
- Keywords has-patch has-unit-tests added
@luisherranz commented on PR #10324:
3 months ago
#2
Closing as the attributes of the script modules can already be filtered using `wp_script_attributes`.
Note: See
TracTickets for help on using
tickets.
Trac ticket: https://core.trac.wordpress.org/ticket/64111