Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: removed

Remove the Classic block deprecation experiment and the Classic block inserter support sticker, since the deprecation was removed from Gutenberg.
30 changes: 0 additions & 30 deletions projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,6 @@ public static function init() {
// Filter to populate JetpackScriptData.site.wpcom.blog_id with the actual WP.com blog ID.
add_filter( 'jetpack_admin_js_script_data', array( __CLASS__, 'set_wpcom_blog_id_script_data' ), 10, 1 );

// Allow sites with the `classic-block-inserter-support` blog sticker to insert the Classic block.
if ( wpcom_has_blog_sticker( 'classic-block-inserter-support', get_wpcom_blog_id() ) ) {
add_filter( 'wp_classic_block_supports_inserter', '__return_true' );
}

// Enable the `gutenberg-classic-block-deprecation` Gutenberg experiment for all sites, with an opt-out via the `disable-classic-block-deprecation` blog sticker.
// Both filters are needed: `default_option_` fires when the option doesn't exist in the DB, `option_` fires when it does.
add_filter( 'option_gutenberg-experiments', array( __CLASS__, 'enable_gutenberg_classic_block_deprecation_experiment' ) );
add_filter( 'default_option_gutenberg-experiments', array( __CLASS__, 'enable_gutenberg_classic_block_deprecation_experiment' ) );

// Enable the `gutenberg-react-19` Gutenberg experiment on selected sites.
add_filter( 'option_gutenberg-experiments', array( __CLASS__, 'enable_gutenberg_react_19_experiment' ) );
add_filter( 'default_option_gutenberg-experiments', array( __CLASS__, 'enable_gutenberg_react_19_experiment' ) );
Expand Down Expand Up @@ -851,26 +841,6 @@ public static function set_wpcom_blog_id_script_data( $data ) {
return $data;
}

/**
* Add `gutenberg-classic-block-deprecation` to the list of enabled Gutenberg experiments.
* Skip sites that have the `disable-classic-block-deprecation` sticker enabled.
*
* @param mixed $experiments The current value of the gutenberg-experiments option.
* @return mixed Original option value or the filtered experiments.
*/
public static function enable_gutenberg_classic_block_deprecation_experiment( $experiments ) {
if ( wpcom_has_blog_sticker( 'disable-classic-block-deprecation', get_wpcom_blog_id() ) ) {
return $experiments;
}

if ( ! is_array( $experiments ) ) {
$experiments = array();
}

$experiments['gutenberg-classic-block-deprecation'] = true;
return $experiments;
}

/**
* Add `gutenberg-react-19` to the list of enabled Gutenberg experiments.
*
Expand Down
Loading