Skip to:
Content

BuddyPress.org

Changeset 9455


Ignore:
Timestamp:
02/09/2015 09:25:56 AM (9 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

Location:
trunk
Files:
4 edited

Legend:

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

    r9429 r9455  
    645645            <ul class="wp-people-group " id="wp-people-group-project-leaders">
    646646                <li class="wp-person" id="wp-person-johnjamesjacoby">
    647                     <a href="http://profiles.wordpress.org/johnjamesjacoby"><img src="http://0.gravatar.com/avatar/81ec16063d89b162d55efe72165c105f?s=60" class="gravatar" alt="John James Jacoby" /></a>
     647                    <a href="http://profiles.wordpress.org/johnjamesjacoby"><img src="//www.gravatar.com/avatar/81ec16063d89b162d55efe72165c105f?s=60" class="gravatar" alt="John James Jacoby" /></a>
    648648                    <a class="web" href="http://profiles.wordpress.org/johnjamesjacoby">John James Jacoby</a>
    649649                    <span class="title"><?php _e( 'Project Lead', 'buddypress' ); ?></span>
    650650                </li>
    651651                <li class="wp-person" id="wp-person-boonebgorges">
    652                     <a href="http://profiles.wordpress.org/boonebgorges"><img src="http://0.gravatar.com/avatar/9cf7c4541a582729a5fc7ae484786c0c?s=60" class="gravatar" alt="Boone B. Gorges" /></a>
     652                    <a href="http://profiles.wordpress.org/boonebgorges"><img src="//www.gravatar.com/avatar/9cf7c4541a582729a5fc7ae484786c0c?s=60" class="gravatar" alt="Boone B. Gorges" /></a>
    653653                    <a class="web" href="http://profiles.wordpress.org/boonebgorges">Boone B. Gorges</a>
    654654                    <span class="title"><?php _e( 'Lead Developer', 'buddypress' ); ?></span>
    655655                </li>
    656656                <li class="wp-person" id="wp-person-djpaul">
    657                     <a href="http://profiles.wordpress.org/djpaul"><img src="http://0.gravatar.com/avatar/3bc9ab796299d67ce83dceb9554f75df?s=60" class="gravatar" alt="Paul Gibbs" /></a>
     657                    <a href="http://profiles.wordpress.org/djpaul"><img src="//www.gravatar.com/avatar/3bc9ab796299d67ce83dceb9554f75df?s=60" class="gravatar" alt="Paul Gibbs" /></a>
    658658                    <a class="web" href="http://profiles.wordpress.org/djpaul">Paul Gibbs</a>
    659659                    <span class="title"><?php _e( 'Lead Developer', 'buddypress' ); ?></span>
     
    664664            <ul class="wp-people-group " id="wp-people-group-core-team">
    665665                <li class="wp-person" id="wp-person-r-a-y">
    666                     <a href="http://profiles.wordpress.org/r-a-y"><img src="http://0.gravatar.com/avatar/3bfa556a62b5bfac1012b6ba5f42ebfa?s=60" class="gravatar" alt="Ray" /></a>
     666                    <a href="http://profiles.wordpress.org/r-a-y"><img src="//www.gravatar.com/avatar/3bfa556a62b5bfac1012b6ba5f42ebfa?s=60" class="gravatar" alt="Ray" /></a>
    667667                    <a class="web" href="http://profiles.wordpress.org/r-a-y">Ray</a>
    668668                    <span class="title"><?php _e( 'Core Developer', 'buddypress' ); ?></span>
    669669                </li>
    670670                <li class="wp-person" id="wp-person-imath">
    671                     <a href="http://profiles.wordpress.org/imath"><img src="http://0.gravatar.com/avatar/8b208ca408dad63888253ee1800d6a03?s=60" class="gravatar" alt="Mathieu Viet" /></a>
     671                    <a href="http://profiles.wordpress.org/imath"><img src="//www.gravatar.com/avatar/8b208ca408dad63888253ee1800d6a03?s=60" class="gravatar" alt="Mathieu Viet" /></a>
    672672                    <a class="web" href="http://profiles.wordpress.org/imath">Mathieu Viet</a>
    673673                    <span class="title"><?php _e( 'Core Developer', 'buddypress' ); ?></span>
    674674                </li>
    675675                <li class="wp-person" id="wp-person-mercime">
    676                     <a href="http://profiles.wordpress.org/mercime"><img src="http://0.gravatar.com/avatar/fae451be6708241627983570a1a1817a?s=60" class="gravatar" alt="Mercime" /></a>
     676                    <a href="http://profiles.wordpress.org/mercime"><img src="//www.gravatar.com/avatar/fae451be6708241627983570a1a1817a?s=60" class="gravatar" alt="Mercime" /></a>
    677677                    <a class="web" href="http://profiles.wordpress.org/mercime">Mercime</a>
    678678                    <span class="title"><?php _e( 'Navigator', 'buddypress' ); ?></span>
    679679                </li>
    680680                <li class="wp-person" id="wp-person-dcavins">
    681                     <a href="http://profiles.wordpress.org/dcavins"><img src="http://0.gravatar.com/avatar/a5fa7e83d59cb45ebb616235a176595a?s=60" class="gravatar" alt="David Cavins" /></a>
     681                    <a href="http://profiles.wordpress.org/dcavins"><img src="//www.gravatar.com/avatar/a5fa7e83d59cb45ebb616235a176595a?s=60" class="gravatar" alt="David Cavins" /></a>
    682682                    <a class="web" href="http://profiles.wordpress.org/dcavins">David Cavins</a>
    683683                    <span class="title"><?php _e( 'Core Developer', 'buddypress' ); ?></span>
    684684                </li>
    685685                <li class="wp-person" id="wp-person-tw2113">
    686                     <a href="http://profiles.wordpress.org/tw2113"><img src="http://0.gravatar.com/avatar/a5d7c934621fa1c025b83ee79bc62366?s=60" class="gravatar" alt="Michael Beckwith" /></a>
     686                    <a href="http://profiles.wordpress.org/tw2113"><img src="//www.gravatar.com/avatar/a5d7c934621fa1c025b83ee79bc62366?s=60" class="gravatar" alt="Michael Beckwith" /></a>
    687687                    <a class="web" href="http://profiles.wordpress.org/tw2113">Michael Beckwith</a>
    688688                    <span class="title"><?php _e( 'Core Developer', 'buddypress' ); ?></span>
     
    693693            <ul class="wp-people-group " id="wp-people-group-rockstars">
    694694                <li class="wp-person" id="wp-person-henry-wright">
    695                     <a href="http://profiles.wordpress.org/henry.wright"><img src="http://0.gravatar.com/avatar/0da2f1a9340d6af196b870f6c107a248?s=60" class="gravatar" alt="Henry Wright" /></a>
     695                    <a href="http://profiles.wordpress.org/henry.wright"><img src="//www.gravatar.com/avatar/0da2f1a9340d6af196b870f6c107a248?s=60" class="gravatar" alt="Henry Wright" /></a>
    696696                    <a class="web" href="http://profiles.wordpress.org/henry.wright">Henry Wright</a>
    697697                </li>
    698698                <li class="wp-person" id="wp-person-danbp">
    699                     <a href="http://profiles.wordpress.org/danbp"><img src="http://0.gravatar.com/avatar/0deae2e7003027fbf153500cd3fa5501?s=60" class="gravatar" alt="danbp" /></a>
     699                    <a href="http://profiles.wordpress.org/danbp"><img src="//www.gravatar.com/avatar/0deae2e7003027fbf153500cd3fa5501?s=60" class="gravatar" alt="danbp" /></a>
    700700                    <a class="web" href="http://profiles.wordpress.org/danbp">danbp</a>
    701701                </li>
    702702                <li class="wp-person" id="wp-person-shanebp">
    703                     <a href="http://profiles.wordpress.org/shanebp"><img src="http://0.gravatar.com/avatar/ffd294ab5833ba14aaf175f9acc71cc4?s=60" class="gravatar" alt="shanebp" /></a>
     703                    <a href="http://profiles.wordpress.org/shanebp"><img src="//www.gravatar.com/avatar/ffd294ab5833ba14aaf175f9acc71cc4?s=60" class="gravatar" alt="shanebp" /></a>
    704704                    <a class="web" href="http://profiles.wordpress.org/shanebp">shanebp</a>
    705705                </li>
    706706                <li class="wp-person" id="wp-person-netweb">
    707                     <a href="http://profiles.wordpress.org/netweb"><img src="http://0.gravatar.com/avatar/97e1620b501da675315ba7cfb740e80f?s=60" class="gravatar" alt="Stephen Edgar" /></a>
     707                    <a href="http://profiles.wordpress.org/netweb"><img src="//www.gravatar.com/avatar/97e1620b501da675315ba7cfb740e80f?s=60" class="gravatar" alt="Stephen Edgar" /></a>
    708708                    <a class="web" href="http://profiles.wordpress.org/netweb">Stephen Edgar</a>
    709709                </li>
    710710                <li class="wp-person" id="wp-person-hnla">
    711                     <a href="http://profiles.wordpress.org/hnla"><img src="http://0.gravatar.com/avatar/3860c955aa3f79f13b92826ae47d07fe?s=60" class="gravatar" alt="Hugo Ashmore" /></a>
     711                    <a href="http://profiles.wordpress.org/hnla"><img src="//www.gravatar.com/avatar/3860c955aa3f79f13b92826ae47d07fe?s=60" class="gravatar" alt="Hugo Ashmore" /></a>
    712712                    <a class="web" href="http://profiles.wordpress.org/hnla">Hugo</a>
    713713                </li>
  • 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&amp;s=' . bp_core_avatar_full_width();
     1165        $avatar = '//www.gravatar.com/avatar/00000000000000000000000000000000?d=mm&amp;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&amp;s=' . bp_core_avatar_thumb_width();
     1195        $avatar = '//www.gravatar.com/avatar/00000000000000000000000000000000?d=mm&amp;s=' . bp_core_avatar_thumb_width();
    12121196    }
    12131197
  • trunk/src/bp-members/bp-members-template.php

    r9412 r9455  
    22042204             * @param string $value Gravatar url to use.
    22052205             */
    2206             $gravatar_url    = apply_filters( 'bp_gravatar_url', 'http://www.gravatar.com/avatar/' );
     2206            $gravatar_url    = apply_filters( 'bp_gravatar_url', '//www.gravatar.com/avatar/' );
    22072207            $md5_lcase_email = md5( strtolower( bp_get_signup_email_value() ) );
    22082208            $gravatar_img    = '<img src="' . $gravatar_url . $md5_lcase_email . '?d=' . $default_grav . '&amp;s=' . $size . '" width="' . $size . '" height="' . $size . '" alt="' . $alt . '" class="' . $class . '" />';
  • trunk/tests/phpunit/testcases/core/avatars.php

    r9381 r9455  
    152152            // This test has the slight odor of hokum since it recreates so much code that could be changed at any time.
    153153            $bp = buddypress();
    154             // Set host based on if using ssl
    155             $host = 'http://gravatar.com/avatar/';
    156             if ( is_ssl() ) {
    157                 $host = 'https://secure.gravatar.com/avatar/';
    158             }
     154            $host = '//www.gravatar.com/avatar/';
     155
    159156            // Set expected gravatar type
    160157            if ( empty( $bp->grav_default->{$this->params['object']} ) ) {
Note: See TracChangeset for help on using the changeset viewer.