[wp-trac] [WordPress Trac] #35450: Relocate user's primary_blog setting to user profile
WordPress Trac
noreply at wordpress.org
Mon Sep 12 11:32:18 UTC 2016
#35450: Relocate user's primary_blog setting to user profile
-----------------------------+------------------------------
Reporter: johnjamesjacoby | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Users | Version: 3.0
Severity: normal | Resolution:
Keywords: | Focuses: multisite
-----------------------------+------------------------------
Comment (by flixos90):
My initial thought would be that the setting should remain in the "My
Sites" screen. While it's stored as user meta, it belongs to that "My
Sites" screen since this gives the setting more context than if it was in
the user profile. However the improvement @jeremyfelt proposed (instead of
a dropdown, add "Make this my primary site" as a row action to each site
item listed) makes sense.
Regarding switching from `*_user_option()` to `*_user_meta()`, I'm not
sure about that. I think there is a semantic difference between the two
although we store both as meta internally. As meta I would understand
further user data while as option I would understand user preferences
(mainly for the admin), plus it takes care of prefixing the key with the
current site ID. Actually I think the `choose_primary_blog()` does it
semantically wrong as it should rather call `update_user_option()` instead
of `update_user_meta()`.
My approach would be rather than mixing "user data" and "user settings"
together, we should clearly separate the two anywhere it's currently fuzzy
(like in `choose_primary_blog()`).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35450#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list