Skip to content

Commit bf733b2

Browse files
Make note that in_footer only applies to block themes
Co-authored-by: Peter Wilson <[email protected]>
1 parent 4fc5e27 commit bf733b2

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/wp-includes/class-wp-script-modules.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class WP_Script_Modules {
104104
* @param array $args {
105105
* Optional. An array of additional args. Default empty array.
106106
*
107-
* @type bool $in_footer Whether to print the script module in the footer. Default 'false'. Optional.
107+
* @type bool $in_footer Whether to print the script module in the footer. Only relevant to block themes. Default 'false'. Optional.
108108
* @type 'auto'|'low'|'high' $fetchpriority Fetch priority. Default 'auto'. Optional.
109109
* }
110110
*/
@@ -224,6 +224,8 @@ public function set_fetchpriority( string $id, string $priority ): bool {
224224
/**
225225
* Sets whether a script module should be printed in the footer.
226226
*
227+
* This is only relevant in block themes.
228+
*
227229
* @since 6.9.0
228230
*
229231
* @param string $id Script module identifier.
@@ -274,7 +276,7 @@ public function set_in_footer( string $id, bool $in_footer ): bool {
274276
* @param array $args {
275277
* Optional. An array of additional args. Default empty array.
276278
*
277-
* @type bool $in_footer Whether to print the script module in the footer. Default 'false'. Optional.
279+
* @type bool $in_footer Whether to print the script module in the footer. Only relevant to block themes. Default 'false'. Optional.
278280
* @type 'auto'|'low'|'high' $fetchpriority Fetch priority. Default 'auto'. Optional.
279281
* }
280282
*/
@@ -383,6 +385,8 @@ private function get_highest_fetchpriority( array $ids ): string {
383385
/**
384386
* Prints the enqueued script modules in head.
385387
*
388+
* This is only used in block themes.
389+
*
386390
* @since 6.9.0
387391
*/
388392
public function print_head_enqueued_script_modules() {

src/wp-includes/script-modules.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function wp_script_modules(): WP_Script_Modules {
6464
* @param array $args {
6565
* Optional. An array of additional args. Default empty array.
6666
*
67-
* @type bool $in_footer Whether to print the script module in the footer. Default 'false'. Optional.
67+
* @type bool $in_footer Whether to print the script module in the footer. Only relevant to block themes. Default 'false'. Optional.
6868
* @type 'auto'|'low'|'high' $fetchpriority Fetch priority. Default 'auto'. Optional.
6969
* }
7070
*/
@@ -108,7 +108,7 @@ function wp_register_script_module( string $id, string $src, array $deps = array
108108
* @param array $args {
109109
* Optional. An array of additional args. Default empty array.
110110
*
111-
* @type bool $in_footer Whether to print the script module in the footer. Default 'false'. Optional.
111+
* @type bool $in_footer Whether to print the script module in the footer. Only relevant to block themes. Default 'false'. Optional.
112112
* @type 'auto'|'low'|'high' $fetchpriority Fetch priority. Default 'auto'. Optional.
113113
* }
114114
*/

0 commit comments

Comments
 (0)