diff --git a/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php b/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php index 94d1c570c0c7e..ca7cc390ed73c 100644 --- a/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php +++ b/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php @@ -75,6 +75,8 @@ public static function load_features() { require_once __DIR__ . '/features/media/heif-support.php'; require_once __DIR__ . '/features/block-patterns/block-patterns.php'; + + require_once __DIR__ . '/features/global-nav-bar/global-nav.php'; } /** diff --git a/projects/packages/jetpack-mu-wpcom/src/features/global-nav-bar/class-wpcom-global-nav.php b/projects/packages/jetpack-mu-wpcom/src/features/global-nav-bar/class-wpcom-global-nav.php new file mode 100644 index 0000000000000..82f608ee3cc25 --- /dev/null +++ b/projects/packages/jetpack-mu-wpcom/src/features/global-nav-bar/class-wpcom-global-nav.php @@ -0,0 +1,52 @@ +get_nodes() as $node ) { + $nodes[ $node->id ] = $node; + $wp_admin_bar->remove_node( $node->id ); + } + + // Add custom groups and menus here + + // Re-add original nodes + foreach ( $nodes as $id => $node ) { + $wp_admin_bar->add_node( $node ); + } + } +} diff --git a/projects/packages/jetpack-mu-wpcom/src/features/global-nav-bar/global-nav.php b/projects/packages/jetpack-mu-wpcom/src/features/global-nav-bar/global-nav.php new file mode 100644 index 0000000000000..3ac0854473927 --- /dev/null +++ b/projects/packages/jetpack-mu-wpcom/src/features/global-nav-bar/global-nav.php @@ -0,0 +1,22 @@ +is_woa_site() ) {