Filters the order of administration menu items.
Description
A truthy value must first be passed to the ‘custom_menu_order’ filter for this filter to work. Use the following to enable custom menu ordering:
add_filter( 'custom_menu_order', '__return_true' );
Parameters
$menu_order
array- An ordered array of menu items.
Source
$menu_order = apply_filters( 'menu_order', $menu_order );
Changelog
Version | Description |
---|---|
2.8.0 | Introduced. |
Example Migrated from Codex:
The example below orders menus with Dashboard, Posts, and Comments in the first menu group. The remaining menus follow in their usual order.