From 74a831ad4e02a5adefa627666410fb6aa8dc4533 Mon Sep 17 00:00:00 2001 From: Candy Tsai Date: Thu, 11 Apr 2024 17:05:50 +0800 Subject: [PATCH] Add configs for simple classic to load blaze (#36842) * Add configs for simple classic to load blaze * changelog --- .../blaze/changelog/update-blaze-default-config-data | 4 ++++ .../packages/blaze/src/class-dashboard-config-data.php | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 projects/packages/blaze/changelog/update-blaze-default-config-data diff --git a/projects/packages/blaze/changelog/update-blaze-default-config-data b/projects/packages/blaze/changelog/update-blaze-default-config-data new file mode 100644 index 0000000000000..a532e43ce7d74 --- /dev/null +++ b/projects/packages/blaze/changelog/update-blaze-default-config-data @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Update configs to accomodate for Simple Classic for Blaze diff --git a/projects/packages/blaze/src/class-dashboard-config-data.php b/projects/packages/blaze/src/class-dashboard-config-data.php index 7ffd3c414bb8e..603fb9f8fb1d4 100644 --- a/projects/packages/blaze/src/class-dashboard-config-data.php +++ b/projects/packages/blaze/src/class-dashboard-config-data.php @@ -53,7 +53,9 @@ public function get_data() { 'site_name' => \get_bloginfo( 'name' ), 'sections' => array(), // Features are inlined in Calypso Blaze app (wp-calypso/apps/blaze-dashboard) - 'features' => array(), + 'features' => array( + 'is_running_in_jetpack_site' => ! $host->is_wpcom_simple(), + ), 'initial_state' => array( 'currentUser' => array( 'id' => $user['ID'], @@ -67,7 +69,7 @@ public function get_data() { "$blog_id" => array( 'ID' => $blog_id, 'URL' => site_url(), - 'jetpack' => true, + 'jetpack' => ! $host->is_wpcom_simple(), 'visible' => true, 'capabilities' => $empty_object, 'products' => array(), @@ -76,6 +78,7 @@ public function get_data() { 'admin_url' => admin_url(), 'gmt_offset' => $this->get_gmt_offset(), 'is_wpcom_atomic' => $host->is_woa_site(), + 'is_wpcom_simple' => $host->is_wpcom_simple(), 'jetpack_version' => Constants::get_constant( 'JETPACK__VERSION' ), ), ),