Fix notice when visiting the plugins page as a site admin with multisite enabled. Fixes #14010.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15323 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a00f656cbc
commit
4bb09d0382
|
@ -10,11 +10,13 @@
|
||||||
require_once('./admin.php');
|
require_once('./admin.php');
|
||||||
if ( is_multisite() ) {
|
if ( is_multisite() ) {
|
||||||
$menu_perms = get_site_option( 'menu_items', array() );
|
$menu_perms = get_site_option( 'menu_items', array() );
|
||||||
|
|
||||||
if ( empty($menu_perms['plugins']) && ! is_super_admin() )
|
if ( empty($menu_perms['plugins'] ) || $menu_perms['plugins'] != 1 ) {
|
||||||
wp_die( __( 'Cheatin’ uh?' ) );
|
if ( ! is_super_admin() )
|
||||||
else if ( $menu_perms['plugins'] != 1 && is_super_admin() )
|
wp_die( __( 'Cheatin’ uh?' ) );
|
||||||
add_action( 'admin_notices', '_admin_notice_multisite_activate_plugins_page' );
|
else
|
||||||
|
add_action( 'admin_notices', '_admin_notice_multisite_activate_plugins_page' );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! current_user_can( 'activate_plugins' ) )
|
if ( ! current_user_can( 'activate_plugins' ) )
|
||||||
|
|
Loading…
Reference in New Issue