do_action( 'switch_blog', int $new_blog_id, int $prev_blog_id, string $context )

Fires when the blog is switched.

Parameters Parameters


(int) New blog ID.


(int) Previous blog ID.


(string) Additional context. Accepts 'switch' when called from switch_to_blog() or 'restore' when called from restore_current_blog().

Top ↑

Source Source

File: wp-includes/ms-blogs.php

View on Trac

Top ↑

Changelog Changelog

Version Description
MU (3.0.0) MU (3.0.0)
5.4.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.