Documentation

PersonQuery extends WP_User_Query
in package

Wrap the UserQuery class such that the returned object is a Person instead of a User.

Table of Contents

Methods

__construct()  : mixed
Queries WordPress Users as Person objects.
get_first_result()  : Person|null
get_results()  : PersonArray|array<string|int, Person>

Methods

__construct()

Queries WordPress Users as Person objects.

public __construct([array<string|int, mixed> $query = null ][, bool $forceResultToPerson = true ]) : mixed
Parameters
$query : array<string|int, mixed> = null

Essentially the parameters passed to WP_User_Query

$forceResultToPerson : bool = true

If true, the output from the query will always be a Person, rather than a User.

Tags
see
WP_User_Query::__construct

get_results()

public get_results() : PersonArray|array<string|int, Person>
Return values
PersonArray|array<string|int, Person>

Generally, a Person array. Individual elements may be TouchPointWP_Exception objects if the person could not be found.


        
On this page

Search results