Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/01/2011 07:46:50 PM (13 years ago)
Author:
johnjamesjacoby
Message:

Use bp_get_root_domain() in place of $bp->root_domain global

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-template.php

    r3958 r3982  
    296296    global $bp;
    297297
    298     return apply_filters( 'bp_search_form_action', $bp->root_domain . '/' . BP_SEARCH_SLUG );
     298    return apply_filters( 'bp_search_form_action', bp_get_root_domain() . '/' . BP_SEARCH_SLUG );
    299299}
    300300
     
    386386    global $bp;
    387387    if ( function_exists('wp_logout_url') )
    388         $logout_link = '<a href="' . wp_logout_url( $bp->root_domain ) . '">' . __( 'Log Out', 'buddypress' ) . '</a>';
     388        $logout_link = '<a href="' . wp_logout_url( bp_get_root_domain() ) . '">' . __( 'Log Out', 'buddypress' ) . '</a>';
    389389    else
    390         $logout_link = '<a href="' . $bp->root_domain . '/wp-login.php?action=logout&amp;redirect_to=' . $bp->root_domain . '">' . __( 'Log Out', 'buddypress' ) . '</a>';
     390        $logout_link = '<a href="' . bp_get_root_domain() . '/wp-login.php?action=logout&amp;redirect_to=' . bp_get_root_domain() . '">' . __( 'Log Out', 'buddypress' ) . '</a>';
    391391
    392392    echo apply_filters( 'bp_logout_link', $logout_link );
     
    562562        global $bp;
    563563
    564         return apply_filters( 'bp_get_root_domain', $bp->root_domain );
     564        if ( isset( $bp->root_domain ) && !empty( $bp->root_domain ) ) {
     565            $domain = $bp->root_domain;
     566        } else {
     567            $domain          = bp_core_get_root_domain();
     568            $bp->root_domain = $domain;
     569        }
     570
     571        return apply_filters( 'bp_get_root_domain', $domain );
    565572    }
    566573
Note: See TracChangeset for help on using the changeset viewer.