From f9d90e036a1fe4ee65371c92f70258bce9343a71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s?= Date: Thu, 6 Feb 2020 11:57:49 +0100 Subject: [PATCH] Use FSE experiment flag instead of dedicated Global Styles one --- lib/experiments-page.php | 12 ------------ lib/global-styles.php | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/lib/experiments-page.php b/lib/experiments-page.php index 1f6612515f6258..282284c8a7734e 100644 --- a/lib/experiments-page.php +++ b/lib/experiments-page.php @@ -95,17 +95,6 @@ function gutenberg_initialize_experiments_settings() { 'id' => 'gutenberg-page-templates', ) ); - add_settings_field( - 'gutenberg-global-styles', - __( 'Global Styles', 'gutenberg' ), - 'gutenberg_display_experiment_field', - 'gutenberg-experiments', - 'gutenberg_experiments_section', - array( - 'label' => __( 'Enable Global Styles', 'gutenberg' ), - 'id' => 'gutenberg-global-styles', - ) - ); register_setting( 'gutenberg-experiments', 'gutenberg-experiments' @@ -158,7 +147,6 @@ function gutenberg_experiments_editor_settings( $settings ) { '__experimentalEnableFullSiteEditing' => gutenberg_is_experiment_enabled( 'gutenberg-full-site-editing' ), '__experimentalEnableFullSiteEditingDemo' => gutenberg_is_experiment_enabled( 'gutenberg-full-site-editing-demo' ), '__experimentalEnablePageTemplates' => gutenberg_is_experiment_enabled( 'gutenberg-page-templates' ), - '__experimentalEnableGlobalStyles' => gutenberg_is_experiment_enabled( 'gutenberg-global-styles' ), ); $gradient_presets = current( (array) get_theme_support( '__experimental-editor-gradient-presets' ) ); diff --git a/lib/global-styles.php b/lib/global-styles.php index d7fb0afea693ed..0607a7ddadc4a7 100644 --- a/lib/global-styles.php +++ b/lib/global-styles.php @@ -299,7 +299,7 @@ function gutenberg_experimental_global_styles_register_cpt() { register_post_type( 'wp_global_styles', $args ); } -if ( gutenberg_is_experiment_enabled( 'gutenberg-global-styles' ) ) { +if ( gutenberg_is_experiment_enabled( 'gutenberg-full-site-editing' ) ) { add_action( 'init', 'gutenberg_experimental_global_styles_register_cpt' ); add_filter( 'body_class', 'gutenberg_experimental_global_styles_wp_gs_class_front_end' ); add_filter( 'admin_body_class', 'gutenberg_experimental_global_styles_wp_gs_class_editor' );