|
@@ 342-352 (lines=11) @@
|
| 339 |
|
* @param bool $wp_admin_themes Optional. Whether Themes link should point to Calypso or wp-admin. Default false (Calypso). |
| 340 |
|
* @param bool $wp_admin_customize Optional. Whether Customize link should point to Calypso or wp-admin. Default false (Calypso). |
| 341 |
|
*/ |
| 342 |
|
public function add_appearance_menu( $wp_admin_themes = false, $wp_admin_customize = false ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable |
| 343 |
|
// Customize on Atomic sites is always done on WP Admin. |
| 344 |
|
parent::add_appearance_menu( $wp_admin_themes, true ); |
| 345 |
|
|
| 346 |
|
// Do not add links to WP Admin when Calypso is forced. |
| 347 |
|
if ( $this->should_force_calypso_links() ) { |
| 348 |
|
return; |
| 349 |
|
} |
| 350 |
|
|
| 351 |
|
add_submenu_page( 'themes.php', esc_attr__( 'Add New Theme', 'jetpack' ), __( 'Add New Theme', 'jetpack' ), 'install_themes', 'theme-install.php', null, 1 ); |
| 352 |
|
} |
| 353 |
|
|
| 354 |
|
/** |
| 355 |
|
* Override the global submenu_file for theme-install.php page so the WP Admin menu item gets highlighted correctly. |
|
@@ 374-383 (lines=10) @@
|
| 371 |
|
* |
| 372 |
|
* @param bool $wp_admin Optional. Whether links should point to Calypso or wp-admin. Default false (Calypso). |
| 373 |
|
*/ |
| 374 |
|
public function add_users_menu( $wp_admin = false ) { |
| 375 |
|
parent::add_users_menu( $wp_admin ); |
| 376 |
|
|
| 377 |
|
// Do not add links to WP Admin when Calypso is forced. |
| 378 |
|
if ( $this->should_force_calypso_links() ) { |
| 379 |
|
return; |
| 380 |
|
} |
| 381 |
|
|
| 382 |
|
add_submenu_page( 'users.php', esc_attr__( 'Advanced Users Management', 'jetpack' ), __( 'Advanced Users Management', 'jetpack' ), 'list_users', 'users.php', null, 2 ); |
| 383 |
|
} |
| 384 |
|
|
| 385 |
|
/** |
| 386 |
|
* Also remove the Gutenberg plugin menu. |