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



switch_blog › WordPress动作钩子

Since5.4.0
已弃用n/a
› do_action( 'switch_blog', $new_blog_id, $prev_blog_id, 'switch' )
参数: (3)
  • () new_blog_id New blog ID.
    Required: Yes
  • () prev_blog_id Previous blog ID.
    Required: Yes
  • () context Additional context. Accepts 'switch' when called from switch_to_blog() or 'restore' when called from restore_current_blog().
    Required: Yes
定义在:
文档:

Fires when the blog is switched.





源码

do_action( 'switch_blog', $new_blog_id, $prev_blog_id, 'switch' );