Make WordPress Core

Opened 10 months ago

Closed 8 months ago

#64111 closed enhancement (worksforme)

Add `wp_script_module_attributes` filter to `print_enqueued_script_modules` to allow modifying script attributes

Reported by: samueljseay Owned by: samueljseay
Priority: normal Milestone:
Component: General Version:
Severity: normal Keywords: has-patch has-unit-tests
Cc: Focuses:

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.


10 months ago
#1

  • Keywords has-patch has-unit-tests added

@luisherranz commented on PR #10324:


10 months ago
#2

Closing as the attributes of the script modules can already be filtered using `wp_script_attributes`.

#3 @jonsurrell
8 months ago

  • Milestone Awaiting Review
  • Resolutionworksforme
  • Status assignedclosed
Note: See TracTickets for help on using tickets.