strangerstudios / basic-user-avatars

Add an avatar upload field on frontend pages and on the Edit Profile screen so users and admins can manage custom profile pictures without Gravatar.
https://wordpress.org/plugins/basic-user-avatars/
39 stars 34 forks source link

Missing argument for custom class? #20

Closed tiborp closed 3 years ago

tiborp commented 8 years ago

Hi Jared,

Thanks for this! I truely hope this will make it into core some day....I have one issue though;

I might be wrong, but it seems I am missing the argument to add a custom class to the Avatar output in your function:

public function get_avatar( $avatar = '', $id_or_email, $size = 96, $default = '', $alt = false )

So when using get_avatar( get_the_author_meta( 'user_email' ), 120, null, get_the_author_meta( 'display_name' ), array( 'class' => array( 'alignleft' ) ) );

the custom class is not added on the custom Avatar. It does get added when using the default avatar from WP.

The WP function has 5 arguments: get_avatar( $id_or_email, $size, $default, $alt, $args );

Am I missing something?

Regards, Tibor

kimcoleman commented 3 years ago

There is an open PR that will add this parameter to the get_avatar filter. Please refer to this Pull Request to be merged for follow up: https://github.com/strangerstudios/Basic-User-Avatars/pull/47