Skip to content

Commit b32e64a

Browse files
authored
Admin Menu: Show wp-admin menu of self-hosted Jetpack sites in Calypso (#45336)
Removes the Jetpack_Admin_Menu class and makes the admin-menu to return the same menu items that are visible in wp-admin. This causes the menu to look the same across Calypso and WP Admin.
1 parent e91ed98 commit b32e64a

File tree

6 files changed

+20
-493
lines changed

6 files changed

+20
-493
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: minor
2+
Type: changed
3+
4+
Admin Menu: Show wp-admin menu of self-hosted Jetpack sites in Calypso

projects/packages/masterbar/src/admin-menu/class-jetpack-admin-menu.php

Lines changed: 0 additions & 283 deletions
This file was deleted.

projects/packages/masterbar/src/admin-menu/load.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ function should_customize_nav( $admin_menu_class ) {
3131
return false;
3232
}
3333

34-
// No nav customizations on WP Admin of Jetpack sites.
35-
if ( is_a( $admin_menu_class, Jetpack_Admin_Menu::class, true ) && ! $is_api_request ) {
36-
return false;
37-
}
38-
3934
return true;
4035
}
4136

@@ -94,9 +89,9 @@ function get_admin_menu_class() {
9489
return WPcom_Admin_Menu::class;
9590
}
9691

97-
// Jetpack sites.
98-
require_once __DIR__ . '/class-jetpack-admin-menu.php';
99-
return Jetpack_Admin_Menu::class;
92+
// Default menu class.
93+
require_once __DIR__ . '/class-admin-menu.php';
94+
return Admin_Menu::class;
10095
}
10196

10297
/**

0 commit comments

Comments
 (0)