Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#26944 closed enhancement (fixed)

Dashboard "At a glance" widget ignores get_avatar_comment_types filter

Reported by: zodiac1978's profile zodiac1978 Owned by: ocean90's profile ocean90
Milestone: 3.9 Priority: normal
Severity: minor Version: 3.8
Component: Comments Keywords: has-patch dev-feedback
Focuses: ui Cc:


The "At a Glance" dashboard widget does not show gravatars for anything which is not a comment.

But there can be a new different comment_type added:

Because get_avatar has its own comment_type check we can move the get_avatar out of the if/else/endif. So we can add a new comment_type with gravatars per get_avatar_comment_types filter.

Attachments (1)

26944.diff (852 bytes) - added by zodiac1978 10 years ago.
Moved get_avatar line from dashboard widget out of if-block

Download all attachments as: .zip

Change History (8)

10 years ago

Moved get_avatar line from dashboard widget out of if-block

#1 @zodiac1978
10 years ago

  • Keywords has-patch added
  • Severity changed from normal to minor

#2 @zodiac1978
10 years ago

  • Keywords dev-feedback added

#3 follow-up: @ocean90
10 years ago

  • Component changed from Administration to Comments
  • Focuses ui added
  • Keywords dev-feedback removed
  • Milestone changed from Awaiting Review to 3.9
  • Type changed from defect (bug) to enhancement

Looks good. But it's more an enhancement.

#4 in reply to: ↑ 3 @zodiac1978
10 years ago

Replying to ocean90:

Looks good. But it's more an enhancement.

I think it is a bug, because if you add gravatar comment_types per filter you should get avatars for this comment_type in all places. But the widget does not show them.

As an alternative the widget could use the same way as the get_avatar function in pluggable.php to check how to handle the comment (e.g. use the same filter to add comment_types, check for ID/email instead of just checking comment_type).

#5 @zodiac1978
10 years ago

  • Keywords dev-feedback added

This ticket was mentioned in IRC in #wordpress-dev by ocean90. View the logs.

10 years ago

#7 @ocean90
10 years ago

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

In 27384:

"At a Glance" widget: Move get_avatar() line out of if-block.

This allows you to show avatars for custom comment types via the get_avatar_comment_types filter.

props zodiac1978.
fixes #26944.

Note: See TracTickets for help on using tickets.