[wp-trac] [WordPress Trac] #31588: Some params missing docs in `wp_insert_user()`; `$userdata` handled unexpectedly

WordPress Trac noreply at wordpress.org
Tue Mar 10 23:29:06 UTC 2015


#31588: Some params missing docs in `wp_insert_user()`; `$userdata` handled
unexpectedly
--------------------------+-----------------------------
 Reporter:  dlh           |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Users         |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:  docs          |
--------------------------+-----------------------------
 The current docs for `wp_insert_user()` include some parameters no longer
 accepted by default, and a few other parameters are missing.

 The attached patch:

 * removes the old default contact methods from the `$userdata` hash
 notation;
 * adds docs for `$description`, `$comment_shortcuts`, `$admin_color`,
 `$use_ssl`, and `$show_admin_bar_front`;
 * fixes a typo in the short description, and generalizes the note in the
 long description about available filters so it doesn't have to keep up
 with every new one;
 * tries to clarify `$first_name` and `$last_name`, if I understood them
 correctly.

 The patch also makes a related change to the handling of
 `$comment_shortcuts`.

 Currently, if `$userdata['comment_shortcuts'] = true`, the meta value will
 be `1`. But `enqueue_comment_hotkeys_js()` checks for the string `'true'`,
 which is also what `edit_user()` saves.

 With this change, the meta value would be `'true'` if
 `$userdata['comment_shortcuts']` is any non-empty value except `'false'`.

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


More information about the wp-trac mailing list