Summery Summery
Switches the initialized roles and current user capabilities to another site.
Syntax Syntax
Parameters Parameters
- $new_site_id
-
(Required) New site ID.
- $old_site_id
-
(Required) Old site ID.
Source Source
File: wp-includes/ms-blogs.php
/** This filter is documented in wp-includes/ms-blogs.php */ do_action( 'switch_blog', $new_blog_id, $prev_blog_id, 'restore' ); // If we still have items in the switched stack, consider ourselves still 'switched'. $GLOBALS['switched'] = ! empty( $GLOBALS['_wp_switched_stack'] ); return true; } /** * Switches the initialized roles and current user capabilities to another site. *
Advertisement
Changelog Changelog
Version | Description |
---|---|
4.9.0 | Introduced. |