Skip to content

Commit

Permalink
add is_my_jetpack_available to Jetpack editor initial state (#38500)
Browse files Browse the repository at this point in the history
  • Loading branch information
CGastrell authored Jul 24, 2024
1 parent 8787c1e commit aafa5c9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: other

Jetpack Editor State: add is_my_jetpack_available to initial state
4 changes: 4 additions & 0 deletions projects/plugins/jetpack/class.jetpack-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.
*
Expand Down

0 comments on commit aafa5c9

Please sign in to comment.