Skip to content

Commit

Permalink
Merge pull request #1179 from Automattic/add/gravatar-alt
Browse files Browse the repository at this point in the history
Output alt attribute in legacy templating  gravatar image
  • Loading branch information
westonruter committed May 29, 2018
2 parents ab199da + a319854 commit 8a48244
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/meta-author.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?php if ( $post_author ) : ?>
<div class="amp-wp-meta amp-wp-byline">
<?php if ( function_exists( 'get_avatar_url' ) ) : ?>
<amp-img src="<?php echo esc_url( get_avatar_url( $post_author->user_email, array( 'size' => 24 ) ) ); ?>" width="24" height="24" layout="fixed"></amp-img>
<amp-img src="<?php echo esc_url( get_avatar_url( $post_author->user_email, array( 'size' => 24 ) ) ); ?>" alt="<?php echo esc_attr( $post_author->display_name ); ?>" width="24" height="24" layout="fixed"></amp-img>
<?php endif; ?>
<span class="amp-wp-author author vcard"><?php echo esc_html( $post_author->display_name ); ?></span>
</div>
Expand Down

0 comments on commit 8a48244

Please sign in to comment.