Skip to content

Commit

Permalink
Hosting Configuration: Make the menu title under the settings the sam…
Browse files Browse the repository at this point in the history
…e as the destination (#39183)

* Hosting Configuration: Rename the menu title under the settings

* changelog

* Fix lint

* Update url

* Fix tests

* changelog

* Fix wpcom_site_has_feature

* Fix tests

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/10682178509

Upstream-Ref: Automattic/jetpack@60a8541
  • Loading branch information
arthur791004 authored and matticbot committed Sep 3, 2024
1 parent f547e12 commit 9f1c142
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 88 deletions.
58 changes: 29 additions & 29 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions vendor/automattic/jetpack-masterbar/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ This is an alpha version! The changes listed here are not final.
### Changed
- Enable Users -> Profile (profile.php) on all sites

### Fixed
- Hosting Configuration: Make the menu title under the settings the same as the destination

## [0.8.1] - 2024-08-30
### Changed
- Updated package dependencies. [#39111]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,16 @@ public function add_options_menu() {
);
}

// @phan-suppress-next-line PhanTypeMismatchArgumentProbablyReal -- Core should ideally document null for no-callback arg. https://core.trac.wordpress.org/ticket/52539.
add_submenu_page( 'options-general.php', esc_attr__( 'Hosting Configuration', 'jetpack-masterbar' ), __( 'Hosting Configuration', 'jetpack-masterbar' ), 'manage_options', 'https://wordpress.com/hosting-config/' . $this->domain, null, 11 );
$has_feature_atomic = function_exists( 'wpcom_site_has_feature' ) && wpcom_site_has_feature( \WPCOM_Features::ATOMIC );
add_submenu_page(
'options-general.php',
$has_feature_atomic ? esc_attr__( 'Server Settings', 'jetpack-masterbar' ) : esc_attr__( 'Hosting Features', 'jetpack-masterbar' ),
$has_feature_atomic ? __( 'Server Settings', 'jetpack-masterbar' ) : __( 'Hosting Features', 'jetpack-masterbar' ),
'manage_options',
$has_feature_atomic ? 'https://wordpress.com/hosting-config/' . $this->domain : 'https://wordpress.com/hosting-features/' . $this->domain,
null, // @phan-suppress-current-line PhanTypeMismatchArgumentProbablyReal -- Core should ideally document null for no-callback arg. https://core.trac.wordpress.org/ticket/52539.
11
);

// Page Optimize is active by default on all Atomic sites and registers a Settings > Performance submenu which
// would conflict with our own Settings > Performance that links to Calypso, so we hide it it since the Calypso
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ public function add_options_menu() {
parent::add_options_menu();

// @phan-suppress-next-line PhanTypeMismatchArgumentProbablyReal -- Core should ideally document null for no-callback arg. https://core.trac.wordpress.org/ticket/52539.
add_submenu_page( 'options-general.php', esc_attr__( 'Hosting Configuration', 'jetpack-masterbar' ), __( 'Hosting Configuration', 'jetpack-masterbar' ), 'manage_options', 'https://wordpress.com/hosting-config/' . $this->domain, null, 10 );
add_submenu_page( 'options-general.php', esc_attr__( 'Hosting Features', 'jetpack-masterbar' ), __( 'Hosting Features', 'jetpack-masterbar' ), 'manage_options', 'https://wordpress.com/hosting-features/' . $this->domain, null, 10 );
}

/**
Expand Down
Loading

0 comments on commit 9f1c142

Please sign in to comment.