Make WordPress Core

Ticket #54366: 54366.diff

File 54366.diff, 2.2 KB (added by desrosj, 2 years ago)
  • src/wp-admin/customize.php

     
    188188                        <?php
    189189                        $compatible_wp  = is_wp_version_compatible( $wp_customize->theme()->get( 'RequiresWP' ) );
    190190                        $compatible_php = is_php_version_compatible( $wp_customize->theme()->get( 'RequiresPHP' ) );
    191                         $fse_safe       = true;
    192 
    193                         // Check if the theme requires the Gutenberg plugin to work correctly.
    194                         $theme_tags = $wp_customize->theme()->get( 'Tags' );
    195 
    196                         if ( ! empty( $theme_tags ) && in_array( 'full-site-editing', $theme_tags, true ) && ! function_exists( 'gutenberg_is_fse_theme' ) ) {
    197                                 $fse_safe = false;
    198                         }
    199191                        ?>
    200                         <?php if ( $compatible_wp && $compatible_php && $fse_safe ) : ?>
     192                        <?php if ( $compatible_wp && $compatible_php ) : ?>
    201193                                <?php $save_text = $wp_customize->is_theme_active() ? __( 'Publish' ) : __( 'Activate &amp; Publish' ); ?>
    202194                                <div id="customize-save-button-wrapper" class="customize-save-button-wrapper" >
    203195                                        <?php submit_button( $save_text, 'primary save', 'save', false ); ?>
  • src/wp-includes/theme.php

     
    908908function validate_theme_requirements( $stylesheet ) {
    909909        $theme = wp_get_theme( $stylesheet );
    910910
    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 ) && ! function_exists( 'gutenberg_is_fse_theme' ) ) {
    915                 return new WP_Error(
    916                         'theme_requires_gutenberg_plugin',
    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 
    925911        $requirements = array(
    926912                'requires'     => ! empty( $theme->get( 'RequiresWP' ) ) ? $theme->get( 'RequiresWP' ) : '',
    927913                'requires_php' => ! empty( $theme->get( 'RequiresPHP' ) ) ? $theme->get( 'RequiresPHP' ) : '',