Changes between Initial Version and Version 1 of Ticket #38645
- Timestamp:
- 11/03/2016 06:15:44 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #38645 – Description
initial v1 3 3 The current regression means if a plugin was keeping its own copy of the `$wp_roles` global around (maybe as a property in a class, or for some other convenience sake) then then newly created `$wp_roles` global no longer points to that same copy. (See #23016 for more details & examples.) 4 4 5 History lesson: previous to that changeset, the `reinit()` method was used to update the roles for the witched site. That method was largely a copy of the `_init()` method, and was purpose built for blog switching.5 History lesson: previous to that changeset, the `reinit()` method was used to update the roles for the switched site. That method was largely a copy of the `_init()` method, and was purpose built for blog switching. 6 6 7 7 ---- … … 11 11 We can take inspiration from the `WP_User::for_blog()` method, and introduce a `for_blog()` method to the `WP_Roles` class to basically do the exact same thing in the exact same way. We can make alterations to the blog switching functions to update the `$wp_roles` and `$current_user->roles` values in unison. 12 12 13 Architecturally, I think it makes sense to call these methods together, but not have one call the other all the time, because there may a reason or time where that control is welcome, and marrying them together now makes divorcing them later difficult.13 Architecturally, I think it makes sense to call these methods together, but not have one call the other all the time, because there may be a reason or time where that control is welcome, and marrying them together now makes divorcing them later difficult. 14 14 15 15 Patch imminent.