diff --git a/projects/plugins/jetpack/changelog/add-jetpack-editor-state-my-jetpack-availability b/projects/plugins/jetpack/changelog/add-jetpack-editor-state-my-jetpack-availability new file mode 100644 index 0000000000000..f1c6864327519 --- /dev/null +++ b/projects/plugins/jetpack/changelog/add-jetpack-editor-state-my-jetpack-availability @@ -0,0 +1,4 @@ +Significance: minor +Type: other + +Jetpack Editor State: add is_my_jetpack_available to initial state diff --git a/projects/plugins/jetpack/class.jetpack-gutenberg.php b/projects/plugins/jetpack/class.jetpack-gutenberg.php index fd13cf4b19484..6067fb8a629d1 100644 --- a/projects/plugins/jetpack/class.jetpack-gutenberg.php +++ b/projects/plugins/jetpack/class.jetpack-gutenberg.php @@ -12,6 +12,7 @@ use Automattic\Jetpack\Connection\Manager as Connection_Manager; use Automattic\Jetpack\Constants; use Automattic\Jetpack\Current_Plan as Jetpack_Plan; +use Automattic\Jetpack\My_Jetpack\Initializer as My_Jetpack_Initializer; use Automattic\Jetpack\Publicize\Jetpack_Social_Settings\Dismissed_Notices; use Automattic\Jetpack\Status; use Automattic\Jetpack\Status\Host; @@ -718,6 +719,9 @@ public static function enqueue_block_editor_assets() { 'is_coming_soon' => $status->is_coming_soon(), 'is_offline_mode' => $status->is_offline_mode(), 'is_newsletter_feature_enabled' => class_exists( '\Jetpack_Memberships' ), + // this is the equivalent of JP initial state siteData.showMyJetpack (class-jetpack-redux-state-helper) + // used to determine if we can link to My Jetpack from the block editor + 'is_my_jetpack_available' => My_Jetpack_Initializer::should_initialize(), /** * Enable the RePublicize UI in the block editor context. *