Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#17024 closed enhancement (duplicate)

get_approved_comments() is not filterable

Reported by: kevinB Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Comments Keywords: needs-patch
Focuses: Cc:


function get_approved_comments(), used in comments-popup.php, is not filterable. Plugins may use existing WP_Query and/or WP_Comment_Query hooks to filter the comments result set, and need the ability to filter this function accordingly.

The corresponding patch adds query filter 'get_approved_comments_query'

Attachments (1)

get-approved-comments_filter_3.2.patch (831 bytes) - added by kevinB 5 years ago.
query filter for get_approved_comments()

Download all attachments as: .zip

Change History (3)

5 years ago

query filter for get_approved_comments()

#1 @scribu
5 years ago

  • Keywords needs-patch added; has-patch removed
  • Summary changed from add hook for get_approved_comments to get_approved_comments() is not filterable

Same suggestion as for #17020: Make a patch that uses get_comments() rather than introducing a new filter.

#2 @scribu
5 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Actually, going to close as dupe of #17020, since it's essentially the same problem.

Note: See TracTickets for help on using tickets.