Skip to content

Commit

Permalink
feat(admin): Sort admin secondary and system menu items
Browse files Browse the repository at this point in the history
  • Loading branch information
mcaskill committed Mar 5, 2024
1 parent 1221167 commit e6c3493
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/admin/src/Charcoal/Admin/AdminTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,8 @@ protected function createSecondaryMenu()
}
}

usort($menuItems, [ 'Charcoal\Admin\Support\Sorter', 'sortByPriority' ]);

return $menuItems;
}

Expand Down Expand Up @@ -962,6 +964,8 @@ protected function createSystemMenu($options = null)
$menuItems[$menuIdent] = $menuItem;
}

usort($menuItems, [ 'Charcoal\Admin\Support\Sorter', 'sortByPriority' ]);

return $menuItems;
}

Expand Down

0 comments on commit e6c3493

Please sign in to comment.