#55022 closed defect (bug) (duplicate)
inconsistency with get_current_network_id()
Reported by: | millerf01 | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 6.0 |
Component: | Networks and Sites | Keywords: | |
Focuses: | Cc: |
Description
Hi there,
I am working on a project that has a multi-multisites installation.
I could not find any realted ticket so I decided to open one. Sorry if it duplicates...
And I found something that looks like an inconsistency to me:
If you have 2 network sites and switch from one to the other with switch_to_blog()
, get_current_network_id()
keeps returning the first network.
It boils down to global $current_site;
not being updated with switch_to_blog()
.
It looks like intended as I cannot expect this to have been overlooked, but I really don['t understand why....
Thanks a lot for the good work!
Change History (3)
#2
@
3 years ago
- Resolution set to duplicate
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.
Hello @millerf01
I strongly recommend that use the wp-multi-network plugin when using the multiple networks.
It is worth noting, that I flagged this issue in the plugin as well. However, in that plugin there is also a
switch_to_network
to function.I would start by installing that plugin and see if it fixes your issues.