Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new site setting to hide the Action Bar #41123

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: other

Add a new site setting to hide the Action Bar in the REST API endpoint
Original file line number Diff line number Diff line change
Expand Up @@ -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' ),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the protocol: I found it an odd design decision that we need to provide this option both here in the ancestor class and the v4 endpoint class.

);

if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
Expand Down Expand Up @@ -1183,6 +1184,7 @@ function ( $category_id ) {
break;

case 'is_fully_managed_agency_site':
case 'wpcom_hide_action_bar':
$coerce_value = (int) (bool) $value;
if ( update_option( $key, $coerce_value ) ) {
$updated[ $key ] = (bool) $coerce_value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Loading