Changeset 60999 for trunk/src/wp-includes/script-modules.php
- Timestamp:
- 10/21/2025 12:43:51 AM (3 months ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/script-modules.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/script-modules.php
r60931 r60999 65 65 * Optional. An array of additional args. Default empty array. 66 66 * 67 * @type bool $in_footer Whether to print the script module in the footer. Only relevant to block themes. Default 'false'. Optional. 67 68 * @type 'auto'|'low'|'high' $fetchpriority Fetch priority. Default 'auto'. Optional. 68 69 * } … … 108 109 * Optional. An array of additional args. Default empty array. 109 110 * 111 * @type bool $in_footer Whether to print the script module in the footer. Only relevant to block themes. Default 'false'. Optional. 110 112 * @type 'auto'|'low'|'high' $fetchpriority Fetch priority. Default 'auto'. Optional. 111 113 * } … … 184 186 /* 185 187 * The Interactivity API is designed with server-side rendering as its primary goal, so all of its script modules 186 * should be loaded with low fetchpriority since they should not be needed in the critical rendering path.187 * Also, the @wordpress/a11y script module is intended to be used as a dynamic import dependency, in which case188 * the fetchpriority is irrelevant. See <https://make.wordpress.org/core/2024/10/14/updates-to-script-modules-in-6-7/>.188 * should be loaded with low fetchpriority and printed in the footer since they should not be needed in the 189 * critical rendering path. Also, the @wordpress/a11y script module is intended to be used as a dynamic import 190 * dependency, in which case the fetchpriority is irrelevant. See <https://make.wordpress.org/core/2024/10/14/updates-to-script-modules-in-6-7/>. 189 191 * However, in case it is added as a static import dependency, the fetchpriority is explicitly set to be 'low' 190 192 * since the module should not be involved in the critical rendering path, and if it is, its fetchpriority will … … 198 200 ) { 199 201 $args['fetchpriority'] = 'low'; 202 $args['in_footer'] = true; 200 203 } 201 204
Note: See TracChangeset
for help on using the changeset viewer.