[wp-trac] [WordPress Trac] #32250: Ability to get_users() who have published posts

WordPress Trac noreply at wordpress.org
Thu May 14 13:46:29 UTC 2015


#32250: Ability to get_users() who have published posts
-------------------------+-----------------------
 Reporter:  joehoyle     |       Owner:  joehoyle
     Type:  enhancement  |      Status:  assigned
 Priority:  normal       |   Milestone:  4.3
Component:  Query        |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:
-------------------------+-----------------------

Comment (by boonebgorges):

 Related API repo tickets: https://github.com/WP-API/WP-API/issues/839,
 https://github.com/WP-API/WP-API/issues/297

 It would be nice to avoid using `'who'`, which is crusty both in
 conception and in execution #15871. `'who'` says "role" to me, and what
 we're looking for here is not directly related to roles. An argument like
 `'has_public_posts' => true` is better, but still very specific.
 `'has_public_posts' => get_post_types( array( 'public' => true ) )` is
 better still.

 It's a lot more work, but something like this would be of much broader
 use:

 {{{
 'post_count' => array(
     'operator' => '>=', // Default to '='?
     'post_types' => $post_types, // Default to array( 'post' )? Or all
 public types?
     'post_status' => $post_statuses, // Default to array( 'publish' ),
 ),
 }}}

 Obviously I don't want to overengineer this, but at least a 'post_count'
 argument feels like something that would be useful beyond just the
 specific needs of the API. Maybe the `'has_public_posts'` for now?

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


More information about the wp-trac mailing list