WordPress.org

Make WordPress Core

Ticket #13944: 13944.patch

File 13944.patch, 661 bytes (added by ocean90, 5 years ago)
  • wp-admin/plugins.php

     
    99/** WordPress Administration Bootstrap */ 
    1010require_once('./admin.php'); 
    1111 
     12$menu_perms = get_site_option( 'menu_items' ); 
     13if( is_array( $menu_perms ) == false ) 
     14        $menu_perms = array(); 
     15 
     16if ( $menu_perms[ 'plugins' ] != 1 && ! is_super_admin() ) 
     17        wp_die( __( 'Page disabled by the network administrator.' ) ); 
     18 
    1219if ( ! current_user_can( 'activate_plugins' ) ) 
    1320        wp_die( __( 'You do not have sufficient permissions to manage plugins for this site.' ) ); 
    1421