get_blogs_of_user

FUNCTION wp-includes\user.php (ligne 937) github
Filters the query arguments for the list of all users of the site.

Paramètres

Entrée :
$user_id, $all = false
Sortie :
@param array $query_args  The query arguments for get_users().
@param array $parsed_args The arguments passed to wp_list_users() combined with the defaults.
@param int  $user_id User ID
@param bool $all     Whether to retrieve all sites, or only sites that are not
@return object[] A list of the user's sites. An empty array if the user doesn't exist

Utilisation

// Utilisation de la fonction get_blogs_of_user
$result = get_blogs_of_user($user_id, $all = false);

if ($result) {
    // Votre logique ici
}

Actualités

Chargement des actualités...