Skip to:
Content

BuddyPress.org

Changeset 5704


Ignore:
Timestamp:
02/11/2012 02:45:59 AM (9 years ago)
Author:
johnjamesjacoby
Message:

Replace direct references to $bp user domains with their functional equivalents. See #3994.

Location:
trunk
Files:
25 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-classes.php

    r5697 r5704  
    8181
    8282        if ( !$this->primary_link )
    83             $this->primary_link = $bp->loggedin_user->domain;
     83            $this->primary_link = bp_loggedin_user_domain();
    8484
    8585        // If we have an existing ID, update the activity item, otherwise insert it.
  • trunk/bp-activity/bp-activity-loader.php

    r5505 r5704  
    128128
    129129        // Determine user to use
    130         if ( isset( $bp->displayed_user->domain ) )
    131             $user_domain = $bp->displayed_user->domain;
    132         elseif ( isset( $bp->loggedin_user->domain ) )
    133             $user_domain = $bp->loggedin_user->domain;
     130        if ( bp_displayed_user_domain() )
     131            $user_domain = bp_displayed_user_domain();
     132        elseif ( bp_loggedin_user_domain() )
     133            $user_domain = bp_loggedin_user_domain();
    134134        else
    135135            return;
     
    223223
    224224            // Setup the logged in user variables
    225             $user_domain   = $bp->loggedin_user->domain;
     225            $user_domain   = bp_loggedin_user_domain();
    226226            $activity_link = trailingslashit( $user_domain . $this->slug );
    227227
  • trunk/bp-activity/bp-activity-screens.php

    r5414 r5704  
    247247        // Redirect based on logged in status
    248248        is_user_logged_in() ?
    249             bp_core_redirect( $bp->loggedin_user->domain ) :
     249            bp_core_redirect( bp_loggedin_user_domain() ) :
    250250            bp_core_redirect( site_url( 'wp-login.php?redirect_to=' . esc_url( bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/p/' . $bp->current_action . '/' ) ) );
    251251    }
  • trunk/bp-blogs/bp-blogs-buddybar.php

    r5686 r5704  
    3939    if ( is_array( $blogs['blogs'] ) && (int)$blogs['count'] ) {
    4040
    41         echo '<li id="bp-adminbar-blogs-menu"><a href="' . trailingslashit( $bp->loggedin_user->domain . bp_get_blogs_slug() ) . '">';
     41        echo '<li id="bp-adminbar-blogs-menu"><a href="' . trailingslashit( bp_loggedin_user_domain() . bp_get_blogs_slug() ) . '">';
    4242
    4343        _e( 'My Sites', 'buddypress' );
  • trunk/bp-blogs/bp-blogs-loader.php

    r5686 r5704  
    151151        if ( is_user_logged_in() ) {
    152152
    153             $blogs_link = trailingslashit( $bp->loggedin_user->domain . $this->slug );
     153            $blogs_link = trailingslashit( bp_loggedin_user_domain() . $this->slug );
    154154
    155155            // Add the "Blogs" sub menu
  • trunk/bp-core/bp-core-buddybar.php

    r5683 r5704  
    4040        'name'                    => $name,
    4141        'slug'                    => $slug,
    42         'link'                    => trailingslashit( $bp->loggedin_user->domain . $slug ),
     42        'link'                    => trailingslashit( bp_loggedin_user_domain() . $slug ),
    4343        'css_id'                  => $item_css_id,
    4444        'show_for_displayed_user' => $show_for_displayed_user,
     
    476476                $name = $subnav_item['name'];
    477477
    478                 if ( isset( $bp->displayed_user->domain ) )
    479                     $link = str_replace( $bp->displayed_user->domain, $bp->loggedin_user->domain, $subnav_item['link'] );
     478                if ( bp_displayed_user_domain() )
     479                    $link = str_replace( bp_displayed_user_domain(), bp_loggedin_user_domain(), $subnav_item['link'] );
    480480
    481481                if ( isset( $bp->displayed_user->userdata->user_login ) )
  • trunk/bp-core/bp-core-loader.php

    r5592 r5704  
    225225            );
    226226
    227             $profile_link = trailingslashit( $bp->loggedin_user->domain . '/' . $bp->core->profile->slug );
     227            $profile_link = trailingslashit( bp_loggedin_user_domain() . '/' . $bp->core->profile->slug );
    228228
    229229            // Add the subnav items to the profile
  • trunk/bp-forums/bp-forums-loader.php

    r5480 r5704  
    117117
    118118        // Determine user to use
    119         if ( isset( $bp->displayed_user->domain ) ) {
    120             $user_domain = $bp->displayed_user->domain;
     119        if ( bp_displayed_user_domain() ) {
     120            $user_domain = bp_displayed_user_domain();
    121121            $user_login  = $bp->displayed_user->userdata->user_login;
    122         } elseif ( isset( $bp->loggedin_user->domain ) ) {
    123             $user_domain = $bp->loggedin_user->domain;
     122        } elseif ( bp_loggedin_user_domain() ) {
     123            $user_domain = bp_loggedin_user_domain();
    124124            $user_login  = $bp->loggedin_user->userdata->user_login;
    125125        } else {
     
    183183
    184184            // Setup the logged in user variables
    185             $user_domain = $bp->loggedin_user->domain;
     185            $user_domain = bp_loggedin_user_domain();
    186186            $user_login  = $bp->loggedin_user->userdata->user_login;
    187187            $forums_link = trailingslashit( $user_domain . $this->slug );
  • trunk/bp-friends/bp-friends-loader.php

    r5482 r5704  
    101101        );
    102102
    103         $friends_link = trailingslashit( $bp->loggedin_user->domain . bp_get_friends_slug() );
     103        $friends_link = trailingslashit( bp_loggedin_user_domain() . bp_get_friends_slug() );
    104104
    105105        // Add the subnav items to the friends nav item
     
    142142
    143143            // Setup the logged in user variables
    144             $user_domain  = $bp->loggedin_user->domain;
     144            $user_domain  = bp_loggedin_user_domain();
    145145            $friends_link = trailingslashit( $user_domain . $this->slug );
    146146
  • trunk/bp-friends/bp-friends-template.php

    r5416 r5704  
    6060    global $bp; ?>
    6161
    62     <li<?php if ( !bp_action_variable( 0 ) || bp_is_action_variable( 'recently-active', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( $bp->displayed_user->domain . bp_get_friends_slug() . '/my-friends/recently-active' ) ?>"><?php _e( 'Recently Active', 'buddypress' ) ?></a></li>
    63     <li<?php if ( bp_is_action_variable( 'newest', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( $bp->displayed_user->domain . bp_get_friends_slug() . '/my-friends/newest' ) ?>"><?php _e( 'Newest', 'buddypress' ) ?></a></li>
    64     <li<?php if ( bp_is_action_variable( 'alphabetically', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( $bp->displayed_user->domain . bp_get_friends_slug() . '/my-friends/alphabetically' ) ?>"><?php _e( 'Alphabetically', 'buddypress' ) ?></a></li>
     62    <li<?php if ( !bp_action_variable( 0 ) || bp_is_action_variable( 'recently-active', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_displayed_user_domain() . bp_get_friends_slug() . '/my-friends/recently-active' ) ?>"><?php _e( 'Recently Active', 'buddypress' ) ?></a></li>
     63    <li<?php if ( bp_is_action_variable( 'newest', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_displayed_user_domain() . bp_get_friends_slug() . '/my-friends/newest' ) ?>"><?php _e( 'Newest', 'buddypress' ) ?></a></li>
     64    <li<?php if ( bp_is_action_variable( 'alphabetically', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_displayed_user_domain() . bp_get_friends_slug() . '/my-friends/alphabetically' ) ?>"><?php _e( 'Alphabetically', 'buddypress' ) ?></a></li>
    6565
    6666<?php
     
    9999
    100100    <div class="info-group">
    101         <h4><?php bp_word_or_name( __( "My Friends", 'buddypress' ), __( "%s's Friends", 'buddypress' ) ) ?>  (<?php echo BP_Friends_Friendship::total_friend_count( bp_displayed_user_id() ) ?>) <span><a href="<?php echo trailingslashit( $bp->displayed_user->domain . bp_get_friends_slug() ) ?>"><?php _e('See All', 'buddypress') ?></a></span></h4>
     101        <h4><?php bp_word_or_name( __( "My Friends", 'buddypress' ), __( "%s's Friends", 'buddypress' ) ) ?>  (<?php echo BP_Friends_Friendship::total_friend_count( bp_displayed_user_id() ) ?>) <span><a href="<?php echo trailingslashit( bp_displayed_user_domain() . bp_get_friends_slug() ) ?>"><?php _e('See All', 'buddypress') ?></a></span></h4>
    102102
    103103        <?php if ( $friend_ids ) { ?>
     
    198198    global $friends_template, $bp;
    199199
    200     $action = $bp->displayed_user->domain . bp_get_friends_slug() . '/my-friends/search/';
     200    $action = bp_displayed_user_domain() . bp_get_friends_slug() . '/my-friends/search/';
    201201    $label = __( 'Filter Friends', 'buddypress' ); ?>
    202202
     
    320320                    'wrapper_class'     => 'friendship-button pending',
    321321                    'wrapper_id'        => 'friendship-button-' . $potential_friend_id,
    322                     'link_href'         => trailingslashit( $bp->loggedin_user->domain . bp_get_friends_slug() . '/requests' ),
     322                    'link_href'         => trailingslashit( bp_loggedin_user_domain() . bp_get_friends_slug() . '/requests' ),
    323323                    'link_text'         => __( 'Friendship Requested', 'buddypress' ),
    324324                    'link_title'        => __( 'Friendship Requested', 'buddypress' ),
     
    335335                    'wrapper_class'     => 'friendship-button is_friend',
    336336                    'wrapper_id'        => 'friendship-button-' . $potential_friend_id,
    337                     'link_href'         => wp_nonce_url( $bp->loggedin_user->domain . bp_get_friends_slug() . '/remove-friend/' . $potential_friend_id . '/', 'friends_remove_friend' ),
     337                    'link_href'         => wp_nonce_url( bp_loggedin_user_domain() . bp_get_friends_slug() . '/remove-friend/' . $potential_friend_id . '/', 'friends_remove_friend' ),
    338338                    'link_text'         => __( 'Cancel Friendship', 'buddypress' ),
    339339                    'link_title'        => __( 'Cancel Friendship', 'buddypress' ),
     
    352352                    'wrapper_class'     => 'friendship-button not_friends',
    353353                    'wrapper_id'        => 'friendship-button-' . $potential_friend_id,
    354                     'link_href'         => wp_nonce_url( $bp->loggedin_user->domain . bp_get_friends_slug() . '/add-friend/' . $potential_friend_id . '/', 'friends_add_friend' ),
     354                    'link_href'         => wp_nonce_url( bp_loggedin_user_domain() . bp_get_friends_slug() . '/add-friend/' . $potential_friend_id . '/', 'friends_add_friend' ),
    355355                    'link_text'         => __( 'Add Friend', 'buddypress' ),
    356356                    'link_title'        => __( 'Add Friend', 'buddypress' ),
     
    410410        }
    411411
    412         return apply_filters( 'bp_get_friend_accept_request_link', wp_nonce_url( $bp->loggedin_user->domain . bp_get_friends_slug() . '/requests/accept/' . $friendship_id, 'friends_accept_friendship' ) );
     412        return apply_filters( 'bp_get_friend_accept_request_link', wp_nonce_url( bp_loggedin_user_domain() . bp_get_friends_slug() . '/requests/accept/' . $friendship_id, 'friends_accept_friendship' ) );
    413413    }
    414414
     
    424424        }
    425425
    426         return apply_filters( 'bp_get_friend_reject_request_link', wp_nonce_url( $bp->loggedin_user->domain . bp_get_friends_slug() . '/requests/reject/' . $friendship_id, 'friends_reject_friendship' ) );
     426        return apply_filters( 'bp_get_friend_reject_request_link', wp_nonce_url( bp_loggedin_user_domain() . bp_get_friends_slug() . '/requests/reject/' . $friendship_id, 'friends_reject_friendship' ) );
    427427    }
    428428
  • trunk/bp-groups/bp-groups-loader.php

    r5687 r5704  
    267267        );
    268268
    269         $groups_link = trailingslashit( $bp->loggedin_user->domain . $this->slug );
     269        $groups_link = trailingslashit( bp_loggedin_user_domain() . $this->slug );
    270270
    271271        // Add the My Groups nav item
     
    413413
    414414            // Setup the logged in user variables
    415             $user_domain = $bp->loggedin_user->domain;
     415            $user_domain = bp_loggedin_user_domain();
    416416            $groups_link = trailingslashit( $user_domain . $this->slug );
    417417
  • trunk/bp-groups/bp-groups-template.php

    r5689 r5704  
    675675    global $bp;
    676676
    677     $action = $bp->displayed_user->domain . bp_get_groups_slug() . '/my-groups/search/';
     677    $action = bp_displayed_user_domain() . bp_get_groups_slug() . '/my-groups/search/';
    678678    $label = __('Filter Groups', 'buddypress');
    679679    $name = 'group-filter-box';
     
    14041404            $group =& $groups_template->group;
    14051405
    1406         return apply_filters( 'bp_get_group_accept_invite_link', wp_nonce_url( trailingslashit( $bp->loggedin_user->domain . bp_get_groups_slug() . '/invites/accept/' . $group->id ), 'groups_accept_invite' ) );
     1406        return apply_filters( 'bp_get_group_accept_invite_link', wp_nonce_url( trailingslashit( bp_loggedin_user_domain() . bp_get_groups_slug() . '/invites/accept/' . $group->id ), 'groups_accept_invite' ) );
    14071407    }
    14081408
     
    14161416            $group =& $groups_template->group;
    14171417
    1418         return apply_filters( 'bp_get_group_reject_invite_link', wp_nonce_url( trailingslashit( $bp->loggedin_user->domain . bp_get_groups_slug() . '/invites/reject/' . $group->id ), 'groups_reject_invite' ) );
     1418        return apply_filters( 'bp_get_group_reject_invite_link', wp_nonce_url( trailingslashit( bp_loggedin_user_domain() . bp_get_groups_slug() . '/invites/reject/' . $group->id ), 'groups_reject_invite' ) );
    14191419    }
    14201420
     
    22752275    global $bp;?>
    22762276
    2277     <li<?php if ( !bp_action_variable( 0 ) || bp_is_action_variable( 'recently-active', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( $bp->displayed_user->domain . bp_get_groups_slug() . '/my-groups/recently-active' ) ?>"><?php _e( 'Recently Active', 'buddypress' ) ?></a></li>
    2278     <li<?php if ( bp_is_action_variable( 'recently-joined', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( $bp->displayed_user->domain . bp_get_groups_slug() . '/my-groups/recently-joined' ) ?>"><?php _e( 'Recently Joined', 'buddypress' ) ?></a></li>
    2279     <li<?php if ( bp_is_action_variable( 'most-popular', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( $bp->displayed_user->domain . bp_get_groups_slug() . '/my-groups/most-popular' ) ?>"><?php _e( 'Most Popular', 'buddypress' ) ?></a></li>
    2280     <li<?php if ( bp_is_action_variable( 'admin-of', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( $bp->displayed_user->domain . bp_get_groups_slug() . '/my-groups/admin-of' ) ?>"><?php _e( 'Administrator Of', 'buddypress' ) ?></a></li>
    2281     <li<?php if ( bp_is_action_variable( 'mod-of', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( $bp->displayed_user->domain . bp_get_groups_slug() . '/my-groups/mod-of' ) ?>"><?php _e( 'Moderator Of', 'buddypress' ) ?></a></li>
    2282     <li<?php if ( bp_is_action_variable( 'alphabetically' ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( $bp->displayed_user->domain . bp_get_groups_slug() . '/my-groups/alphabetically' ) ?>"><?php _e( 'Alphabetically', 'buddypress' ) ?></a></li>
     2277    <li<?php if ( !bp_action_variable( 0 ) || bp_is_action_variable( 'recently-active', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_displayed_user_domain() . bp_get_groups_slug() . '/my-groups/recently-active' ) ?>"><?php _e( 'Recently Active', 'buddypress' ) ?></a></li>
     2278    <li<?php if ( bp_is_action_variable( 'recently-joined', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_displayed_user_domain() . bp_get_groups_slug() . '/my-groups/recently-joined' ) ?>"><?php _e( 'Recently Joined', 'buddypress' ) ?></a></li>
     2279    <li<?php if ( bp_is_action_variable( 'most-popular', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_displayed_user_domain() . bp_get_groups_slug() . '/my-groups/most-popular' ) ?>"><?php _e( 'Most Popular', 'buddypress' ) ?></a></li>
     2280    <li<?php if ( bp_is_action_variable( 'admin-of', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_displayed_user_domain() . bp_get_groups_slug() . '/my-groups/admin-of' ) ?>"><?php _e( 'Administrator Of', 'buddypress' ) ?></a></li>
     2281    <li<?php if ( bp_is_action_variable( 'mod-of', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_displayed_user_domain() . bp_get_groups_slug() . '/my-groups/mod-of' ) ?>"><?php _e( 'Moderator Of', 'buddypress' ) ?></a></li>
     2282    <li<?php if ( bp_is_action_variable( 'alphabetically' ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_displayed_user_domain() . bp_get_groups_slug() . '/my-groups/alphabetically' ) ?>"><?php _e( 'Alphabetically', 'buddypress' ) ?></a></li>
    22832283
    22842284<?php
  • trunk/bp-members/bp-members-actions.php

    r5700 r5704  
    142142
    143143        if ( $errors )
    144             bp_core_redirect( $bp->displayed_user->domain );
     144            bp_core_redirect( bp_displayed_user_domain() );
    145145        else
    146             bp_core_redirect( $bp->loggedin_user->domain );
     146            bp_core_redirect( bp_loggedin_user_domain() );
    147147    }
    148148}
  • trunk/bp-members/bp-members-adminbar.php

    r5700 r5704  
    3737            'group'  => true,
    3838            'title'  => __( 'Edit My Profile', 'buddypress' ),
    39             'href'   => $bp->loggedin_user->domain,
     39            'href'   => bp_loggedin_user_domain(),
    4040            'meta'   => array(
    4141            'class'  => 'ab-sub-secondary'
  • trunk/bp-members/bp-members-buddybar.php

    r5700 r5704  
    2020        return false;
    2121
    22     echo '<li id="bp-adminbar-notifications-menu"><a href="' . $bp->loggedin_user->domain . '">';
     22    echo '<li id="bp-adminbar-notifications-menu"><a href="' . bp_loggedin_user_domain() . '">';
    2323    _e( 'Notifications', 'buddypress' );
    2424
     
    4242    } else { ?>
    4343
    44         <li><a href="<?php echo $bp->loggedin_user->domain ?>"><?php _e( 'No new notifications.', 'buddypress' ); ?></a></li>
     44        <li><a href="<?php echo bp_loggedin_user_domain() ?>"><?php _e( 'No new notifications.', 'buddypress' ); ?></a></li>
    4545
    4646    <?php
     
    132132            <?php if ( !bp_is_user_spammer( bp_displayed_user_id() ) ) : ?>
    133133
    134                 <li><a href="<?php echo wp_nonce_url( $bp->displayed_user->domain . 'admin/mark-spammer/', 'mark-unmark-spammer' ) ?>" class="confirm"><?php printf( __( "Mark as Spammer", 'buddypress' ), esc_attr( $bp->displayed_user->fullname ) ); ?></a></li>
     134                <li><a href="<?php echo wp_nonce_url( bp_displayed_user_domain() . 'admin/mark-spammer/', 'mark-unmark-spammer' ) ?>" class="confirm"><?php printf( __( "Mark as Spammer", 'buddypress' ), esc_attr( $bp->displayed_user->fullname ) ); ?></a></li>
    135135
    136136            <?php else : ?>
    137137
    138                 <li><a href="<?php echo wp_nonce_url( $bp->displayed_user->domain . 'admin/unmark-spammer/', 'mark-unmark-spammer' ) ?>" class="confirm"><?php _e( "Not a Spammer", 'buddypress' ) ?></a></li>
     138                <li><a href="<?php echo wp_nonce_url( bp_displayed_user_domain() . 'admin/unmark-spammer/', 'mark-unmark-spammer' ) ?>" class="confirm"><?php _e( "Not a Spammer", 'buddypress' ) ?></a></li>
    139139
    140140            <?php endif; ?>
    141141
    142             <li><a href="<?php echo wp_nonce_url( $bp->displayed_user->domain . 'admin/delete-user/', 'delete-user' ) ?>" class="confirm"><?php printf( __( "Delete %s's Account", 'buddypress' ), esc_attr( $bp->displayed_user->fullname ) ); ?></a></li>
     142            <li><a href="<?php echo wp_nonce_url( bp_displayed_user_domain() . 'admin/delete-user/', 'delete-user' ) ?>" class="confirm"><?php printf( __( "Delete %s's Account", 'buddypress' ), esc_attr( $bp->displayed_user->fullname ) ); ?></a></li>
    143143
    144144            <?php do_action( 'bp_members_adminbar_admin_menu' ) ?>
  • trunk/bp-members/bp-members-loader.php

    r5700 r5704  
    9797
    9898        /** Profiles Fallback *************************************************/
     99
    99100        if ( !bp_is_active( 'xprofile' ) ) {
    100101            $bp->profile->slug = 'profile';
     
    114115
    115116        if ( !bp_current_component() && bp_displayed_user_id() ) {
    116             $bp->current_component       = $bp->default_component;
     117            $bp->current_component = $bp->default_component;
    117118           
    118119            // Prepare for a redirect to the canonical URL
     
    148149
    149150            // User links
    150             $user_domain   = ( isset( $bp->displayed_user->domain ) )               ? $bp->displayed_user->domain               : $bp->loggedin_user->domain;
     151            $user_domain   = bp_displayed_user_domain() ? bp_displayed_user_domain() : bp_loggedin_user_domain();
    151152            $profile_link  = trailingslashit( $user_domain . $bp->profile->slug );
    152153
  • trunk/bp-members/bp-members-template.php

    r5700 r5704  
    755755        }
    756756
    757         if ( $bp->loggedin_user->domain ) {
    758             $link = str_replace( $bp->loggedin_user->domain, $bp->displayed_user->domain, $user_nav_item['link'] );
     757        if ( bp_loggedin_user_domain() ) {
     758            $link = str_replace( bp_loggedin_user_domain(), bp_displayed_user_domain(), $user_nav_item['link'] );
    759759        } else {
    760             $link = trailingslashit( $bp->displayed_user->domain . $user_nav_item['link'] );
     760            $link = trailingslashit( bp_displayed_user_domain() . $user_nav_item['link'] );
    761761        }
    762762
     
    11811181        // Append $action to $url if there is no $type
    11821182        if ( !empty( $action ) )
    1183             $url = $bp->displayed_user->domain . $bp->{$component}->slug . '/' . $action;
     1183            $url = bp_displayed_user_domain() . $bp->{$component}->slug . '/' . $action;
    11841184        else
    1185             $url = $bp->displayed_user->domain . $bp->{$component}->slug;
     1185            $url = bp_displayed_user_domain() . $bp->{$component}->slug;
    11861186
    11871187        // Add a slash at the end of our user url
  • trunk/bp-messages/bp-messages-loader.php

    r5696 r5704  
    109109
    110110        // Link to user messages
    111         $messages_link = trailingslashit( $bp->loggedin_user->domain . $this->slug );
     111        $messages_link = trailingslashit( bp_loggedin_user_domain() . $this->slug );
    112112
    113113        // Add the subnav items to the profile
     
    172172
    173173            // Setup the logged in user variables
    174             $user_domain   = $bp->loggedin_user->domain;
     174            $user_domain   = bp_loggedin_user_domain();
    175175            $messages_link = trailingslashit( $user_domain . $this->slug );
    176176
  • trunk/bp-messages/bp-messages-screens.php

    r5696 r5704  
    6060                if ( messages_send_notice( $_POST['subject'], $_POST['content'] ) ) {
    6161                    bp_core_add_message( __( 'Notice sent successfully!', 'buddypress' ) );
    62                     bp_core_redirect( $bp->loggedin_user->domain . $bp->messages->slug . '/inbox/' );
     62                    bp_core_redirect( bp_loggedin_user_domain() . $bp->messages->slug . '/inbox/' );
    6363                } else {
    6464                    bp_core_add_message( __( 'There was an error sending that notice, please try again', 'buddypress' ), 'error' );
     
    7474                if ( $thread_id = messages_new_message( array( 'recipients' => $recipients, 'subject' => $_POST['subject'], 'content' => $_POST['content'] ) ) ) {
    7575                    bp_core_add_message( __( 'Message sent successfully!', 'buddypress' ) );
    76                     bp_core_redirect( $bp->loggedin_user->domain . $bp->messages->slug . '/view/' . $thread_id . '/' );
     76                    bp_core_redirect( bp_loggedin_user_domain() . $bp->messages->slug . '/view/' . $thread_id . '/' );
    7777                } else {
    7878                    bp_core_add_message( __( 'There was an error sending that message, please try again', 'buddypress' ), 'error' );
  • trunk/bp-messages/bp-messages-template.php

    r5696 r5704  
    255255    function bp_get_message_thread_view_link() {
    256256        global $messages_template, $bp;
    257         return apply_filters( 'bp_get_message_thread_view_link', trailingslashit( $bp->loggedin_user->domain . $bp->messages->slug . '/view/' . $messages_template->thread->thread_id ) );
     257        return apply_filters( 'bp_get_message_thread_view_link', trailingslashit( bp_loggedin_user_domain() . $bp->messages->slug . '/view/' . $messages_template->thread->thread_id ) );
    258258    }
    259259
     
    263263    function bp_get_message_thread_delete_link() {
    264264        global $messages_template, $bp;
    265         return apply_filters( 'bp_get_message_thread_delete_link', wp_nonce_url( trailingslashit( $bp->loggedin_user->domain . $bp->messages->slug . '/' . $bp->current_action . '/delete/' . $messages_template->thread->thread_id ), 'messages_delete_thread' ) );
     265        return apply_filters( 'bp_get_message_thread_delete_link', wp_nonce_url( trailingslashit( bp_loggedin_user_domain() . $bp->messages->slug . '/' . $bp->current_action . '/delete/' . $messages_template->thread->thread_id ), 'messages_delete_thread' ) );
    266266    }
    267267
     
    484484        global $messages_template, $bp;
    485485
    486         return apply_filters( 'bp_get_message_notice_delete_link', wp_nonce_url( $bp->loggedin_user->domain . $bp->messages->slug . '/notices/delete/' . $messages_template->thread->id, 'messages_delete_thread' ) );
     486        return apply_filters( 'bp_get_message_notice_delete_link', wp_nonce_url( bp_loggedin_user_domain() . $bp->messages->slug . '/notices/delete/' . $messages_template->thread->id, 'messages_delete_thread' ) );
    487487    }
    488488
     
    494494
    495495        if ( 1 == (int)$messages_template->thread->is_active ) {
    496             $link = wp_nonce_url( trailingslashit( $bp->loggedin_user->domain . $bp->messages->slug . '/notices/deactivate/' . $messages_template->thread->id ), 'messages_deactivate_notice' );
     496            $link = wp_nonce_url( trailingslashit( bp_loggedin_user_domain() . $bp->messages->slug . '/notices/deactivate/' . $messages_template->thread->id ), 'messages_deactivate_notice' );
    497497        } else {
    498             $link = wp_nonce_url( trailingslashit( $bp->loggedin_user->domain . $bp->messages->slug . '/notices/activate/' . $messages_template->thread->id ), 'messages_activate_notice' );
     498            $link = wp_nonce_url( trailingslashit( bp_loggedin_user_domain() . $bp->messages->slug . '/notices/activate/' . $messages_template->thread->id ), 'messages_activate_notice' );
    499499        }
    500500        return apply_filters( 'bp_get_message_activate_deactivate_link', $link );
     
    576576            return false;
    577577
    578         return apply_filters( 'bp_get_send_private_message_link', wp_nonce_url( $bp->loggedin_user->domain . $bp->messages->slug . '/compose/?r=' . bp_core_get_username( bp_displayed_user_id(), $bp->displayed_user->userdata->user_nicename, $bp->displayed_user->userdata->user_login ) ) );
     578        return apply_filters( 'bp_get_send_private_message_link', wp_nonce_url( bp_loggedin_user_domain() . $bp->messages->slug . '/compose/?r=' . bp_core_get_username( bp_displayed_user_id(), $bp->displayed_user->userdata->user_nicename, $bp->displayed_user->userdata->user_login ) ) );
    579579    }
    580580
     
    853853        global $bp;
    854854
    855         return apply_filters( 'bp_get_message_thread_delete_link', wp_nonce_url( $bp->loggedin_user->domain . $bp->messages->slug . '/inbox/delete/' . bp_get_the_thread_id(), 'messages_delete_thread' ) );
     855        return apply_filters( 'bp_get_message_thread_delete_link', wp_nonce_url( bp_loggedin_user_domain() . $bp->messages->slug . '/inbox/delete/' . bp_get_the_thread_id(), 'messages_delete_thread' ) );
    856856    }
    857857
  • trunk/bp-settings/bp-settings-loader.php

    r5690 r5704  
    8989
    9090        // Determine user to use
    91         if ( isset( $bp->displayed_user->domain ) )
    92             $user_domain = $bp->displayed_user->domain;
    93         elseif ( isset( $bp->loggedin_user->domain ) )
    94             $user_domain = $bp->loggedin_user->domain;
     91        if ( bp_displayed_user_domain() )
     92            $user_domain = bp_displayed_user_domain();
     93        elseif ( bp_loggedin_user_domain() )
     94            $user_domain = bp_loggedin_user_domain();
    9595        else
    9696            return;
     
    151151
    152152            // Setup the logged in user variables
    153             $user_domain   = $bp->loggedin_user->domain;
     153            $user_domain   = bp_loggedin_user_domain();
    154154            $settings_link = trailingslashit( $user_domain . $this->slug );
    155155
  • trunk/bp-themes/bp-default/_inc/ajax.php

    r5503 r5704  
    116116    switch ( $scope ) {
    117117        case 'friends':
    118             $feed_url = $bp->loggedin_user->domain . bp_get_activity_slug() . '/friends/feed/';
     118            $feed_url = bp_loggedin_user_domain() . bp_get_activity_slug() . '/friends/feed/';
    119119            break;
    120120        case 'groups':
    121             $feed_url = $bp->loggedin_user->domain . bp_get_activity_slug() . '/groups/feed/';
     121            $feed_url = bp_loggedin_user_domain() . bp_get_activity_slug() . '/groups/feed/';
    122122            break;
    123123        case 'favorites':
    124             $feed_url = $bp->loggedin_user->domain . bp_get_activity_slug() . '/favorites/feed/';
     124            $feed_url = bp_loggedin_user_domain() . bp_get_activity_slug() . '/favorites/feed/';
    125125            break;
    126126        case 'mentions':
    127             $feed_url = $bp->loggedin_user->domain . bp_get_activity_slug() . '/mentions/feed/';
     127            $feed_url = bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/feed/';
    128128            bp_activity_clear_new_mentions( bp_loggedin_user_id() );
    129129            break;
     
    439439        echo '<span class="activity">' . esc_attr( $user->last_active ) . '</span>';
    440440        echo '<div class="action">
    441                 <a class="button remove" href="' . wp_nonce_url( $bp->loggedin_user->domain . bp_get_groups_slug() . '/' . $_POST['group_id'] . '/invites/remove/' . $user->id, 'groups_invite_uninvite_user' ) . '" id="uid-' . esc_attr( $user->id ) . '">' . __( 'Remove Invite', 'buddypress' ) . '</a>
     441                <a class="button remove" href="' . wp_nonce_url( bp_loggedin_user_domain() . bp_get_groups_slug() . '/' . $_POST['group_id'] . '/invites/remove/' . $user->id, 'groups_invite_uninvite_user' ) . '" id="uid-' . esc_attr( $user->id ) . '">' . __( 'Remove Invite', 'buddypress' ) . '</a>
    442442              </div>';
    443443        echo '</li>';
     
    467467            echo __("Friendship could not be canceled.", 'buddypress');
    468468        } else {
    469             echo '<a id="friend-' . $_POST['fid'] . '" class="add" rel="add" title="' . __( 'Add Friend', 'buddypress' ) . '" href="' . wp_nonce_url( $bp->loggedin_user->domain . bp_get_friends_slug() . '/add-friend/' . $_POST['fid'], 'friends_add_friend' ) . '">' . __( 'Add Friend', 'buddypress' ) . '</a>';
     469            echo '<a id="friend-' . $_POST['fid'] . '" class="add" rel="add" title="' . __( 'Add Friend', 'buddypress' ) . '" href="' . wp_nonce_url( bp_loggedin_user_domain() . bp_get_friends_slug() . '/add-friend/' . $_POST['fid'], 'friends_add_friend' ) . '">' . __( 'Add Friend', 'buddypress' ) . '</a>';
    470470        }
    471471
     
    477477            echo __("Friendship could not be requested.", 'buddypress');
    478478        } else {
    479             echo '<a href="' . $bp->loggedin_user->domain . bp_get_friends_slug() . '/requests" class="requested">' . __( 'Friendship Requested', 'buddypress' ) . '</a>';
     479            echo '<a href="' . bp_loggedin_user_domain() . bp_get_friends_slug() . '/requests" class="requested">' . __( 'Friendship Requested', 'buddypress' ) . '</a>';
    480480        }
    481481    } else {
     
    589589                <?php echo bp_loggedin_user_avatar( 'type=thumb&width=30&height=30' ); ?>
    590590
    591                 <strong><a href="<?php echo $bp->loggedin_user->domain ?>"><?php echo $bp->loggedin_user->fullname ?></a> <span class="activity"><?php printf( __( 'Sent %s', 'buddypress' ), bp_core_time_since( bp_core_current_time() ) ) ?></span></strong>
     591                <strong><a href="<?php echo bp_loggedin_user_domain() ?>"><?php echo $bp->loggedin_user->fullname ?></a> <span class="activity"><?php printf( __( 'Sent %s', 'buddypress' ), bp_core_time_since( bp_core_current_time() ) ) ?></span></strong>
    592592
    593593                <?php do_action( 'bp_after_message_meta' ) ?>
  • trunk/bp-xprofile/bp-xprofile-loader.php

    r5699 r5704  
    122122        );
    123123
    124         $profile_link = trailingslashit( $bp->loggedin_user->domain . $this->slug );
     124        $profile_link = trailingslashit( bp_loggedin_user_domain() . $this->slug );
    125125
    126126        // Add the subnav items to the profile
     
    172172
    173173            // Profile link
    174             $profile_link = trailingslashit( $bp->loggedin_user->domain . $this->slug );
     174            $profile_link = trailingslashit( bp_loggedin_user_domain() . $this->slug );
    175175
    176176            // Add the "Profile" sub menu
  • trunk/bp-xprofile/bp-xprofile-screens.php

    r5699 r5704  
    6363        // Check we have field ID's
    6464        if ( empty( $_POST['field_ids'] ) )
    65             bp_core_redirect( trailingslashit( $bp->displayed_user->domain . $bp->profile->slug . '/edit/group/' . bp_action_variable( 1 ) ) );
     65            bp_core_redirect( trailingslashit( bp_displayed_user_domain() . $bp->profile->slug . '/edit/group/' . bp_action_variable( 1 ) ) );
    6666
    6767        // Explode the posted field IDs into an array so we know which
  • trunk/bp-xprofile/bp-xprofile-template.php

    r5699 r5704  
    268268        global $bp, $group;
    269269
    270         return apply_filters( 'bp_get_the_profile_group_edit_form_action', trailingslashit( $bp->displayed_user->domain . $bp->profile->slug . '/edit/group/' . $group->id ) );
     270        return apply_filters( 'bp_get_the_profile_group_edit_form_action', trailingslashit( bp_displayed_user_domain() . $bp->profile->slug . '/edit/group/' . $group->id ) );
    271271    }
    272272
     
    743743
    744744        if ( !empty( $groups[$i]->fields ) ) {
    745             $link = trailingslashit( $bp->displayed_user->domain . $bp->profile->slug . '/edit/group/' . $groups[$i]->id );
     745            $link = trailingslashit( bp_displayed_user_domain() . $bp->profile->slug . '/edit/group/' . $groups[$i]->id );
    746746            $tabs[] = sprintf( '<li %1$s><a href="%2$s">%3$s</a></li>', $selected, $link, esc_html( $groups[$i]->name ) );
    747747        }
     
    781781
    782782    if ( !(int)$bp->site_options['bp-disable-avatar-uploads'] )
    783         bp_core_avatar_admin( null, $bp->loggedin_user->domain . $bp->profile->slug . '/change-avatar/', $bp->loggedin_user->domain . $bp->profile->slug . '/delete-avatar/' );
     783        bp_core_avatar_admin( null, bp_loggedin_user_domain() . $bp->profile->slug . '/change-avatar/', bp_loggedin_user_domain() . $bp->profile->slug . '/delete-avatar/' );
    784784    else
    785785        _e( 'Avatar uploads are currently disabled. Why not use a <a href="http://gravatar.com" target="_blank">gravatar</a> instead?', 'buddypress' );
     
    822822        global $bp;
    823823
    824         return apply_filters( 'bp_get_avatar_delete_link', wp_nonce_url( $bp->displayed_user->domain . $bp->profile->slug . '/change-avatar/delete-avatar/', 'bp_delete_avatar_link' ) );
     824        return apply_filters( 'bp_get_avatar_delete_link', wp_nonce_url( bp_displayed_user_domain() . $bp->profile->slug . '/change-avatar/delete-avatar/', 'bp_delete_avatar_link' ) );
    825825    }
    826826
     
    841841        'must_be_logged_in' => true,
    842842        'block_self'        => true,
    843         'link_href'         => trailingslashit( $bp->displayed_user->domain . $bp->profile->slug . '/edit' ),
     843        'link_href'         => trailingslashit( bp_displayed_user_domain() . $bp->profile->slug . '/edit' ),
    844844        'link_class'        => 'edit',
    845845        'link_text'         => __( 'Edit Profile', 'buddypress' ),
Note: See TracChangeset for help on using the changeset viewer.