#28: autocomplete_users_for_site_admins

The autocomplete_users_for_site_admins filter allows you to enable user auto-complete for non-super admins in Multisite.

It was added in 3.4.

It is evaluated in wp_ajax_autocomplete_user() in the wp-admin/includes/ajax-actions.php file.

autocomplete_users_for_site_admins accepts a single argument:

  1. bool true|false Whether to die() for non-super admin users. Default is false.

Example:

The following example would enable user auto-complete in Multisite for users with the promote_users capability.

View the code example on Gist.

Have a suggested improvement? You can fork the Gist and comment back with the link. If all is agreeable, I’ll merge in your changes. Crowd-sourced documentation FTW!

Leave a Reply

Your email address will not be published. Required fields are marked *