autocomplete_users_for_site_admins

autocomplete_users_for_site_admins

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7.1

apply_filters('autocomplete_users_for_site_admins') is found 2 times:

  • /wp-admin/includes/ajax-actions.php line 295
    		wp_die( -1 );
    	}
    
    	/** This filter is documented in wp-admin/user-new.php */
    	if ( ! current_user_can( 'manage_network_users' ) && ! apply_filters( 'autocomplete_users_for_site_admins', false ) ) {
    		wp_die( -1 );
    	}
    
    	$return = array();
    
    	/*
    
  • /wp-admin/user-new.php line 325
     *
     * @param bool $enable Whether to enable auto-complete for non-super admins. Default false.
     */
    if ( is_multisite() && current_user_can( 'promote_users' ) && ! wp_is_large_network( 'users' )
    	&& ( current_user_can( 'manage_network_users' ) || apply_filters( 'autocomplete_users_for_site_admins', false ) )
    ) {
    	wp_enqueue_script( 'user-suggest' );
    }
    
    require_once ABSPATH . 'wp-admin/admin-header.php';