WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#10463 closed defect (bug) (fixed)

Allow _wp_get_comment_list to handle custom comment types

Reported by: aaroncampbell Owned by:
Milestone: 2.9 Priority: normal
Severity: normal Version: 2.8.1
Component: General Keywords: has-patch tested dev-feedback
Focuses: Cc:

Description

Plugins (like tweetbacks by Joost) can add custom comment types. While these can be easily used in most places, but not in _wp_get_comment_list(). Actually, on the edit-comments page you can use the admin_comment_types_dropdown filter to add additional comment types to the dropdown, but you can't actually filter by them.

I'm attaching a patch to fix it based on the existing usage where types is a string. However, I'm wondering if we should allow type to be either a string OR an array, which would allow you to specify multiple types.

Attachments (1)

10463.001.diff (2.0 KB) - added by aaroncampbell 5 years ago.

Download all attachments as: .zip

Change History (10)

aaroncampbell5 years ago

comment:1 aaroncampbell5 years ago

  • Keywords has-patch dev-feedback added

comment:2 aaroncampbell5 years ago

To test you'll need to have some comments in the comments table that have a comment_type other than the defaults (empty, 'pingback', and 'trackback'). If you have the tweetbacks plugin installed, you probably already have some with the comment_type 'tweetback'.

Once you have some comments in there to test with, go to /wp-admin/edit-comments.php?comment_type=____, filling in with your new comment_type.

comment:3 aaroncampbell5 years ago

  • Cc aaroncampbell added

comment:4 scribu5 years ago

Tested on the 2.8 branch with regular comments, pings, trackbacks and two custom types: 'foo' and 'bar' and it works as expected.

comment:5 aaroncampbell5 years ago

  • Keywords tested added

comment:6 azaozz5 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [11748]) Allow _wp_get_comment_list to handle custom comment types, props aaroncampbell, fixes #10463

comment:7 azaozz5 years ago

  • Milestone changed from 2.8.3 to 2.9

This slightly interferes with the Trash functionality.

comment:8 ryan5 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

This breaks comment search.

comment:9 ryan5 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [11954]) Special case comment type 'all'. Fixes comment search. fixes #10463

Note: See TracTickets for help on using tickets.