hi,
i have the same problem, where exactly did paste $alt=false
function get_avatar( $avatar, $id_or_email, $size, $default='', $alt ) {
if ( is_numeric( $id_or_email ) ) {
$email = get_userdata( $id_or_email )->user_email;
$user_id = (int) $id_or_email;
}
elseif ( is_object( $id_or_email ) ) {
$email = $id_or_email->comment_author_email;
$user_id = (int) $id_or_email->user_id;
}
elseif ( is_string( $id_or_email ) && ( $user = get_user_by( 'email', $id_or_email ) ) ) {
$email = $id_or_email;
$user_id = $user->ID;
}
// special exception for our 10up friends
// https://www.ads-software.com/extend/plugins/simple-local-avatars/
// (and check hook suffix while we're at it, if the current user has a simple_local_avatar, it'll throw the list off)
$local_avatars = get_user_meta( $user_id, 'simple_local_avatar', true );
if ( ! empty( $local_avatars ) && ( isset( $GLOBALS['hook_suffix'] ) && $GLOBALS['hook_suffix'] != 'options-discussion.php' ) ) {
remove_filter( 'get_avatar', array( &$this, 'get_avatar' ), 88, 5 );
return $avatar;
}
// since we're hooking directly into get_avatar,
// we need to make sure another avatar hasn't been selected
/* Once upon a time was needed for Mr WordPress. Do we care?
$direct = get_option('avatar_default');
if ( strpos( $default, $direct ) !== false ) {
$email = empty( $email ) ? 'nobody' : md5( $email );
// in rare cases were there is no email associated with the comment (like Mr WordPress)
// we have to work around a bit to insert the custom avatar
// 'www' version for WP2.9 and older
if ( strpos( $default, 'https://0.gravatar.com/avatar/') === 0 || strpos( $default, 'https://www.gravatar.com/avatar/') === 0 )
$avatar = str_replace( $default, $direct, $avatar );
}
*/
// hack the correct size parameter back in, if necessary
$avatar = str_replace( '%size%', $size, $avatar );
$avatar = str_replace( urlencode('%size%'), $size, $avatar );
return $avatar;
}