Remove Dashboard Admin Menus in WordPress


/ Published in: PHP
Save to your folder(s)

This PHP removes menu items from the WordPress dashboard


Copy this code and paste it in your HTML
  1. function remove_menus () {
  2. global $menu;
  3. $restricted = array(__('Links'), __('Tools'));
  4. end ($menu);
  5. while (prev($menu)){
  6. $value = explode(' ',$menu[key($menu)][0]);
  7. if(in_array($value[0] != NULL?$value[0]:"" , $restricted)){unset($menu[key($menu)]);}
  8. }
  9. }
  10. add_action('admin_menu', 'remove_menus');

URL: http://eckstein.id.au/12713/wordpress/remove-dashboard-menu

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.