diff --git a/projects/plugins/jetpack/changelog/add-wpcom_hide_action_bar-site-option b/projects/plugins/jetpack/changelog/add-wpcom_hide_action_bar-site-option new file mode 100644 index 0000000000000..0f0cca391aa36 --- /dev/null +++ b/projects/plugins/jetpack/changelog/add-wpcom_hide_action_bar-site-option @@ -0,0 +1,4 @@ +Significance: patch +Type: other + +Add new site setting to hide the Action Bar diff --git a/projects/plugins/jetpack/json-endpoints/class.wpcom-json-api-site-settings-endpoint.php b/projects/plugins/jetpack/json-endpoints/class.wpcom-json-api-site-settings-endpoint.php index 9852478a7c53d..f325b05e27e38 100644 --- a/projects/plugins/jetpack/json-endpoints/class.wpcom-json-api-site-settings-endpoint.php +++ b/projects/plugins/jetpack/json-endpoints/class.wpcom-json-api-site-settings-endpoint.php @@ -499,6 +499,7 @@ function ( $newsletter_category ) { 'jetpack_waf_share_debug_data' => (bool) get_option( 'jetpack_waf_share_debug_data' ), 'jetpack_waf_automatic_rules_last_updated_timestamp' => (int) get_option( 'jetpack_waf_automatic_rules_last_updated_timestamp' ), 'is_fully_managed_agency_site' => (bool) get_option( 'is_fully_managed_agency_site' ), + 'wpcom_hide_action_bar' => (bool) get_option( 'wpcom_hide_action_bar' ), ); if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) { @@ -1189,6 +1190,11 @@ function ( $category_id ) { } break; + case 'wpcom_hide_action_bar': + update_option( $key, (int) (bool) $value ); + $updated[ $key ] = (int) (bool) $value; + break; + default: // allow future versions of this endpoint to support additional settings keys. if ( has_filter( 'site_settings_endpoint_update_' . $key ) ) { diff --git a/projects/plugins/jetpack/json-endpoints/class.wpcom-json-api-site-settings-v1-4-endpoint.php b/projects/plugins/jetpack/json-endpoints/class.wpcom-json-api-site-settings-v1-4-endpoint.php index bb0da75ecd15c..ce6c0a3dd70f6 100644 --- a/projects/plugins/jetpack/json-endpoints/class.wpcom-json-api-site-settings-v1-4-endpoint.php +++ b/projects/plugins/jetpack/json-endpoints/class.wpcom-json-api-site-settings-v1-4-endpoint.php @@ -147,6 +147,7 @@ 'highlander_comment_form_prompt' => '(string) The prompt for the comment form', 'jetpack_comment_form_color_scheme' => '(string) The color scheme for the comment form', 'is_fully_managed_agency_site' => '(bool) Whether the site is a fully managed agency site', + 'wpcom_hide_action_bar' => '(bool) Whether to hide the Action bar', ), 'response_format' => array(