[wp-trac] [WordPress Trac] #30639: get_avatar cusom image classes

WordPress Trac noreply at wordpress.org
Tue Dec 9 08:28:37 UTC 2014


#30639: get_avatar cusom image classes
-----------------------------+-----------------------------
 Reporter:  tigusigalpa      |      Owner:
     Type:  feature request  |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Formatting       |    Version:  4.0.1
 Severity:  normal           |   Keywords:
  Focuses:  ui, template     |
-----------------------------+-----------------------------
 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.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30639>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list