Support » Fixing WordPress » Question about get_avatar and gravatar

  • I can get gravatars working fine using get_avatar, but my only problem is that the image it puts out doesn’t have an alt tag. I’m trying to keep my pages w3c valid, and for that to happen, all images have to have an alt tag.

    I read up on the get_avatar function in the wordpress codex, but I didn’t see anything on adding a alt value to the image that php outputs.

    Anyone know a way to fix this?

Viewing 1 replies (of 1 total)
  • whooami

    (@whooami)

    Member

    $avatar = "<img alt='' src='{$out}' class='avatar avatar-{$size}' height='{$size}' width='{$size}' />";
    } else {
    $avatar = "<img alt='' src='{$default}' class='avatar avatar-{$size} avatar-default' height='{$size}' width='{$size}' />";
    }

    a blank alt tag is valid. thats code right out of 2.6.2’s pluggable.php (get_avatar)

Viewing 1 replies (of 1 total)
  • The topic ‘Question about get_avatar and gravatar’ is closed to new replies.