Skip to content

Commit

Permalink
Move only required modules
Browse files Browse the repository at this point in the history
  • Loading branch information
cbravobernal committed Dec 27, 2023
1 parent 52553b2 commit f13a53a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/experimental/modules/class-gutenberg-modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,14 +263,14 @@ function gutenberg_dequeue_module( $module_identifier ) {
}

$modules_position = wp_is_block_theme() ? 'wp_head' : 'wp_footer';
// Prints the import map in the head tag.
// Prints the import map in the head tag in block themes. Otherwise in the footer.
add_action( $modules_position, array( 'Gutenberg_Modules', 'print_import_map' ) );

// Prints the enqueued modules in the head tag.
// Prints the enqueued modules in the head tag in block themes. Otherwise in the footer.
add_action( $modules_position, array( 'Gutenberg_Modules', 'print_enqueued_modules' ) );

// Prints the preloaded modules in the head tag.
add_action( $modules_position, array( 'Gutenberg_Modules', 'print_module_preloads' ) );
// Prints the preloaded modules in the head tag in block themes.
add_action( 'wp_head', array( 'Gutenberg_Modules', 'print_module_preloads' ) );

// Prints the script that loads the import map polyfill in the footer.
add_action( 'wp_footer', array( 'Gutenberg_Modules', 'print_import_map_polyfill' ), 11 );

0 comments on commit f13a53a

Please sign in to comment.