WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 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:

Description

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 4 years ago.
query filter for get_approved_comments()

Download all attachments as: .zip

Change History (3)

@kevinB4 years ago

query filter for get_approved_comments()

comment:1 @scribu4 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.

comment:2 @scribu4 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.