Make WordPress Core


Ignore:
Timestamp:
06/22/2021 05:55:52 AM (3 years ago)
Author:
peterwilsoncc
Message:

Themes: Improve Gutenberg check before activating an FSE theme.

Account for sites enabling Gutenberg as an mu-plugin when determining whether full-site-editing themes can be enabled. This replaces the check the plugin is active with a check whether the function gutenberg_is_fse_theme() is defined.

Follow up to [51193].

Props noisysocks, peterwilsoncc, SergeyBiryukov.
See #53410.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/customize.php

    r51193 r51197  
    190190            $theme_tags = $wp_customize->theme()->get( 'Tags' );
    191191
    192             if ( ! empty( $theme_tags ) && in_array( 'full-site-editing', $theme_tags, true ) && ! is_plugin_active( 'gutenberg/gutenberg.php' ) ) {
     192            if ( ! empty( $theme_tags ) && in_array( 'full-site-editing', $theme_tags, true ) && ! function_exists( 'gutenberg_is_fse_theme' ) ) {
    193193                $fse_safe = false;
    194194            }
Note: See TracChangeset for help on using the changeset viewer.