diff --git a/src/wp-admin/customize.php b/src/wp-admin/customize.php
index f2eb07e9b5..fdbc7f7b9e 100644
|
a
|
b
|
do_action( 'customize_controls_head' ); |
| 184 | 184 | <?php |
| 185 | 185 | $compatible_wp = is_wp_version_compatible( $wp_customize->theme()->get( 'RequiresWP' ) ); |
| 186 | 186 | $compatible_php = is_php_version_compatible( $wp_customize->theme()->get( 'RequiresPHP' ) ); |
| | 187 | $fse_safe = true; |
| | 188 | |
| | 189 | // Check if the theme requires the FSE to work correctly. |
| | 190 | $theme_tags = $wp_customize->theme()->get( 'Tags' ); |
| | 191 | |
| | 192 | if ( ! empty( $theme_tags ) && in_array( 'full-site-editing', $theme_tags, true ) && ! is_plugin_active( 'gutenberg/gutenberg.php' ) ) { |
| | 193 | $fse_safe = false; |
| | 194 | } |
| 187 | 195 | ?> |
| 188 | | <?php if ( $compatible_wp && $compatible_php ) : ?> |
| | 196 | <?php if ( $compatible_wp && $compatible_php && $fse_safe ) : ?> |
| 189 | 197 | <?php $save_text = $wp_customize->is_theme_active() ? __( 'Publish' ) : __( 'Activate & Publish' ); ?> |
| 190 | 198 | <div id="customize-save-button-wrapper" class="customize-save-button-wrapper" > |
| 191 | 199 | <?php submit_button( $save_text, 'primary save', 'save', false ); ?> |
diff --git a/src/wp-includes/theme.php b/src/wp-includes/theme.php
index 7d4b62684b..cbf1849d21 100644
|
a
|
b
|
function validate_current_theme() { |
| 908 | 908 | function validate_theme_requirements( $stylesheet ) { |
| 909 | 909 | $theme = wp_get_theme( $stylesheet ); |
| 910 | 910 | |
| | 911 | // If the theme is a Full Site Editing theme, check for the presence of the Gutenberg plugin. |
| | 912 | $theme_tags = $theme->get( 'Tags' ); |
| | 913 | |
| | 914 | if ( ! empty( $theme_tags ) && in_array( 'full-site-editing', $theme_tags, true ) && ! is_plugin_active( 'gutenberg/gutenberg.php' ) ) { |
| | 915 | return new WP_Error( |
| | 916 | 'theme_requires_fse', |
| | 917 | sprintf( |
| | 918 | /* translators: %s: Theme name. */ |
| | 919 | _x( '<strong>Error:</strong> This theme (%s) uses Full Site Editing, which requires the Gutenberg plugin to be activated.', 'theme' ), |
| | 920 | $theme->display( 'Name' ) |
| | 921 | ) |
| | 922 | ); |
| | 923 | } |
| | 924 | |
| 911 | 925 | $requirements = array( |
| 912 | 926 | 'requires' => ! empty( $theme->get( 'RequiresWP' ) ) ? $theme->get( 'RequiresWP' ) : '', |
| 913 | 927 | 'requires_php' => ! empty( $theme->get( 'RequiresPHP' ) ) ? $theme->get( 'RequiresPHP' ) : '', |