From 017699f7d868743ad2ed32d08a04ef1a3f214770 Mon Sep 17 00:00:00 2001 From: Yuliyan Slavchev Date: Tue, 5 May 2026 15:41:23 +0300 Subject: [PATCH 1/4] jetpack-mu-wpcom: Enable Classic block inserter support via sticker --- .../changelog/enable-classic-block-inserter-support | 4 ++++ .../packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php | 5 +++++ 2 files changed, 9 insertions(+) create mode 100644 projects/packages/jetpack-mu-wpcom/changelog/enable-classic-block-inserter-support diff --git a/projects/packages/jetpack-mu-wpcom/changelog/enable-classic-block-inserter-support b/projects/packages/jetpack-mu-wpcom/changelog/enable-classic-block-inserter-support new file mode 100644 index 000000000000..c590b8b3f01a --- /dev/null +++ b/projects/packages/jetpack-mu-wpcom/changelog/enable-classic-block-inserter-support @@ -0,0 +1,4 @@ +Significance: minor +Type: added + +Classic block: Allow sites with the enable-classic-block-inserter-support sticker to insert the Classic block. 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 e362aa5efbd2..21bb63160ef7 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 @@ -91,6 +91,11 @@ 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 `enable-classic-block-inserter-support` blog sticker to insert the Classic block. + if ( wpcom_has_blog_sticker( 'enable-classic-block-inserter-support', get_wpcom_blog_id() ) ) { + add_filter( 'gutenberg_classic_block_supports_inserter', '__return_true' ); + } + /** * Runs right after the Jetpack_Mu_Wpcom package is initialized. * From 479d57ed460b209af527db3c227f49d7c3acfc9f Mon Sep 17 00:00:00 2001 From: Yuliyan Slavchev Date: Tue, 5 May 2026 16:12:07 +0300 Subject: [PATCH 2/4] Add wp_ prefixed filter for the classic block inserter support --- .../jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php | 7 +++++++ 1 file changed, 7 insertions(+) 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 21bb63160ef7..a7e27461a62e 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 @@ -94,6 +94,13 @@ public static function init() { // Allow sites with the `enable-classic-block-inserter-support` blog sticker to insert the Classic block. if ( wpcom_has_blog_sticker( 'enable-classic-block-inserter-support', get_wpcom_blog_id() ) ) { add_filter( 'gutenberg_classic_block_supports_inserter', '__return_true' ); + + /* + * Gutenberg uses the `gutenberg_` filter while the change is in the plugin. + * Once the new Gutenberg version lands in Core, the filter will be renamed + * to use the `wp_` prefix, and the `gutenberg_` filter can be removed. + */ + add_filter( 'wp_classic_block_supports_inserter', '__return_true' ); } /** From 3f43e66bcb4de6272cf1037626e1365fc58398f8 Mon Sep 17 00:00:00 2001 From: Yuliyan Slavchev Date: Tue, 5 May 2026 16:40:35 +0300 Subject: [PATCH 3/4] Use only wp_classic_block_supports_inserter --- .../jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php | 7 ------- 1 file changed, 7 deletions(-) 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 a7e27461a62e..9e99355eeba7 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 @@ -93,13 +93,6 @@ public static function init() { // Allow sites with the `enable-classic-block-inserter-support` blog sticker to insert the Classic block. if ( wpcom_has_blog_sticker( 'enable-classic-block-inserter-support', get_wpcom_blog_id() ) ) { - add_filter( 'gutenberg_classic_block_supports_inserter', '__return_true' ); - - /* - * Gutenberg uses the `gutenberg_` filter while the change is in the plugin. - * Once the new Gutenberg version lands in Core, the filter will be renamed - * to use the `wp_` prefix, and the `gutenberg_` filter can be removed. - */ add_filter( 'wp_classic_block_supports_inserter', '__return_true' ); } From 673144cb30be9755e7b4ba106f3fd8c01198d657 Mon Sep 17 00:00:00 2001 From: Yuliyan Slavchev Date: Tue, 5 May 2026 16:59:51 +0300 Subject: [PATCH 4/4] Fix sticker slug Co-authored-by: Marin Atanasov <8436925+tyxla@users.noreply.github.com> --- .../packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 9e99355eeba7..1af64f2e02b9 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 @@ -91,8 +91,8 @@ 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 `enable-classic-block-inserter-support` blog sticker to insert the Classic block. - if ( wpcom_has_blog_sticker( 'enable-classic-block-inserter-support', get_wpcom_blog_id() ) ) { + // 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' ); }