-
-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch network when switching site #118
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently when using switch_to_blog, it doesn't also switch the network (site) id as well. Details of this issue can be found in a core ticket #25293. The issue is related to not wanting to add a database queries to the switching process. This is a valid problem. In core patch #40513, the switch_to_blog function will allow for WP_Site to be passed. This WP_Site will then be passed to 'switch_blog' action. This is a good for multi network. With the WP_Site we also get a property of network_id. A action could be added like this
This would also switch network if different from current network.
The text was updated successfully, but these errors were encountered: