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..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,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 `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' ); + } + /** * Runs right after the Jetpack_Mu_Wpcom package is initialized. *