$actual_css =
wp_get_global_stylesheet( array
( $block_classes['css'
] ) );
if ( '' !==
$actual_css ) { $block_classes['css'
] =
$actual_css;
$global_styles[] =
$block_classes;
} /*
* Add the custom CSS as a separate stylesheet so any invalid CSS
* entered by users does not break other global styles.
*/
$global_styles[] = array
( 'css' =>
wp_get_global_styles_custom_css(),
'__unstableType' => 'user',
'isGlobalStyles' => true,
);
} else { // If there is no `theme.json` file, ensure base layout styles are still available.
$block_classes = array
( 'css' => 'base-layout-styles',
'__unstableType' => 'base-layout',
'isGlobalStyles' => true,
);
$actual_css =
wp_get_global_stylesheet( array
( $block_classes['css'
] ) );