Filter hook 'pre_get_blogs_of_user'
in WP Core File wp-includes/user.php at line 972
Description
Filters the list of a user's sites before it is populated. Returning a non-null value from the filter will effectively short circuit get_blogs_of_user(), returning that value instead.
Occurrences
Filename |
Line Number |
wp-includes/user.php |
972 |
Parameters
Type |
Name |
Description |
null|object[] |
$sites |
An array of site objects of which the user is a member. |
int |
$user_id |
User ID. |
bool |
$all |
Whether the returned array should contain all sites, including those marked 'deleted', 'archived', or 'spam'. Default false. |
PHP Doc
/**
* Filters the list of a user's sites before it is populated.
*
* Returning a non-null value from the filter will effectively short circuit
* get_blogs_of_user(), returning that value instead.
*
* @since 4.6.0
*
* @param null|object[] $sites An array of site objects of which the user is a member.
* @param int $user_id User ID.
* @param bool $all Whether the returned array should contain all sites, including
* those marked 'deleted', 'archived', or 'spam'. Default false.
*/