Args extra_attr gets removed
-
Hi there,
In get_avatar you can send $args to the get_avatar function. You can set $args[‘extra_attr’] for your extra attributes to the avatar.
$avatar = sprintf( "<img alt='%s' src='%s' srcset='%s' class='%s' height='%d' width='%d' %s/>", esc_attr( $args['alt'] ), esc_url( $url ), esc_attr( "$url2x 2x" ), esc_attr( join( ' ', $class ) ), (int) $args['height'], (int) $args['width'], $args['extra_attr'] );
It seems like the function
wpua_get_avatar_filter
does not take this into account and it seems like there are no ways of adding this to the <img> tag.
- The topic ‘Args extra_attr gets removed’ is closed to new replies.