Make WordPress Core

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: samueljseay's profile samueljseay Owned by: samueljseay's profile samueljseay
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`.

#3 @jonsurrell
6 weeks ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.