WordPress.org

Make WordPress Core

Ticket #19810: 19810.site-admin-logic.diff

File 19810.site-admin-logic.diff, 1.5 KB (added by duck_, 6 years ago)
  • wp-admin/includes/ajax-actions.php

     
    150150}
    151151
    152152function wp_ajax_autocomplete_user() {
    153         if ( !is_multisite() || !current_user_can( 'promote_users' ) || wp_is_large_network( 'users' ) || !is_super_admin() && apply_filters( 'autocomplete_users_for_site_admins', false ) )
     153        if ( ! is_multisite() || ! current_user_can( 'promote_users' ) || wp_is_large_network( 'users' ) || ( ! is_super_admin() && ! apply_filters( 'autocomplete_users_for_site_admins', false ) ) )
    154154                wp_die( -1 );
    155155       
    156156        $return = array();
     
    16751675
    16761676        update_user_meta( get_current_user_id(), 'dismissed_wp_pointers', $dismissed );
    16771677        wp_die( 1 );
    1678 }
    1679  No newline at end of file
     1678}
  • wp-admin/user-new.php

     
    178178
    179179wp_enqueue_script('wp-ajax-response');
    180180wp_enqueue_script('user-profile');
    181 if ( is_multisite() && current_user_can( 'promote_users' ) && !wp_is_large_network( 'users' ) && is_super_admin() || apply_filters( 'autocomplete_users_for_site_admins', false ) )
     181if ( is_multisite() && current_user_can( 'promote_users' ) && !wp_is_large_network( 'users' ) && ( is_super_admin() || apply_filters( 'autocomplete_users_for_site_admins', false ) ) )
    182182        wp_enqueue_script( 'user-search' );
    183183
    184184require_once( 'admin-header.php' );