[wp-trac] [WordPress Trac] #11763: Inappropriate admin menu items aren't necessarily removed

WordPress Trac wp-trac at lists.automattic.com
Wed Jan 6 17:25:30 UTC 2010


#11763: Inappropriate admin menu items aren't necessarily removed
-------------------------------+--------------------------------------------
 Reporter:  Denis-de-Bernardy  |       Owner:  ryan
     Type:  defect (bug)       |      Status:  new 
 Priority:  normal             |   Milestone:  3.0 
Component:  Menus              |     Version:  3.0 
 Severity:  normal             |    Keywords:      
-------------------------------+--------------------------------------------
 With MU going mainstream alongside an increasing number of plugins that
 disable admin menus, we're bound to see sites where the following lines of
 code no longer work:

 http://core.trac.wordpress.org/browser/trunk/wp-
 admin/includes/ms.php?rev=12603#L565

 {{{
         if( !is_site_admin() )
                 unset( $submenu['plugins.php'][10] ); // always remove the
 plugin installer for regular users
         unset( $submenu['plugins.php'][15] ); // always remove the plugin
 editor
         unset( $submenu['themes.php'][10] ); // always remove the themes
 editor
 }}}

 instead, they should not be introduced in the first place. and ideally, we
 should add some kind of remove_menu_item() and remove_submenu_item()
 functionality.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11763>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list