Hey Guys,
I am trying to remove a sidebar item in the admin back end. I am using one plugin that works great for renaming and changing the sidebar but It requires me to purchase it to remove certain items so I wanted to use a code and manually do it since it wont go away with any plugins I install. I tried adding a code I found online and added it to the functions.php without any luck. Here are the urls to the plugin menu I’m trying to remove.
wp-admin/admin.php?page=admin-check-for-new-folders
/wp-admin/admin.php?page=mlp-upgrade-to-pro
Code Tried:
[php]/-----------------------------------------------------------------------------------/
/* Remove Unwanted Admin Menu Items /
/-----------------------------------------------------------------------------------*/
function remove_admin_menu_items() {
$remove_menu_items = array(__(‘admin-check-for-new-folders’));
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’);[/php]
Any help is much appreciated!