Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#30639 closed enhancement (duplicate)

get_avatar custom image classes

Reported by: tigusigalpa Owned by:
Priority: normal Milestone:
Component: General Version: 4.0.1
Severity: normal Keywords:
Cc: Focuses: ui

Description

Hi, guys!
I just think we need to allow add a new classes to image returned by get_avatar() function at /wp-includes/pluggable.php. So my solution is to add something like

do_action('custom_avatar_class');

so the final code is:

$avatar = "<img alt='{$safe_alt}' src='{$out}' class='avatar avatar-{$size} photo";
do_action('custom_avatar_class');
$avatar .= "' height='{$size}' width='{$size}' />";

I think it will helps for theme developers to customize avatar image.

Change History (2)

#1 @tigusigalpa
12 years ago

  • Keywords dev-feedback added

Or we can add new filter for avatar classes, i think it will be more productive)

#2 @SergeyBiryukov
12 years ago

  • Component FormattingGeneral
  • Focuses template removed
  • Keywords dev-feedback removed
  • Milestone Awaiting Review
  • Resolutionduplicate
  • Status newclosed
  • Summary get_avatar cusom image classesget_avatar custom image classes
  • Type feature requestenhancement

Duplicate of #27336.

Note: See TracTickets for help on using tickets.