Ajax implements Registerable
Plugin ajax handler.
Tags
Interfaces, Classes and Traits
- Registerable
Table of Contents
- get_preloaded_users() : void
- Get details about the pre-selected users.
- get_users() : void
- Load users via ajax.
- register() : void
- Hook into WP.
- scripts() : void
- Inline script required for ajax.
- send_error() : void
- Send a json error back to the browser.
Methods
get_preloaded_users()
Get details about the pre-selected users.
public
get_preloaded_users() : void
This is used on the edit screen of a taxonomy term.
Return values
void —get_users()
Load users via ajax.
public
get_users() : void
We need 2 queries because WP_User_Query can't search 2 things at the same time. 1st query looks for ID, username, display name and email. 2nd query looks for first name and last name.
Return values
void —register()
Hook into WP.
public
register() : void
Return values
void —scripts()
Inline script required for ajax.
public
scripts() : void
Return values
void —send_error()
Send a json error back to the browser.
public
send_error(string $message) : void
Parameters
- $message : string