[wp-trac] [WordPress Trac] #32250: Ability to get_users() who have published posts
WordPress Trac
noreply at wordpress.org
Sat May 16 19:30:20 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 joehoyle):
I'm +1 on not using `who` - `'has_public_posts' => get_post_types( array(
'public' => true ) )` seems somewhat of an anti-pattern -
`'has_published_posts' => get_post_types( array( 'public' => true ) )`
seems more aptly named. Or `has_published_posts_of_type` would be more
descriptive.
I like the `post_count` idea - however I'm not sure if that's half way to
a real query API for complex user querying based off post selection. I
don't know if the end goal could be use `WP_Query` ala `WP_Meta_Query` to
mixin the query with the user query.
I'd say for now, `has_published_posts` with an array of any post types
would be generic enough, without creating a another pseudo posts query
language separate to WP_Query.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32250#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list