Skip to:
Content

BuddyPress.org

Ticket #6135: 6135.01.patch

File 6135.01.patch, 10.8 KB (added by DJPaul, 10 years ago)
  • src/bp-core/bp-core-admin.php

    diff --git a/src/bp-core/bp-core-admin.php b/src/bp-core/bp-core-admin.php
    index 839d333..ca96c3a 100644
    a b class BP_Admin { 
    644644                        <h4 class="wp-people-group"><?php _e( 'Project Leaders', 'buddypress' ); ?></h4>
    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>
    660660                                </li>
    class BP_Admin { 
    663663                        <h4 class="wp-people-group"><?php _e( 'Core Team', 'buddypress' ); ?></h4>
    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>
    689689                                </li>
    class BP_Admin { 
    692692                        <h4 class="wp-people-group"><?php _e( 'Recent Rockstars', 'buddypress' ); ?></h4>
    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>
    714714                        </ul>
  • src/bp-core/bp-core-avatars.php

    diff --git a/src/bp-core/bp-core-avatars.php b/src/bp-core/bp-core-avatars.php
    index b7b3956..c607bb2 100644
    a b function bp_core_fetch_avatar( $args = '' ) { 
    456456                        }
    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
    466462                $params['email'] = apply_filters( 'bp_core_gravatar_email', $params['email'], $params['item_id'], $params['object'] );
    function bp_core_avatar_default( $type = 'gravatar' ) { 
    11661162
    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
    11781168        return apply_filters( 'bp_core_avatar_default', $avatar );
    function bp_core_avatar_default_thumb( $type = 'gravatar' ) { 
    12021192
    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
    12141198        return apply_filters( 'bp_core_avatar_thumb', $avatar );
  • src/bp-members/bp-members-template.php

    diff --git a/src/bp-members/bp-members-template.php b/src/bp-members/bp-members-template.php
    index 85929e5..48bdcc8 100644
    a b function bp_signup_avatar( $args = '' ) { 
    22032203                         *
    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 . '" />';
    22092209                }
  • tests/phpunit/testcases/core/avatars.php

    diff --git a/tests/phpunit/testcases/core/avatars.php b/tests/phpunit/testcases/core/avatars.php
    index 124fa46..3552cdc 100644
    a b class BP_Tests_Avatars extends BP_UnitTestCase { 
    151151                } else {
    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']} ) ) {
    161158                                $default_grav = 'wavatar';