WordPress.org

Ready to get started?Download WordPress

Forums

Top Commentators Widget
Gravatar images redirecting? (2 posts)

  1. Cartman
    Member
    Posted 2 years ago #

    While trying to optimize my site, I ran it through Pingdom Tools, where it showed 10 redirect chains, all generated by this widget.

    The widget will output this:
    http://www.gravatar.com/avatar.php?gravatar_id=0b0d0e63a1800b3ff3cc0de5dcf9b7f6&size=35&default=mm

    And that gets redirected to:
    http://www.gravatar.com/avatar/0b0d0e63a1800b3ff3cc0de5dcf9b7f6?size=35&default=mm

    Is there a simple change that can be made to the code to automatically default to the correct URL? Thanks.

    http://wordpress.org/extend/plugins/top-commentators-widget/

  2. Lorna Timbah
    Member
    Plugin Author

    Posted 2 years ago #

    At line 181 of topcommentators_widget.php:
    $writeList .= '<img class="tcwGravatar" src="http://www.gravatar.com/avatar.php?gravatar_id='.$image.'&size='.$avatarSize.'&default='.$defavatar.'" alt ="'.$k->comment_author.'" title="'.$k->comment_author.'" /> ';

    Change it to:
    $writeList .= '<img class="tcwGravatar" src="http://www.gravatar.com/avatar/'.$image.'?size='.$avatarSize.'&default='.$defavatar.'" alt ="'.$k->comment_author.'" title="'.$k->comment_author.'" /> ';

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic