From c2a7d2a773fcb9742354528305b423dd90ba98eb Mon Sep 17 00:00:00 2001 From: desrosj Date: Mon, 8 Nov 2021 15:27:59 +0000 Subject: [PATCH] Themes: Remove temporary Full Site Editing safety checks. These checks were added in [51193] and [51197] as a temporary measure to prevent a site owner from activating a Full Site Editing theme when Gutenberg plugin was not active. Because Core only had partial support for the features required for FSE, the front end of the site would display a white screen or error message to visitors. Unless the site owner visited the front end, there would be no indication that there was a problem. Since 5.9 will include the remaining features required for FSE, these checks can be removed. Props poena, jffng. Fixes #54366. See #534190. Built from https://develop.svn.wordpress.org/trunk@52044 git-svn-id: http://core.svn.wordpress.org/trunk@51636 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/customize.php | 10 +--------- wp-includes/theme.php | 14 -------------- wp-includes/version.php | 2 +- 3 files changed, 2 insertions(+), 24 deletions(-) diff --git a/wp-admin/customize.php b/wp-admin/customize.php index 0dd548d43a..7d4fb9fd99 100644 --- a/wp-admin/customize.php +++ b/wp-admin/customize.php @@ -188,16 +188,8 @@ do_action( 'customize_controls_head' ); theme()->get( 'RequiresWP' ) ); $compatible_php = is_php_version_compatible( $wp_customize->theme()->get( 'RequiresPHP' ) ); - $fse_safe = true; - - // Check if the theme requires the Gutenberg plugin to work correctly. - $theme_tags = $wp_customize->theme()->get( 'Tags' ); - - if ( ! empty( $theme_tags ) && in_array( 'full-site-editing', $theme_tags, true ) && ! function_exists( 'gutenberg_is_fse_theme' ) ) { - $fse_safe = false; - } ?> - + is_theme_active() ? __( 'Publish' ) : __( 'Activate & Publish' ); ?>
diff --git a/wp-includes/theme.php b/wp-includes/theme.php index a7bc431c37..7d17540142 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -908,20 +908,6 @@ function validate_current_theme() { function validate_theme_requirements( $stylesheet ) { $theme = wp_get_theme( $stylesheet ); - // If the theme is a Full Site Editing theme, check for the presence of the Gutenberg plugin. - $theme_tags = $theme->get( 'Tags' ); - - if ( ! empty( $theme_tags ) && in_array( 'full-site-editing', $theme_tags, true ) && ! function_exists( 'gutenberg_is_fse_theme' ) ) { - return new WP_Error( - 'theme_requires_gutenberg_plugin', - sprintf( - /* translators: %s: Theme name. */ - _x( 'Error: This theme (%s) uses Full Site Editing, which requires the Gutenberg plugin to be activated.', 'theme' ), - $theme->display( 'Name' ) - ) - ); - } - $requirements = array( 'requires' => ! empty( $theme->get( 'RequiresWP' ) ) ? $theme->get( 'RequiresWP' ) : '', 'requires_php' => ! empty( $theme->get( 'RequiresPHP' ) ) ? $theme->get( 'RequiresPHP' ) : '', diff --git a/wp-includes/version.php b/wp-includes/version.php index 74b04f3d94..f3aa4fe38e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-52043'; +$wp_version = '5.9-alpha-52044'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.