Codex tools: Log in
Contents |
This hook activates the 'menu_order' filter. Return true in order to activate the 'menu_order' filter.
This filter can be used for example to switch to a different menu order for certain users or groups.
function filter_handler(){
return true;
}
add_filter( 'custom_menu_order' , 'filter_handler');
/*
* Code below groups Dashboard/Posts/Pages/Comments together at the top of the dashboard menu.
* If you were to have a custom type that you want to add to the group use the following edit.php?post_type=YOURPOSTTYPENAME
*/
function my_menu_order($menu_ord) {
if (!$menu_ord) return true;
return array('index.php', 'edit.php', 'edit.php?post_type=page', 'edit-comments.php');
}
add_filter('custom_menu_order', 'my_menu_order');
add_filter('menu_order', 'my_menu_order');