From 7bc8e5c6a143cdacd1e1f4bf070f98c666a5c658 Mon Sep 17 00:00:00 2001 From: Tetsuaki Hamano Date: Fri, 26 May 2023 18:00:39 +0900 Subject: [PATCH] Details Block: Enable by default on Gutenberg plugin without opt-in --- lib/experimental/editor-settings.php | 3 --- lib/experiments-page.php | 12 ------------ packages/block-library/src/index.js | 4 +--- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/lib/experimental/editor-settings.php b/lib/experimental/editor-settings.php index 9571d50fdf3f27..67e08265558e1f 100644 --- a/lib/experimental/editor-settings.php +++ b/lib/experimental/editor-settings.php @@ -86,9 +86,6 @@ function gutenberg_enable_experiments() { if ( $gutenberg_experiments && array_key_exists( 'gutenberg-group-grid-variation', $gutenberg_experiments ) ) { wp_add_inline_script( 'wp-block-editor', 'window.__experimentalEnableGroupGridVariation = true', 'before' ); } - if ( $gutenberg_experiments && array_key_exists( 'gutenberg-details-blocks', $gutenberg_experiments ) ) { - wp_add_inline_script( 'wp-block-editor', 'window.__experimentalEnableDetailsBlocks = true', 'before' ); - } if ( $gutenberg_experiments && array_key_exists( 'gutenberg-pattern-enhancements', $gutenberg_experiments ) ) { wp_add_inline_script( 'wp-block-editor', 'window.__experimentalEnablePatternEnhancements = true', 'before' ); } diff --git a/lib/experiments-page.php b/lib/experiments-page.php index 9e31815f3f50ff..eb6a1ea8a7336c 100644 --- a/lib/experiments-page.php +++ b/lib/experiments-page.php @@ -77,18 +77,6 @@ function gutenberg_initialize_experiments_settings() { ) ); - add_settings_field( - 'gutenberg-details-blocks', - __( 'Details block', 'gutenberg' ), - 'gutenberg_display_experiment_field', - 'gutenberg-experiments', - 'gutenberg_experiments_section', - array( - 'label' => __( 'Test the Details block', 'gutenberg' ), - 'id' => 'gutenberg-details-blocks', - ) - ); - add_settings_field( 'gutenberg-theme-previews', __( 'Block Theme Previews', 'gutenberg' ), diff --git a/packages/block-library/src/index.js b/packages/block-library/src/index.js index a0c7b75eac19b8..73c2f1eb1140a2 100644 --- a/packages/block-library/src/index.js +++ b/packages/block-library/src/index.js @@ -147,6 +147,7 @@ const getAllBlocks = () => { columns, commentAuthorAvatar, cover, + details, embed, file, group, @@ -226,9 +227,6 @@ const getAllBlocks = () => { queryTitle, postAuthorBiography, ]; - if ( window?.__experimentalEnableDetailsBlocks ) { - blocks.push( details ); - } return blocks.filter( Boolean ); };