switch_to_blog ( $new_blog, $deprecated = null )
- (int) $new_blog The id of the blog you want to switch to. Default: current blog
- (bool) $deprecated Deprecated argument
Defined at:Change Log:
- (true) Always returns True.
- Introduced in WordPress: 3.0.0
- Deprecated in WordPress: —
Switch the current blog.
This function is useful if you need to pull posts, or other information,
from other blogs. You can switch back afterwards using restore_current_blog().
Things that aren't switched:
- plugins. See #14941