Skip to content

Commit

Permalink
Use FSE experiment flag instead of dedicated Global Styles one
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed Feb 11, 2020
1 parent baf835b commit 876492b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
12 changes: 0 additions & 12 deletions lib/experiments-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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( 'editor-gradient-presets' ) );
Expand Down
2 changes: 1 addition & 1 deletion lib/global-styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Expand Down

0 comments on commit 876492b

Please sign in to comment.