Make WordPress Core

Opened 9 years ago

Last modified 2 years ago

#20597 new enhancement

Allow WP_Comment_Query::query to filter by category — at Initial Version

Reported by: sambauers Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.4
Component: Comments Keywords: needs-patch needs-unit-tests
Focuses: Cc:


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

  • cat
  • categoryin
  • categorynot_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.

Change History (1)

Note: See TracTickets for help on using tickets.