[wp-trac] [WordPress Trac] #55022: inconsistency with get_current_network_id()

WordPress Trac noreply at wordpress.org
Tue Feb 1 07:29:54 UTC 2022

#55022: inconsistency with get_current_network_id()
 Reporter:  millerf01           |      Owner:  (none)
     Type:  defect (bug)        |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Networks and Sites  |    Version:  trunk
 Severity:  normal              |   Keywords:
  Focuses:                      |
 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

 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

 It boils down to  `global $current_site;` not being updated with

 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!

Ticket URL: <https://core.trac.wordpress.org/ticket/55022>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list