Changeset 61981
- Timestamp:
- 03/12/2026 05:44:22 AM (2 months ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
src/wp-includes/default-filters.php (modified) (1 diff)
-
src/wp-includes/script-loader.php (modified) (1 diff)
-
tests/phpunit/tests/template.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/default-filters.php
r61943 r61981 608 608 add_action( 'enqueue_block_assets', 'wp_enqueue_registered_block_scripts_and_styles' ); 609 609 add_action( 'enqueue_block_assets', 'enqueue_block_styles_assets', 30 ); 610 add_action( ' init', 'wp_load_classic_theme_block_styles_on_demand', 8 ); // Must happen before register_core_block_style_handles() at priority 9.610 add_action( 'wp_default_styles', 'wp_load_classic_theme_block_styles_on_demand', 0 ); // Must happen before wp_default_styles() and register_core_block_style_handles(). 611 611 /* 612 612 * `wp_enqueue_registered_block_scripts_and_styles` is bound to both -
trunk/src/wp-includes/script-loader.php
r61945 r61981 3675 3675 * Adds hooks to load block styles on demand in classic themes. 3676 3676 * 3677 * This function must be called before {@see wp_default_styles()} and {@see register_core_block_style_handles()} so that 3678 * the filters are added to cause {@see wp_should_load_separate_core_block_assets()} to return true. 3679 * 3677 3680 * @since 6.9.0 3681 * @since 7.0.0 This is now invoked at the `wp_default_styles` action with priority 0 instead of at `init` with priority 8. 3678 3682 * 3679 3683 * @see _add_default_theme_supports() 3680 3684 */ 3681 function wp_load_classic_theme_block_styles_on_demand() {3685 function wp_load_classic_theme_block_styles_on_demand(): void { 3682 3686 // This is not relevant to block themes, as they are opted in to loading separate styles on demand via _add_default_theme_supports(). 3683 3687 if ( wp_is_block_theme() ) { -
trunk/tests/phpunit/tests/template.php
r61945 r61981 1964 1964 self::touch( ABSPATH . WPINC . '/js/wp-emoji-loader.js' ); 1965 1965 1966 if ( $set_up ) { 1967 $set_up(); 1968 } 1969 1966 1970 switch_theme( 'default' ); 1967 1971 global $wp_styles; … … 2001 2005 } 2002 2006 ); 2003 2004 if ( $set_up ) {2005 $set_up();2006 }2007 2007 2008 2008 wp_load_classic_theme_block_styles_on_demand();
Note: See TracChangeset
for help on using the changeset viewer.