Skip to:
Content

BuddyPress.org

Changeset 5956 for trunk/bp-loader.php


Ignore:
Timestamp:
04/01/2012 09:58:29 PM (15 years ago)
Author:
djpaul
Message:

Fix https URL handling for gravatars and other BuddyPress content

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-loader.php

    r5955 r5956  
    360360                        define( 'BP_PLUGIN_DIR', trailingslashit( WP_PLUGIN_DIR . '/buddypress' ) );
    361361
    362                 if ( !defined( 'BP_PLUGIN_URL' ) )
    363                         define( 'BP_PLUGIN_URL', plugin_dir_url ( __FILE__ ) );
     362                if ( !defined( 'BP_PLUGIN_URL' ) ) {
     363                        $plugin_url = plugin_dir_url( __FILE__ );
     364
     365                        // If we're using https, update the protocol. Workaround for WP13941, WP15928, WP19037.
     366                        if ( is_ssl() )
     367                                $plugin_url = str_replace( 'http://', 'https://', $plugin_url );
     368
     369                        define( 'BP_PLUGIN_URL', $plugin_url );
     370                }
    364371
    365372                // The search slug has to be defined nice and early because of the way
Note: See TracChangeset for help on using the changeset viewer.