Skip to content

Instantly share code, notes, and snippets.

@x0bandeira
Created July 29, 2010 04:18
Show Gist options
  • Save x0bandeira/497223 to your computer and use it in GitHub Desktop.
Save x0bandeira/497223 to your computer and use it in GitHub Desktop.
function menu_order_filter($menu) {
//
// reorder the menu here by operating on $menu
// which is an array with position => 'url';
// separators will appear as
// 'separator1', 'separator2' ... 'separator-last'
//
// example:
// Array
// (
// [0] => index.php
// [1] => separator1
// [2] => edit.php
// ...
// [6] => edit-comments.php
// [7] => separator2
// [8] => themes.php
// ...
// [12] => options-general.php
// [13] => separator-last
// )
//
return $menu;
}
add_filter('custom_menu_order', create_function('', 'return true;'));
add_filter('menu_order', 'menu_order_filter');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment