Closed tiborp closed 3 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' ) ) );
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 );
get_avatar( $id_or_email, $size, $default, $alt, $args );
Am I missing something?
Regards, Tibor
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
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