WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 2 weeks ago

#17020 closed enhancement (wontfix)

Some comment queries are not filterable

Reported by: kevinB Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: Comments Keywords: needs-refresh needs-unit-tests
Focuses: administration Cc:

Description

Although WP_Comment_Query::query() is fully filterable, some supplemental comment queries are still unfilterable. The submitted patch adds the following hooks:

  • function get_approved_comments() - query filter 'get_approved_comments_query'
  • function wp_dashboard_recent_comments() - query filter 'dashboard_recent_comments_query'

Attachments (3)

comment-filters_3.2.patch (1.9 KB) - added by kevinB 8 years ago.
query filters for wp_dashboard_recent_comments() and get_approved_comments()
get-approved-comments-3.2.diff (745 bytes) - added by adamsewell 8 years ago.
Modifies the get_approved_comments function to use get_comments
dashboard-recent-comments-3.2.diff (1.9 KB) - added by adamsewell 8 years ago.
Modifies the wp_dashboard_recent_comments function to use get_comments - updated to remove reference to $wpdb

Download all attachments as: .zip

Change History (13)

@kevinB
8 years ago

query filters for wp_dashboard_recent_comments() and get_approved_comments()

#1 @scribu
8 years ago

-1 on 'dashboard_recent_comments_query'. Just like in #17026, we should try to use get_comments(), instead of a direct query.

Don't know what to say about 'pending_comments_query'.

#2 @scribu
8 years ago

  • Keywords has-patch removed
  • Summary changed from add hooks for comment queries to Some comment queries are not filterable

#3 @adamsewell
8 years ago

  • Keywords has-patch added

#4 @adamsewell
8 years ago

  • Version set to 3.2

@adamsewell
8 years ago

Modifies the get_approved_comments function to use get_comments

@adamsewell
8 years ago

Modifies the wp_dashboard_recent_comments function to use get_comments - updated to remove reference to $wpdb

#5 @adamsewell
8 years ago

  • Cc adamsewell added

#6 @scribu
8 years ago

  • Milestone changed from Awaiting Review to Future Release
  • Version changed from 3.2 to 3.1

#7 @chriscct7
4 years ago

  • Keywords needs-refresh added; has-patch removed

wp_dashboard_recent_comments was fixed in git-svn-id: http://core.svn.wordpress.org/trunk@26055 1a063a9b-81f0-0310-95a4-ce76da25c4cd (no trac ticket found for it). r26055 The other two still need to be fixed.

Last edited 3 years ago by markjaquith (previous) (diff)

#8 @boonebgorges
4 years ago

  • Keywords needs-unit-tests added

#9 @chriscct7
3 years ago

  • Focuses administration added

#10 @iseulde
2 weeks ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to closed

This ticket has not seen any activity in over *two* years, so I'm closing it as "wontfix".

The ticket may lack decisiveness, may have become irrelevant, or may not have gathered enough interest.

If you think this ticket does deserve some attention again, feel free to reopen.

For bugs, it would be great if you could provide updated steps to reproduce against the latest version of WordPress (5.0.2 at the time of writing). Remember images or a video can be superior to explain a problem. At the very least, quickly test again to make sure the bug still exists.

If it’s an enhancement or feature, some extra motivation may help.

Thank you for your contributions to WordPress! <3

Note: See TracTickets for help on using tickets.