WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/30/2012 09:04:48 PM (8 years ago)
Author:
nacin
Message:

Clean up cap checks for autocompletes for sites and users in a network. see #19810.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/dashboard.php

    r20279 r20332  
    417417        $actions['create-user'] = '<a href="' . network_admin_url('user-new.php') . '">' . __( 'Create a New User' ) . '</a>';
    418418
    419     if ( is_multisite()
    420         && current_user_can( 'promote_users' )
    421         && ! wp_is_large_network( 'users' )
    422         && is_super_admin()
    423         && is_network_admin()
    424     ) {
     419    if ( ! wp_is_large_network( 'users' ) )
    425420        wp_enqueue_script( 'user-search' );
    426     }
    427     if ( is_multisite()
    428         && current_user_can( 'manage_sites' )
    429         && ! wp_is_large_network( 'sites' )
    430         && is_super_admin()
    431         && is_network_admin()
    432     ) {
     421
     422    if ( ! wp_is_large_network( 'sites' ) )
    433423        wp_enqueue_script( 'site-search' );
    434     }
    435424
    436425    $c_users = get_user_count();
Note: See TracChangeset for help on using the changeset viewer.