Fix notice when visiting the plugins page as a site admin with multisite enabled. Fixes #14010.
git-svn-id: https://develop.svn.wordpress.org/trunk@15323 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e8b8d9773a
commit
9879c27093
@ -10,11 +10,13 @@
|
||||
require_once('./admin.php');
|
||||
if ( is_multisite() ) {
|
||||
$menu_perms = get_site_option( 'menu_items', array() );
|
||||
|
||||
if ( empty($menu_perms['plugins']) && ! is_super_admin() )
|
||||
wp_die( __( 'Cheatin’ uh?' ) );
|
||||
else if ( $menu_perms['plugins'] != 1 && is_super_admin() )
|
||||
add_action( 'admin_notices', '_admin_notice_multisite_activate_plugins_page' );
|
||||
|
||||
if ( empty($menu_perms['plugins'] ) || $menu_perms['plugins'] != 1 ) {
|
||||
if ( ! is_super_admin() )
|
||||
wp_die( __( 'Cheatin’ uh?' ) );
|
||||
else
|
||||
add_action( 'admin_notices', '_admin_notice_multisite_activate_plugins_page' );
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! current_user_can( 'activate_plugins' ) )
|
||||
|
Loading…
Reference in New Issue
Block a user