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.
null, $user_id, $all
Sortie :
@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
// Modifier la valeur avec le filtre 'pre_get_blogs_of_user'
add_filter('pre_get_blogs_of_user', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre(null) {
// Modifier la valeur
return null;
}
Chargement des actualités...