daily pastebin goal
45%
SHARE
TWEET

Untitled

a guest Mar 21st, 2014 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function remove_menus()
  2. {
  3.     global $menu;
  4.     global $current_user;
  5.     get_currentuserinfo();
  6.     if($current_user->user_login == 'username')
  7.     {
  8.           remove_menu_page( 'index.php' );                  //Dashboard
  9.           remove_menu_page( 'edit.php' );                   //Posts
  10.           remove_menu_page( 'upload.php' );                 //Media
  11.           remove_menu_page( 'edit.php?post_type=page' );    //Pages
  12.           remove_menu_page( 'edit-comments.php' );          //Comments
  13.           remove_menu_page( 'themes.php' );                 //Appearance
  14.           remove_menu_page( 'plugins.php' );                //Plugins
  15.           remove_menu_page( 'users.php' );                  //Users
  16.           remove_menu_page( 'tools.php' );                  //Tools
  17.           remove_menu_page( 'options-general.php' );        //Settings
  18.     }
  19. }
  20. add_action('admin_menu', 'remove_menus');
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top