[wp-trac] [WordPress Trac] #29846: Document default arguments for WP_User_Query::prepare_query()

WordPress Trac noreply at wordpress.org
Fri Oct 3 15:28:46 UTC 2014


#29846: Document default arguments for WP_User_Query::prepare_query()
----------------------------------------+------------------------
 Reporter:  DrewAPicture                |       Owner:  tschutter
     Type:  defect (bug)                |      Status:  assigned
 Priority:  normal                      |   Milestone:  4.1
Component:  Users                       |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  good-first-bug needs-patch  |     Focuses:  docs
----------------------------------------+------------------------
Changes (by DrewAPicture):

 * keywords:  good-first-bug has-patch => good-first-bug needs-patch
 * milestone:  Awaiting Review => 4.1


Comment:

 Hi Tobias, thanks for the patch. [attachment:doc-wp-user-query-
 args.29846.diff] is a really great start!

 Just a few things:
 * We need to include the default values at the end of each argument
 description
 * Descriptions should extend about 80-120 characters per line, beyond
 that, wrap to the next line and space-align the subsequent lines with the
 first letter of the description
 * `$meta_compare` Need to list what values are accepted
 * `$include|exclude` - Both specifically accept an array of user IDs, so
 you should specify that
 * `$search` - The focus should be on what the value is more so than what
 it does. So for instance, start with what `$search` ''is'', followed by
 its significance
 * `$orderby` - When you're referencing other arguments in a description,
 use the `$`-type value instead of in single quotes, e.g. `$meta_key` vs
 `'meta_keya`
 * `$count_total` - Probably worth mentioning that if pagination isn't
 required, a query can be saved here by setting this to false

--
Ticket URL: <https://core.trac.wordpress.org/ticket/29846#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list