[wp-trac] [WordPress Trac] #35450: Relocate user's primary_blog setting to user profile

WordPress Trac noreply at wordpress.org
Wed Jan 13 21:59:04 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           |   Keywords:  2nd-opinion
  Focuses:  multisite        |
-----------------------------+-----------------------------
 In multisite installations, the `primary_blog` user setting is an anomaly:

 * It's located in `my-sites.php` vs. `user-edit.php` or `profile.php`.
 * It's both presented and conditionally saved in `choose_primary_blog()`
 vs. in `wp_insert_user()` along with the rest of a user's data & meta
 * It uses the `_user_option()` functions with the `$global` flag set to
 true, instead of `_user_meta()` functions. At a glance, the code makes
 this look like `primary_blog` might be a per-site setting, which wouldn't
 make any sense.

 I'd like to suggest we do a few things to improve this setting:

 * Move this setting into the user profile, and remove it from `my-
 sites.php`
 * Move the saving of the `primary_blog` user meta key into
 `wp_insert_user()` so it can added to a user a object
 * Introduce a new function, similar to `choose_primary_blog()`, for
 displaying this field in the user profile

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


More information about the wp-trac mailing list