diff --git a/wp-includes/block-editor.php b/wp-includes/block-editor.php index c177d9619d..1c67e6cc7a 100644 --- a/wp-includes/block-editor.php +++ b/wp-includes/block-editor.php @@ -192,12 +192,17 @@ function get_default_block_editor_settings() { // These styles are used if the "no theme styles" options is triggered or on // themes without their own editor styles. $default_editor_styles_file = ABSPATH . WPINC . '/css/dist/block-editor/default-editor-styles.css'; - if ( file_exists( $default_editor_styles_file ) ) { + + static $default_editor_styles_file_contents = false; + if ( ! $default_editor_styles_file_contents && file_exists( $default_editor_styles_file ) ) { + $default_editor_styles_file_contents = file_get_contents( $default_editor_styles_file ); + } + + $default_editor_styles = array(); + if ( $default_editor_styles_file_contents ) { $default_editor_styles = array( - array( 'css' => file_get_contents( $default_editor_styles_file ) ), + array( 'css' => $default_editor_styles_file_contents ), ); - } else { - $default_editor_styles = array(); } $editor_settings = array( diff --git a/wp-includes/version.php b/wp-includes/version.php index a7b696c36e..bd988c90e7 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-beta1-54290'; +$wp_version = '6.1-beta1-54291'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.