get_blogs_of_user WordPress Filter Hook

The get_blogs_of_user WordPress hook is used to get a list of the blogs a user is a member of. This can be used to display a list of blogs a user is a member of on their profile page.

apply_filters( 'get_blogs_of_user', object[] $sites, int $user_id, bool $all ) #

Filters the list of sites a user belongs to.


Parameters

$sites

(object[])An array of site objects belonging to the user.

$user_id

(int)User ID.

$all

(bool)Whether the returned sites array should contain all sites, including those marked 'deleted', 'archived', or 'spam'. Default false.


Top ↑

Source

File: wp-includes/user.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
MU (3.0.0)Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More