Opened 10 years ago
Closed 10 years ago
#30639 closed enhancement (duplicate)
get_avatar custom image classes
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.0.1 |
Component: | General | Keywords: | |
Focuses: | ui | Cc: |
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)
#2
@
10 years ago
- Component changed from Formatting to General
- Focuses template removed
- Keywords dev-feedback removed
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to closed
- Summary changed from get_avatar cusom image classes to get_avatar custom image classes
- Type changed from feature request to enhancement
Duplicate of #27336.
Note: See
TracTickets for help on using
tickets.
Or we can add new filter for avatar classes, i think it will be more productive)