Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/09/2015 09:25:56 AM (12 years ago)
Author:
djpaul
Message:

Core: use //www.gravatar.com for all image links.

www.gravatar.com supports HTTP and HTTPs, and by switching to protocol-relative URLs, we can simply the code by removing a number of is_ssl() checks.

Fixes #6135

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-avatars.php

    r9381 r9455  
    457457                }
    458458
    459                 // Set host based on if using ssl
    460                 $host = 'http://gravatar.com/avatar/';
    461                 if ( is_ssl() ) {
    462                         $host = 'https://secure.gravatar.com/avatar/';
    463                 }
     459                $host = '//www.gravatar.com/avatar/';
    464460
    465461                // Filter gravatar vars
    … …  
    11671163        // Use Gravatar's mystery man as fallback
    11681164        } else {
    1169                 if ( is_ssl() ) {
    1170                         $host = 'https://secure.gravatar.com';
    1171                 } else {
    1172                         $host = 'http://www.gravatar.com';
    1173                 }
    1174 
    1175                 $avatar = $host . '/avatar/00000000000000000000000000000000?d=mm&s=' . bp_core_avatar_full_width();
     1165                $avatar = '//www.gravatar.com/avatar/00000000000000000000000000000000?d=mm&s=' . bp_core_avatar_full_width();
    11761166        }
    11771167
    … …  
    12031193        // Use Gravatar's mystery man as fallback
    12041194        } else {
    1205                 if ( is_ssl() ) {
    1206                         $host = 'https://secure.gravatar.com';
    1207                 } else {
    1208                         $host = 'http://www.gravatar.com';
    1209                 }
    1210 
    1211                 $avatar = $host . '/avatar/00000000000000000000000000000000?d=mm&s=' . bp_core_avatar_thumb_width();
     1195                $avatar = '//www.gravatar.com/avatar/00000000000000000000000000000000?d=mm&s=' . bp_core_avatar_thumb_width();
    12121196        }
    12131197
Note: See TracChangeset for help on using the changeset viewer.