do_action( 'switch_blog', int $new_blog_id , int $prev_blog_id , string $context )
Fires when the blog is switched.
Parameters
- $new_blog_id
-
New blog ID.
- $prev_blog_id
-
Previous blog ID.
- $context
-
Additional context. Accepts 'switch' when called from switch_to_blog() or 'restore' when called from restore_current_blog().
Source
File: wp-includes/ms-blogs.php
Changelog
Version | Description |
---|---|
5.4.0 | The $context parameter was added. |
MU (3.0.0) | Introduced. MU (3.0.0) |