Changeset 1466

Show
Ignore:
Timestamp:
09/03/08 16:11:25 (3 months ago)
Author:
donncha
Message:

Only unset the plugins page when it's not active. Keeps plugin notification active

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/includes/mu.php

    r1454 r1466  
    422422        } 
    423423        unset( $submenu['themes.php'][10] ); 
    424         unset( $submenu['plugins.php'][5] ); 
    425         unset( $submenu['plugins.php'][10] ); 
    426         unset( $menu['35'] ); // Plugins 
    427424 
    428425        $menu_perms = get_site_option( "menu_items" ); 
    429426        if( is_array( $menu_perms ) == false ) 
    430427                $menu_perms = array(); 
    431         if( $menu_perms[ 'plugins' ] == 1 ) 
    432                 $menu[35] = array(__('Plugins'), 'activate_plugins', 'plugins.php'); 
     428        if( $menu_perms[ 'plugins' ] != 1 ) { 
     429                unset( $submenu['plugins.php'][5] ); 
     430                unset( $menu['35'] ); // Plugins 
     431        } 
     432        unset( $submenu['plugins.php'][10] ); // always remove the plugin editor 
    433433} 
    434434add_action( '_admin_menu', 'wpmu_menu' );