WordPress开发者和主题制作者的搜索引擎



pre_get_blogs_of_user ›

Since4.6.0
已弃用n/a
apply_filters( 'pre_get_blogs_of_user', null, $user_id, $all )
参数: (3)
  • (null|array) $sites An array of site objects of which the user is a member.
    Required: Yes
  • (int) $user_id User ID.
    Required: Yes
  • (bool) $all Whether the returned array should contain all sites, including those marked 'deleted', 'archived', or 'spam'. Default false.
    Required: Yes
定义在:
文档:

Filters the list of a user's sites before it is populated.

Passing a non-null value to the filter will effectively short circuit get_blogs_of_user(), returning that value instead.





源码

$sites = apply_filters( 'pre_get_blogs_of_user', null, $user_id, $all );