@@ 179-185 (lines=7) @@ | ||
176 | * |
|
177 | * @param bool $wp_admin Optional. Whether links should point to Calypso or wp-admin. Default false (Calypso). |
|
178 | */ |
|
179 | public function add_users_menu( $wp_admin = false ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable |
|
180 | if ( current_user_can( 'list_users' ) ) { |
|
181 | add_menu_page( esc_attr__( 'Users', 'jetpack' ), __( 'Users', 'jetpack' ), 'list_users', 'https://wordpress.com/people/team/' . $this->domain, null, 'dashicons-admin-users', 70 ); |
|
182 | } else { |
|
183 | add_menu_page( esc_attr__( 'My Profile', 'jetpack' ), __( 'Profile', 'jetpack' ), 'read', 'https://wordpress.com/me', null, 'dashicons-admin-users', 70 ); |
|
184 | } |
|
185 | } |
|
186 | ||
187 | /** |
|
188 | * Adds Tools menu. |
@@ 263-272 (lines=10) @@ | ||
260 | * |
|
261 | * @param bool $wp_admin Optional. Whether links should point to Calypso or wp-admin. Default false (Calypso). |
|
262 | */ |
|
263 | public function add_options_menu( $wp_admin = false ) { |
|
264 | parent::add_options_menu( $wp_admin ); |
|
265 | ||
266 | 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 ); |
|
267 | ||
268 | // Replace sharing menu if it exists. See Publicize_UI::sharing_menu. |
|
269 | if ( remove_submenu_page( 'options-general.php', 'sharing' ) ) { |
|
270 | 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 ); |
|
271 | } |
|
272 | } |
|
273 | ||
274 | /** |
|
275 | * 1. Remove the Gutenberg plugin menu |