Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ item (Added, Changed, Depreciated, Removed, Fixed, Security).

- Updated: Refactor Horizontal Tabs block into a dynamic block. Add reordering functionality.
- Updated: Refactor Vertical Tabs block to dynamic block; allow sorting.
- Fixed: Admin menu order should now properly exclude predefined post types

## [2026.02]
- Added: `moderntribe/tribe_embed` composer package v1.1.0.
Expand Down
18 changes: 8 additions & 10 deletions wp-content/plugins/core/src/Menus/Admin_Menu_Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(), static 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
Expand Down
Loading