Core Function
View Source on Trac ↗ wp_switch_roles_and_user()
wp_switch_roles_and_user( mixed $new_site_id, mixed $old_site_id ) Switches the initialized roles and current user capabilities to another site.
Parameters 2 required
| Name / Type | Description |
|---|---|
| $new_site_id int | New site ID. Required |
| $old_site_id int | Old site ID. Required |
Return Value
(void)
No return value description available.
Function Information
Since Version
4.9.0
Source File
wp-includes/ms-blogs.php
Advertisement