@@ 260-269 (lines=10) @@ | ||
257 | * |
|
258 | * @param bool $wp_admin Optional. Whether links should point to Calypso or wp-admin. Default false (Calypso). |
|
259 | */ |
|
260 | public function add_options_menu( $wp_admin = false ) { |
|
261 | parent::add_options_menu( $wp_admin ); |
|
262 | ||
263 | add_submenu_page( 'options-general.php', esc_attr__( 'Hosting Configuration', 'jetpack' ), __( 'Hosting Configuration', 'jetpack' ), 'manage_options', 'https://wordpress.com/hosting-config/' . $this->domain, null, 6 ); |
|
264 | ||
265 | // Replace sharing menu if it exists. See Publicize_UI::sharing_menu. |
|
266 | if ( remove_submenu_page( 'options-general.php', 'sharing' ) ) { |
|
267 | add_submenu_page( 'options-general.php', esc_attr__( 'Sharing Settings', 'jetpack' ), __( 'Sharing', 'jetpack' ), 'publish_posts', 'https://wordpress.com/marketing/sharing-buttons/' . $this->domain, null, 30 ); |
|
268 | } |
|
269 | } |
|
270 | ||
271 | /** |
|
272 | * Also remove the Gutenberg plugin menu. |
@@ 196-202 (lines=7) @@ | ||
193 | * |
|
194 | * @param bool $wp_admin Optional. Whether links should point to Calypso or wp-admin. Default false (Calypso). |
|
195 | */ |
|
196 | public function add_users_menu( $wp_admin = false ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable |
|
197 | if ( current_user_can( 'list_users' ) ) { |
|
198 | add_menu_page( esc_attr__( 'Users', 'jetpack' ), __( 'Users', 'jetpack' ), 'list_users', 'https://wordpress.com/people/team/' . $this->domain, null, 'dashicons-admin-users', 70 ); |
|
199 | } else { |
|
200 | add_menu_page( esc_attr__( 'My Profile', 'jetpack' ), __( 'Profile', 'jetpack' ), 'read', 'https://wordpress.com/me', null, 'dashicons-admin-users', 70 ); |
|
201 | } |
|
202 | } |
|
203 | ||
204 | /** |
|
205 | * Adds Tools menu. |