[wp-trac] [WordPress Trac] #31383: Add WP_Tax_Query support to WP_User_Query

WordPress Trac noreply at wordpress.org
Thu Feb 19 20:32:15 UTC 2015


#31383: Add WP_Tax_Query support to WP_User_Query
-----------------------------+-----------------------------
 Reporter:  desrosj          |       Owner:
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Future Release
Component:  Query            |     Version:  trunk
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:
-----------------------------+-----------------------------
Changes (by boonebgorges):

 * milestone:  Awaiting Review => Future Release


Comment:

 This would be easy to add, but I'm somewhat wary. It's possible to assign
 taxonomies and terms to users, but there's no explicit support for that in
 the system - you kinda have to hack it. Adding a 'tax_query' parameter
 would be like an official endorsement for user taxonomies, without
 actually having them fully implemented.

 Maybe we can use this ticket to think about some of the core changes that
 would be necessary to introduce minimal support for user taxonomies. Off
 the top of my head:
 - When you register a taxonomy with 'user' as the object type, the
 taxonomy's UI should appear under the 'Users' menu in the Dashboard
 - We should examine whether we need a user-specific generic
 'update_count_callback', along the lines of '_update_post_term_count()'
 for post types. (I think we probably would, because we'd want, eg, spammed
 users to be excluded from term counts.)
 - Built-in UI for managing user tax terms on profile.php (maybe?)
 - Built-in support for user taxonomy archives. So example.com/user_tax/foo
 would show a list of users with the 'foo' term in the 'user_tax' taxonomy.
 (another maybe - not sure if this is desirable in core, or necessary for a
 first pass)

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


More information about the wp-trac mailing list