[wp-trac] [WordPress Trac] #20597: Allow WP_Comment_Query::query to filter by category

WordPress Trac noreply at wordpress.org
Fri Oct 24 02:14:04 UTC 2014


#20597: Allow WP_Comment_Query::query to filter by category
-------------------------+-----------------------------
 Reporter:  sambauers    |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Future Release
Component:  Comments     |     Version:  3.4
 Severity:  normal       |  Resolution:
 Keywords:  needs-patch  |     Focuses:
-------------------------+-----------------------------
Changes (by boonebgorges):

 * keywords:  has-patch needs-testing => needs-patch
 * milestone:  Awaiting Review => Future Release


Comment:

 Thanks for the patch, sambauers.

 Adding these table joins into `WP_Comment_Query` is pretty unappealing. In
 `WP_Query`, all (or at least most) of the category query logic has been
 moved to `WP_Tax_Query`. So, if we were going to add something like this,
 we'd want to do it with `WP_Tax_Query` instead of by building the SQL like
 this. I guess the relevant argument for `WP_Comment_Query` would then be
 something like 'post_tax_query', since we would want to leave the door
 open for putting taxonomy on comments at some point in the future.

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


More information about the wp-trac mailing list