From 34449f051117bbc030d80c071f8483b12d1fcd29 Mon Sep 17 00:00:00 2001 From: Geoff Dusome Date: Mon, 30 Mar 2026 09:43:32 -0400 Subject: [PATCH 1/3] [MOOSE-368]: fix admin menu order --- .../core/src/Menus/Admin_Menu_Order.php | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/wp-content/plugins/core/src/Menus/Admin_Menu_Order.php b/wp-content/plugins/core/src/Menus/Admin_Menu_Order.php index ff25d4c55..0d44b139a 100644 --- a/wp-content/plugins/core/src/Menus/Admin_Menu_Order.php +++ b/wp-content/plugins/core/src/Menus/Admin_Menu_Order.php @@ -49,20 +49,18 @@ public function custom_menu_order(): array { */ protected function get_post_types(): array { try { - $subscribers = tribe_project()->get_subscribers(); + // get all post type subscribers + $subscribers = array_filter( tribe_project()->get_subscribers(), function ( $subscriber ) { + return str_contains( $subscriber, 'Post_Types\\' ); + } ); $post_types = []; foreach ( $subscribers as $subscriber ) { - // skip non-post types subscribers - if ( ! str_contains( $subscriber, 'Post_Types\\' ) ) { - continue; - } - + // there is no post subscriber so there's no need to define it here to skip $skip_post_types = [ - 'Post_Types\\Announcement', - 'Post_Types\\Page', - 'Post_Types\\Post', - 'Post_Types\\Training', + 'Tribe\\Plugin\\Post_Types\\Page\\Page_Subscriber', + 'Tribe\\Plugin\\Post_Types\\Training\\Training_Subscriber', + 'Tribe\\Plugin\\Post_Types\\Announcement\\Announcement_Subscriber', ]; // skip std / predefined post types From c7becae4cbd36002fc5e8510e3d28840b495008d Mon Sep 17 00:00:00 2001 From: Geoff Dusome Date: Mon, 30 Mar 2026 09:44:06 -0400 Subject: [PATCH 2/3] [MOOSE-368]: phpcs --- wp-content/plugins/core/src/Menus/Admin_Menu_Order.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-content/plugins/core/src/Menus/Admin_Menu_Order.php b/wp-content/plugins/core/src/Menus/Admin_Menu_Order.php index 0d44b139a..9645962d3 100644 --- a/wp-content/plugins/core/src/Menus/Admin_Menu_Order.php +++ b/wp-content/plugins/core/src/Menus/Admin_Menu_Order.php @@ -50,7 +50,7 @@ public function custom_menu_order(): array { protected function get_post_types(): array { try { // get all post type subscribers - $subscribers = array_filter( tribe_project()->get_subscribers(), function ( $subscriber ) { + $subscribers = array_filter( tribe_project()->get_subscribers(), static function ( $subscriber ) { return str_contains( $subscriber, 'Post_Types\\' ); } ); From 9ec43526c38cd13baf8f372e1498b45f68c21c1a Mon Sep 17 00:00:00 2001 From: Geoff Dusome Date: Mon, 30 Mar 2026 09:45:57 -0400 Subject: [PATCH 3/3] [MOOSE-368]: changelog entry --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e0f65ce1..012cf2195 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). Each changelog entry gets prefixed with the category of the item (Added, Changed, Depreciated, Removed, Fixed, Security). +## [2026.03] + +- Fixed: Admin menu order should now properly exclude predefined post types + ## [2026.02] - Added: `moderntribe/tribe_embed` composer package v1.1.0. - Updated: Renamed "Moose" to "ModernPress" across the project (excluding Lando configs and deployment pipelines).