mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Editor: Fix regression introduced with loading separate block assets
Related to [50836]. load-styles.php doesn't load the should_load_separate_core_block_assets function and that causes an error 500 - which in turn makes the dashboard appear unstyled. Props aristath. Fixes #53180. git-svn-id: https://develop.svn.wordpress.org/trunk@50837 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -952,26 +952,3 @@ function block_has_support( $block_type, $feature, $default = false ) {
|
||||
|
||||
return true === $block_support || is_array( $block_support );
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether separate assets should be loaded for core blocks.
|
||||
*
|
||||
* @since 5.8
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function should_load_separate_core_block_assets() {
|
||||
if ( is_admin() || is_feed() || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ) {
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* Determine if separate styles & scripts will be loaded for blocks on-render or not.
|
||||
*
|
||||
* @since 5.8.0
|
||||
*
|
||||
* @param bool $load_separate_styles Whether separate styles will be loaded or not.
|
||||
*
|
||||
* @return bool Whether separate styles will be loaded or not.
|
||||
*/
|
||||
return apply_filters( 'separate_core_block_assets', false );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user