|
@@ 233-240 (lines=8) @@
|
| 230 |
|
* @param bool $wp_admin_themes Optional. Whether Themes link should point to Calypso or wp-admin. Default false (Calypso). |
| 231 |
|
* @param bool $wp_admin_customize Optional. Whether Customize link should point to Calypso or wp-admin. Default false (Calypso). |
| 232 |
|
*/ |
| 233 |
|
public function add_appearance_menu( $wp_admin_themes = false, $wp_admin_customize = false ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable |
| 234 |
|
// Customize on Atomic sites is always done on WP Admin. |
| 235 |
|
parent::add_appearance_menu( $wp_admin_themes, true ); |
| 236 |
|
|
| 237 |
|
// Add back the Theme Editor submenu. |
| 238 |
|
$parent_slug = $wp_admin_themes ? 'themes.php' : 'https://wordpress.com/themes/' . $this->domain; |
| 239 |
|
add_submenu_page( $parent_slug, __( 'Theme Editor', 'jetpack' ), __( 'Theme Editor', 'jetpack' ), 'edit_themes', 'theme-editor.php' ); |
| 240 |
|
} |
| 241 |
|
|
| 242 |
|
/** |
| 243 |
|
* Adds Users menu. |
|
@@ 247-258 (lines=12) @@
|
| 244 |
|
* |
| 245 |
|
* @param bool $wp_admin Optional. Whether links should point to Calypso or wp-admin. Default false (Calypso). |
| 246 |
|
*/ |
| 247 |
|
public function add_users_menu( $wp_admin = false ) { |
| 248 |
|
parent::add_users_menu( $wp_admin ); |
| 249 |
|
|
| 250 |
|
// No need to add a menu linking to WP Admin if there is already one. |
| 251 |
|
if ( $wp_admin ) { |
| 252 |
|
return; |
| 253 |
|
} |
| 254 |
|
|
| 255 |
|
$parent_menu_slug = 'https://wordpress.com/people/team/' . $this->domain; |
| 256 |
|
|
| 257 |
|
add_submenu_page( $parent_menu_slug, esc_attr__( 'Advanced Users Management', 'jetpack' ), __( 'Advanced Users Management', 'jetpack' ), 'list_users', 'users.php', null, 2 ); |
| 258 |
|
} |
| 259 |
|
} |
| 260 |
|
|