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

WordPress Trac wp-trac at lists.automattic.com
Wed May 2 03:45:59 UTC 2012


#20597: Allow WP_Comment_Query::query to filter by category
-------------------------------------+------------------------------
 Reporter:  sambauers                |       Owner:
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Comments                 |     Version:  3.4
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |
-------------------------------------+------------------------------
Description changed by helenyhou:

Old description:

> The attached patch allows WP_Comment_Query::query to accept three
> additional arguments:
>
> * cat
> * category__in
> * category__not_in
>
> The resulting comments are then filtered by these category arguments as
> well as any other arguments.
>
> These arguments work the same way as their WP_Query counterparts.
>
> I would appreciate advice on the appropriateness of using INNER JOIN (as
> I have done here) to join in the taxonomy tables to the query.

New description:

 The attached patch allows WP_Comment_Query::query to accept three
 additional arguments:

 * `cat`
 * `category__in`
 * `category__not_in`

 The resulting comments are then filtered by these category arguments as
 well as any other arguments.

 These arguments work the same way as their `WP_Query` counterparts.

 I would appreciate advice on the appropriateness of using `INNER JOIN` (as
 I have done here) to join in the taxonomy tables to the query.

--

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20597#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list