Make WordPress Core


Ignore:
Timestamp:
06/30/2012 12:40:25 PM (13 years ago)
Author:
nacin
Message:

Enforce multisite plugins menu preference in map_meta_cap(). This means a simple current_user_can('activate_plugins') check will handle the 'Enable administration menus' setting.

Remove bogus checks for enabling/disabling the 'themes' menu (something core does not handle out of the box) when in the network admin.

fixes #21123.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-plugins-list-table.php

    r20853 r21198  
    3232
    3333    function ajax_user_can() {
    34         if ( is_multisite() ) {
    35             $menu_perms = get_site_option( 'menu_items', array() );
    36 
    37             if ( empty( $menu_perms['plugins'] ) && ! is_super_admin() )
    38                 return false;
    39         }
    40 
    4134        return current_user_can('activate_plugins');
    4235    }
Note: See TracChangeset for help on using the changeset viewer.