Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*-----------------------------------------------------------------------------------*/
- /* Remove Unwanted Admin Menu Items */
- /*-----------------------------------------------------------------------------------*/
- function remove_admin_menu_items() {
- // Edit only the following line to remove the items you don´t need
- $remove_menu_items = array(__('Comments'),__('Links'),__('Posts'));
- global $menu;
- end ($menu);
- while (prev($menu)){
- $item = explode(' ',$menu[key($menu)][0]);
- if(in_array($item[0] != NULL?$item[0]:"" , $remove_menu_items)){
- unset($menu[key($menu)]);}
- }
- }
- add_action('admin_menu', 'remove_admin_menu_items');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement