get_blogs_of_user хук-фильтр . WP 3.0.0
Filters the list of sites a user belongs to.
Использование
add_filter( 'get_blogs_of_user', 'filter_function_name_293', 10, 3 ); function filter_function_name_293( $sites, $user_id, $all ){ // filter... return $sites; }
- $sites(объект[])
- An array of site objects belonging to the user.
- $user_id(число)
- User ID.
- $all(true/false)
- Whether the returned sites array should contain all sites, including those marked 'deleted', 'archived', or 'spam'.
По умолчанию: false
Список изменений
С версии 3.0.0 | Введена. |
Где вызывается хук
get_blogs_of_user
wp-includes/user.php 892
return apply_filters( 'get_blogs_of_user', $sites, $user_id, $all );