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



pre_get_blogs_of_user › WordPress过滤钩子

Since4.6.0
已弃用n/a
› apply_filters( 'pre_get_blogs_of_user', null, $user_id, $all )
参数: (3)
  • () sites An array of site objects of which the user is a member.
    Required: Yes
  • () user_id User ID.
    Required: Yes
  • () 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.

Returning a non-null value from 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 );