wpseek.com
A WordPress-centric search engine for devs and theme authors



switch_blog › WordPress Action Hooks

Since5.4.0
Deprecatedn/a
do_action( 'switch_blog', $new_blog_id, $prev_blog_id, 'switch' )
Parameters: (3)
  • (int) $new_blog_id New blog ID.
    Required: Yes
  • (int) $prev_blog_id Previous blog ID.
    Required: Yes
  • (string) $context Additional context. Accepts 'switch' when called from switch_to_blog() or 'restore' when called from restore_current_blog().
    Required: Yes
Defined at:
Codex:

Fires when the blog is switched.





Source

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