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

WordPress Trac wp-trac at lists.automattic.com
Thu Jan 7 02:18:51 UTC 2010


#11763: Inappropriate admin menu items aren't necessarily removed
-------------------------------+--------------------------------------------
 Reporter:  Denis-de-Bernardy  |        Owner:  ryan    
     Type:  defect (bug)       |       Status:  reopened
 Priority:  normal             |    Milestone:  3.0     
Component:  Menus              |      Version:  3.0     
 Severity:  normal             |   Resolution:          
 Keywords:  multisite          |  
-------------------------------+--------------------------------------------
Changes (by dd32):

  * status:  closed => reopened
  * resolution:  fixed =>


Comment:

 How about getting rid of that {{{create_function()}}} there in {{{trunk
 /wp-admin/plugins.php}}}? Theres nothing there that cant simply be added
 to a function.

 Replacement code: (Dont have Diff on me right now)
 {{{
 if ( is_multisite() && is_super_admin() ) {
         $menu_perms = get_site_option('menu_items', array());
         if ( !$menu_perms['plugins'] ) {
                 add_action( 'admin_notices', '_ms_plugins_not_visible');
                 function _ms_plugins_not_visible() {
                         echo "<div class='error'><p>";
                         printf( __( 'The plugins page is not visible to
 normal users. It must be activated first. %s' ), '<a href="ms-
 options.php#menu">' . __( 'Activate' ) . '</a>' );
                         echo "</p></div>";
                 }
         }
 }
 }}}

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


More information about the wp-trac mailing list