[wp-hackers] hide custom admin menu entries

sansbacon sansbacon at gmail.com
Wed Aug 18 02:51:22 UTC 2010


I am using the following code to hide a number of the admin menu items
from non-administrative users:

global $submenu, $menu;
$menuToHide = array(10, 15, 25, 59, 60, 65, 70, 75, 80);
foreach($menuToHide as $item) {
   unset($menu[$item]);
}

How do I get the index in $menu for third-party plugin menu entries,
in my case, Easy Post Types added a menu that I dont' want most users
to see.

Thanks!

Eric


More information about the wp-hackers mailing list