From 80cb30965139725fb484b1e0ba36496464891aa2 Mon Sep 17 00:00:00 2001 From: Yuliyan Slavchev Date: Mon, 10 Aug 2026 14:40:38 +0300 Subject: [PATCH] jetpack-mu-wpcom: Remove Classic block deprecation related stickers and filters --- ...sic-block-deprecation-stickers-and-filters | 4 +++ .../src/class-jetpack-mu-wpcom.php | 30 ------------------- 2 files changed, 4 insertions(+), 30 deletions(-) create mode 100644 projects/packages/jetpack-mu-wpcom/changelog/remove-classic-block-deprecation-stickers-and-filters diff --git a/projects/packages/jetpack-mu-wpcom/changelog/remove-classic-block-deprecation-stickers-and-filters b/projects/packages/jetpack-mu-wpcom/changelog/remove-classic-block-deprecation-stickers-and-filters new file mode 100644 index 000000000000..21c8489fe962 --- /dev/null +++ b/projects/packages/jetpack-mu-wpcom/changelog/remove-classic-block-deprecation-stickers-and-filters @@ -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. diff --git a/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php b/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php index 08f385e86433..8bf73102769f 100644 --- a/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php +++ b/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php @@ -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' ) ); @@ -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. *