Skip to content

Instantly share code, notes, and snippets.


mikeschinkel/functions.php Secret

Created Aug 20, 2010
What would you like to do?
function my_admin_menu() {
swap_admin_menu_sections('Pages','Posts'); // Swap location of Posts Section with Pages Section
rename_admin_menu_section('Media','Photos & Video'); // Rename Media Section to "Photos & Video"
delete_admin_menu_section('Links'); // Get rid of Links Section
$movie_tags_item_array = get_admin_menu_item_array('Movies','Movie Tags'); // Save off the Movie Tags Menu
update_admin_menu_section('Movies',array( // Rename two Movie Menu Items and Delete the Movie Tags Item
array('rename-item','item'=>'Movies','new_title'=>'List Movies'),
array('rename-item','item'=>'Add New','new_title'=>'Add Movie'),
array('delete-item','item'=>'Movie Tags'),
copy_admin_menu_item('Movies',array('Actors','Add New')); // Copy the 'Add New' over from Actors
renamed_admin_menu_item('Movies','Add New','Add Actor'); // Rename copied Actor 'Add New' to 'Add Actor
add_admin_menu_item('Movies',array( // (Another way to get a 'Add Actor' Link to a section.)
'title' => 'Alt Add Actor ',
'slug' => 'post-new.php?post_type=actor',
), array(// Add Back the Movie Tags at the end.
add_admin_menu_item('Movies',$movie_tags_item_array,array(// Add Back the Movie Tags at the end.
delete_admin_menu_section('Actors'); // Finally just get rid of the actors section
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.