[wp-trac] [WordPress Trac] #38645: Improve roles reinit when switching between sites
WordPress Trac
noreply at wordpress.org
Fri Nov 4 13:37:22 UTC 2016
#38645: Improve roles reinit when switching between sites
-------------------------------------------+------------------------------
Reporter: johnjamesjacoby | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Role/Capability | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch needs-testing early | Focuses: multisite
-------------------------------------------+------------------------------
Comment (by johnjamesjacoby):
Replying to [comment:8 flixos90]:
> I agree with @knutsp that we should use `for_site()`. We shouldn't be
locked in by the old naming conventions, so everything new should be
properly named. Eventually we will be able to rename many of the old
things over (long) time, but introducing new functionality in that way
seems wrong to me.
Then we need to rename `WP_User::for_blog()`. The inconsistency would be
worse DUX than the mild inaccuracy, because anyone who does go digging
will think for_blog and for_site do different things.
> Another issue that just came to mind is whether that function should
exist in that form at all: Let's imagine `WP_Roles` is extended by a
future `WP_Network_Roles`, what would a `for_site()` / `for_blog()` method
do? It might be a better idea to find a more generic name.
If we extend `WP_Roles`, it will still need some form of site-switching
method, even at a global or network level.
Right now there is a regression to fix and existing approach to follow.
I'd like to fix the problem without getting caught up on method names
(which is worth scrutinizing in multisite, but it's a very dead horse by
now.) If we want to rename things, we can do that at any time in the
future.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38645#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list