Make WordPress Core

Opened 12 years ago

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


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 12 years ago.

Download all attachments as: .zip

Change History (10)

#1 @aaroncampbell
12 years ago

  • Keywords has-patch dev-feedback added

#2 @aaroncampbell
12 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.

#3 @aaroncampbell
12 years ago

  • Cc aaroncampbell added

#4 @scribu
12 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.

#5 @aaroncampbell
12 years ago

  • Keywords tested added

#6 @azaozz
12 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

#7 @azaozz
12 years ago

  • Milestone changed from 2.8.3 to 2.9

This slightly interferes with the Trash functionality.

#8 @ryan
12 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

This breaks comment search.

#9 @ryan
12 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.