WordPress.org

Make WordPress Core

Changeset 10461


Ignore:
Timestamp:
01/29/2009 05:58:16 PM (11 years ago)
Author:
ryan
Message:

Use secure.gravatar.com for SSL avatar requests. fixes #8988 for trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/pluggable.php

    r10455 r10461  
    15091509    }
    15101510
     1511    if ( is_ssl() )
     1512        $host = 'https://secure.gravatar.com';
     1513    else
     1514        $host = 'http://www.gravatar.com';
     1515
    15111516    if ( 'mystery' == $default )
    1512         $default = "http://www.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s={$size}"; // ad516503a11cd5ca435acc9bb6523536 == md5('unknown@gravatar.com')
     1517        $default = "$host/avatar/ad516503a11cd5ca435acc9bb6523536?s={$size}"; // ad516503a11cd5ca435acc9bb6523536 == md5('unknown@gravatar.com')
    15131518    elseif ( 'blank' == $default )
    15141519        $default = includes_url('images/blank.gif');
     
    15161521        $default = '';
    15171522    elseif ( 'gravatar_default' == $default )
    1518         $default = "http://www.gravatar.com/avatar/s={$size}";
     1523        $default = "$host/avatar/s={$size}";
    15191524    elseif ( empty($email) )
    1520         $default = "http://www.gravatar.com/avatar/?d=$default&s={$size}";
     1525        $default = "$host/avatar/?d=$default&s={$size}";
    15211526    elseif ( strpos($default, 'http://') === 0 )
    15221527        $default = add_query_arg( 's', $size, $default );
    15231528
    15241529    if ( !empty($email) ) {
    1525         $out = 'http://www.gravatar.com/avatar/';
     1530        $out = "$host/avatar/";
    15261531        $out .= md5( strtolower( $email ) );
    15271532        $out .= '?s='.$size;
Note: See TracChangeset for help on using the changeset viewer.