WordPress.org

Make WordPress Core

Ticket #14010: 14010.diff

File 14010.diff, 853 bytes (added by nacin, 8 years ago)
  • wp-admin/plugins.php

     
    88
    99/** WordPress Administration Bootstrap */
    1010require_once('./admin.php');
    11 if ( is_multisite() ) {
    12         $menu_perms = get_site_option( 'menu_items', array() );
    1311
    14         if ( empty($menu_perms['plugins']) && ! is_super_admin() )
    15                 wp_die( __( 'Cheatin’ uh?' ) );
    16         else if ( $menu_perms['plugins'] != 1 && is_super_admin() )
     12if ( is_multisite() && ( $menu_perms = get_site_option( 'menu_items', array() ) ) && empty( $menu_perms['plugins'] ) ) {
     13        if ( is_super_admin() )
    1714                add_action( 'admin_notices', '_admin_notice_multisite_activate_plugins_page' );
     15        else
     16                wp_die( __( 'Cheatin’ uh?' ) );
    1817}
    1918
    2019if ( ! current_user_can( 'activate_plugins' ) )