diff --git a/wp-admin/edit-form-blocks.php b/wp-admin/edit-form-blocks.php index 8dc7da46f4..bc01ea11e4 100644 --- a/wp-admin/edit-form-blocks.php +++ b/wp-admin/edit-form-blocks.php @@ -197,11 +197,13 @@ if ( $editor_styles && current_theme_supports( 'editor-styles' ) ) { ); } } else { - $file = get_theme_file_path( $style ); - $styles[] = array( - 'css' => file_get_contents( get_theme_file_path( $style ) ), - 'baseURL' => get_theme_file_uri( $style ), - ); + $file = get_theme_file_path( $style ); + if ( file_exists( $file ) ) { + $styles[] = array( + 'css' => file_get_contents( $file ), + 'baseURL' => get_theme_file_uri( $style ), + ); + } } } } diff --git a/wp-includes/blocks.php b/wp-includes/blocks.php index e584dc377d..fe1cb685ee 100644 --- a/wp-includes/blocks.php +++ b/wp-includes/blocks.php @@ -283,7 +283,7 @@ function _restore_wpautop_hook( $content ) { * @since 5.0.0 * * @param string $content Content to test. - * @return int The block format version. + * @return int The block format version is 1 if the content contains one or more blocks, 0 otherwise. */ function block_version( $content ) { return has_blocks( $content ) ? 1 : 0; diff --git a/wp-includes/version.php b/wp-includes/version.php index 4889597fcb..256ce872a9 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.1-alpha-44269'; +$wp_version = '5.1-alpha-44270'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.