Posted By

ecksteing on 11/12/12


Tagged

php wordpress


Versions (?)

Remove Dashboard Admin Menus in WordPress


 / Published in: PHP
 

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

This PHP removes menu items from the WordPress dashboard

  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');

Report this snippet  

You need to login to post a comment.