[wp-hackers] hide custom admin menu entries

Frank Bueltge frank at bueltge.de
Wed Aug 18 05:32:48 UTC 2010


Maybe see the plugin Adminimize

Am 18.08.2010 04:51 schrieb "sansbacon" <sansbacon at gmail.com>:

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
_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers


More information about the wp-hackers mailing list