[wp-trac] [WordPress Trac] #25293: Switch_to_blog not switching the siteid

WordPress Trac noreply at wordpress.org
Wed Sep 7 21:07:31 UTC 2016


#25293: Switch_to_blog not switching the siteid
------------------------------------------------+--------------------------
 Reporter:  Rahe                                |       Owner:
     Type:  defect (bug)                        |      Status:  new
 Priority:  normal                              |   Milestone:  Future
Component:  Networks and Sites                  |  Release
 Severity:  minor                               |     Version:  3.0
 Keywords:  has-patch dev-feedback 2nd-opinion  |  Resolution:
                                                |     Focuses:  multisite
------------------------------------------------+--------------------------

Comment (by flixos90):

 Replying to [comment:14 tfrommen]:
 > What you described as a ''breakpoint'' is exactly what is handled by an
 '''instance''' of a `NetworkState` like I proposed, no?

 Yes, indeed the above approach is an alternative to your `NetworkState`
 class.

 > So breakpoints are a meta layer for network states - which is why
 breakpoints shouldn't be handled by the network state class. The latter
 just has to provide/be an immutable snapshot with the ability to ''apply''
 it (i.e., restore).

 I would rather see the `WP_State` as a global controller of the switched
 state. A breakpoint in my opinion is indeed a snapshot of the current
 state, and that snapshot can be restored by the controller.

 Anyway, I think we should, for the sake of this ticket, break out the
 `set_breakpoint()` and `restore_breakpoint()` methods plus the related
 `$breakpoints` property from the above patch and then continue discussion
 on the approach in #37958.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/25293#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list