WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 8 months ago

#20597 new enhancement

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

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

Description

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.