dmautz
1p1 comments posted · 0 followers · following 0
16 years ago @ Reciprocity - CMS-Like Admin Menu · 0 replies · +1 points
I rewrote the function to make it easier to simply rearrange the menus. Just edit the plugin and replace this funtion:
function change_post_links() {
global $menu;
// copy menus
$temp[5] = $menu[5]; //posts
$temp[10] = $menu[10]; //media
$temp[15] = $menu[15]; //links
$temp[20] = $menu[20]; //pages
// reset menus
$menu[5] = $temp[20]; //move pages
$menu[10] = $temp[5]; //move posts
$menu[20] = $temp[10]; //move media
}
First it copies the menus to a temporary array. Wordpress goes in increments of 5, im guessing to leave room for custom menus. If you have custom or additional menus you may need to add them as well. Then it reassigns the menus to whatever order you want. In my example above it changes it to Pages > Posts > Links > Media. I did not bother changing the other menus, but if you want to just add them in.
I believe this method is easier than reassigning every submenu.
function change_post_links() {
global $menu;
// copy menus
$temp[5] = $menu[5]; //posts
$temp[10] = $menu[10]; //media
$temp[15] = $menu[15]; //links
$temp[20] = $menu[20]; //pages
// reset menus
$menu[5] = $temp[20]; //move pages
$menu[10] = $temp[5]; //move posts
$menu[20] = $temp[10]; //move media
}
First it copies the menus to a temporary array. Wordpress goes in increments of 5, im guessing to leave room for custom menus. If you have custom or additional menus you may need to add them as well. Then it reassigns the menus to whatever order you want. In my example above it changes it to Pages > Posts > Links > Media. I did not bother changing the other menus, but if you want to just add them in.
I believe this method is easier than reassigning every submenu.