Skip to content

Commit

Permalink
Details Block: Enable by default on Gutenberg plugin without opt-in
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano committed May 26, 2023
1 parent bc7030d commit 7bc8e5c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 18 deletions.
3 changes: 0 additions & 3 deletions lib/experimental/editor-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
}
Expand Down
12 changes: 0 additions & 12 deletions lib/experiments-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' ),
Expand Down
4 changes: 1 addition & 3 deletions packages/block-library/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ const getAllBlocks = () => {
columns,
commentAuthorAvatar,
cover,
details,
embed,
file,
group,
Expand Down Expand Up @@ -226,9 +227,6 @@ const getAllBlocks = () => {
queryTitle,
postAuthorBiography,
];
if ( window?.__experimentalEnableDetailsBlocks ) {
blocks.push( details );
}
return blocks.filter( Boolean );
};

Expand Down

0 comments on commit 7bc8e5c

Please sign in to comment.