You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -1489,93 +1489,121 @@ public function data_wp_hoist_late_printed_styles(): array {
1489
1489
'wp-emoji-styles-inline-css',
1490
1490
'wp-block-library-inline-css',
1491
1491
'wp-block-separator-inline-css',
1492
+
'wp-block-separator-theme-inline-css',
1492
1493
'global-styles-inline-css',
1493
1494
'core-block-supports-inline-css',
1494
1495
'classic-theme-styles-inline-css',
1495
1496
'normal-css',
1496
1497
'normal-inline-css',
1497
1498
'wp-custom-css',
1498
-
1499
-
// TODO: This is unexpected. Just because something is enqueued late shouldn't necessitate that it be inserted right after wp-block-library and before a normal style enqueued at wp_enqueue_scripts.
1500
1499
'late-css',
1501
1500
'late-inline-css',
1502
1501
);
1503
1502
1504
1503
returnarray(
1505
1504
// TODO: Add test case for embed template.
1506
-
'standard_classic_theme_config' => array(
1507
-
'set_up' => null,
1508
-
'theme_supports' => $theme_supports,
1509
-
'expected' => $expected_head_styles,
1505
+
'standard_classic_theme_config' => array(
1506
+
'set_up' => null,
1507
+
'theme_supports' => $theme_supports,
1508
+
'expected_head' => $expected_head_styles,
1509
+
'expected_footer' => array(),
1510
1510
),
1511
-
'wp_block_styles_not_supported' => array(
1512
-
'set_up' => null,
1513
-
'theme_supports' => array(),
1514
-
// The following excludes 'wp-block-separator-inline-css' from $expected_head_styles.
register_core_block_types_from_metadata();// See register_block_type_from_metadata().
1620
1648
1621
1649
$this->assertFalse( wp_is_block_theme(), 'Test is only relevant to block themes.' );
1622
1650
@@ -1633,7 +1661,10 @@ static function () {
1633
1661
}
1634
1662
);
1635
1663
1636
-
wp_hoist_late_printed_styles();
1664
+
// Call wp_hoist_late_printed_styles() if wp_load_classic_theme_block_styles_on_demand() queued it up.
1665
+
if ( has_action( 'wp_template_enhancement_output_buffer_started', 'wp_hoist_late_printed_styles' ) ) {
1666
+
wp_hoist_late_printed_styles();
1667
+
}
1637
1668
1638
1669
// Ensure late styles are printed.
1639
1670
$this->assertTrue( apply_filters( 'print_late_styles', true ), 'Expected late style printing to be forced.' );
@@ -1681,15 +1712,16 @@ static function () {
1681
1712
}
1682
1713
}
1683
1714
1684
-
foreach ( $expectedas$style_id ) {
1685
-
$this->assertContains( $style_id, $found_styles['HEAD'], 'Expected stylesheet with ID to be in the HEAD among this snapshot: ' . self::get_array_snapshot_export( $found_styles['HEAD'] ) );
0 commit comments