Skip to:
Content

BuddyPress.org

Changeset 3982


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

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

Location:
trunk
Files:
24 edited

Legend:

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

    r3917 r3982  
    2929        // Redirect to root if activity does not exist
    3030        if ( !$activity = $activity['activities'][0] )
    31                 bp_core_redirect( $bp->root_domain );
     31                bp_core_redirect( bp_get_root_domain() );
    3232
    3333        // Do not redirect at default
     
    5757        // Allow redirect to be filtered
    5858        if ( !$redirect = apply_filters( 'bp_activity_permalink_redirect_url', $redirect, &$activity ) )
    59                 bp_core_redirect( $bp->root_domain );
     59                bp_core_redirect( bp_get_root_domain() );
    6060
    6161        // Redirect to the actual activity permalink page
  • trunk/bp-activity/bp-activity-functions.php

    r3903 r3982  
    851851        else {
    852852                if ( 'activity_comment' == $activity_obj->type )
    853                         $link = $bp->root_domain . '/' . $bp->activity->root_slug . '/p/' . $activity_obj->item_id . '/';
     853                        $link = bp_get_root_domain() . '/' . $bp->activity->root_slug . '/p/' . $activity_obj->item_id . '/';
    854854                else
    855                         $link = $bp->root_domain . '/' . $bp->activity->root_slug . '/p/' . $activity_obj->id . '/';
     855                        $link = bp_get_root_domain() . '/' . $bp->activity->root_slug . '/p/' . $activity_obj->id . '/';
    856856        }
    857857
  • trunk/bp-activity/bp-activity-screens.php

    r3917 r3982  
    114114
    115115        if ( !$activity = $activity['activities'][0] )
    116                 bp_core_redirect( $bp->root_domain );
     116                bp_core_redirect( bp_get_root_domain() );
    117117
    118118        // Default access is true
     
    124124                // Activity is from a group, but groups is currently disabled
    125125                if ( !bp_is_active( 'groups') )
    126                         bp_core_redirect( $bp->root_domain );
     126                        bp_core_redirect( bp_get_root_domain() );
    127127
    128128                // Check to see if the group is not public, if so, check the
     
    156156                is_user_logged_in() ?
    157157                        bp_core_redirect( $bp->loggedin_user->domain ) :
    158                         bp_core_redirect( site_url( 'wp-login.php?redirect_to=' . esc_url( $bp->root_domain . '/' . $bp->activity->slug . '/p/' . $bp->current_action ) ) );
     158                        bp_core_redirect( site_url( 'wp-login.php?redirect_to=' . esc_url( bp_get_root_domain() . '/' . $bp->activity->slug . '/p/' . $bp->current_action ) ) );
    159159        }
    160160
  • trunk/bp-activity/bp-activity-template.php

    r3917 r3982  
    836836                                // Delete link
    837837                                if ( $bp->loggedin_user->is_super_admin || $bp->loggedin_user->id == $comment->user_id ) {
    838                                         $delete_url = wp_nonce_url( $bp->root_domain . '/' . $bp->activity->slug . '/delete/?cid=' . $comment->id, 'bp_activity_delete_link' );
     838                                        $delete_url = wp_nonce_url( bp_get_root_domain() . '/' . $bp->activity->slug . '/delete/?cid=' . $comment->id, 'bp_activity_delete_link' );
    839839                                        $content .= apply_filters( 'bp_activity_comment_delete_link', ' &middot; <a href="' . $delete_url . '" class="delete acomment-delete" rel="nofollow">' . __( 'Delete', 'buddypress' ) . '</a>', $comment, $delete_url );
    840840                                }
     
    973973                global $activities_template, $bp;
    974974
    975                 return apply_filters( 'bp_get_activity_delete_link', '<a href="' . wp_nonce_url( $bp->root_domain . '/' . $bp->activity->slug . '/delete/' . $activities_template->activity->id, 'bp_activity_delete_link' ) . '" class="item-button delete-activity confirm" rel="nofollow">' . __( 'Delete', 'buddypress' ) . '</a>' );
     975                return apply_filters( 'bp_get_activity_delete_link', '<a href="' . wp_nonce_url( bp_get_root_domain() . '/' . $bp->activity->slug . '/delete/' . $activities_template->activity->id, 'bp_activity_delete_link' ) . '" class="item-button delete-activity confirm" rel="nofollow">' . __( 'Delete', 'buddypress' ) . '</a>' );
    976976        }
    977977
     
    989989
    990990                $latest_update = '&quot;' . apply_filters( 'bp_get_activity_latest_update_excerpt', trim( strip_tags( bp_create_excerpt( $update['content'], 180 ) ) ) ) . '&quot;';
    991                 $latest_update .= ' &middot; <a href="' . $bp->root_domain . '/' . $bp->activity->root_slug . '/p/' . $update['id'] . '/"> ' . __( 'View', 'buddypress' ) . '</a>';
     991                $latest_update .= ' &middot; <a href="' . bp_get_root_domain() . '/' . $bp->activity->root_slug . '/p/' . $update['id'] . '/"> ' . __( 'View', 'buddypress' ) . '</a>';
    992992
    993993                return apply_filters( 'bp_get_activity_latest_update', $latest_update  );
  • trunk/bp-blogs/bp-blogs-buddybar.php

    r3952 r3982  
    4949                if ( bp_blog_signup_enabled() ) {
    5050                        echo '<li' . $alt . '>';
    51                         echo '<a href="' . $bp->root_domain . '/' . $bp->blogs->root_slug . '/create/">' . __( 'Create a Blog!', 'buddypress' ) . '</a>';
     51                        echo '<a href="' . bp_get_root_domain() . '/' . $bp->blogs->root_slug . '/create/">' . __( 'Create a Blog!', 'buddypress' ) . '</a>';
    5252                        echo '</li>';
    5353                }
  • trunk/bp-blogs/bp-blogs-template.php

    r3937 r3982  
    222222
    223223                if ( empty( $blogs_template->blog->domain ) )
    224                         $permalink = $bp->root_domain . $blogs_template->blog->path;
     224                        $permalink = bp_get_root_domain() . $blogs_template->blog->path;
    225225                else {
    226226                        $protocol = 'http://';
     
    482482
    483483        if ( bp_is_my_profile() )
    484                 echo apply_filters( 'bp_create_blog_link', '<a href="' . $bp->root_domain . '/' . $bp->blogs->root_slug . '/create/">' . __( 'Create a Blog', 'buddypress' ) . '</a>' );
     484                echo apply_filters( 'bp_create_blog_link', '<a href="' . bp_get_root_domain() . '/' . $bp->blogs->root_slug . '/create/">' . __( 'Create a Blog', 'buddypress' ) . '</a>' );
    485485}
    486486
  • trunk/bp-core/bp-core-avatars.php

    r3860 r3982  
    254254                                $email = bp_core_get_user_email( $item_id );
    255255                        } else if ( 'group' == $object || 'blog' == $object ) {
    256                                 $email = "{$item_id}-{$object}@{$bp->root_domain}";
     256                                $email = "{$item_id}-{$object}@{bp_get_root_domain()}";
    257257                        }
    258258                }
  • trunk/bp-core/bp-core-buddybar.php

    r3952 r3982  
    323323        global $bp;
    324324
    325         echo '<a href="' . $bp->root_domain . '" id="admin-bar-logo">' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '</a>';
     325        echo '<a href="' . bp_get_root_domain() . '" id="admin-bar-logo">' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '</a>';
    326326}
    327327
     
    333333                return false;
    334334
    335         echo '<li class="bp-login no-arrow"><a href="' . $bp->root_domain . '/wp-login.php?redirect_to=' . urlencode( $bp->root_domain ) . '">' . __( 'Log In', 'buddypress' ) . '</a></li>';
     335        echo '<li class="bp-login no-arrow"><a href="' . bp_get_root_domain() . '/wp-login.php?redirect_to=' . urlencode( bp_get_root_domain() ) . '">' . __( 'Log In', 'buddypress' ) . '</a></li>';
    336336
    337337        // Show "Sign Up" link if user registrations are allowed
     
    422422                <a href="#"><?php _e( 'Visit', 'buddypress' ) ?></a>
    423423                <ul class="random-list">
    424                         <li><a href="<?php echo trailingslashit( $bp->root_domain . '/' . $bp->members->root_slug ) . '?random-member' ?>"><?php _e( 'Random Member', 'buddypress' ) ?></a></li>
     424                        <li><a href="<?php echo trailingslashit( bp_get_root_domain() . '/' . $bp->members->root_slug ) . '?random-member' ?>"><?php _e( 'Random Member', 'buddypress' ) ?></a></li>
    425425
    426426                        <?php if ( bp_is_active( 'groups' ) ) : ?>
    427427
    428                                 <li class="alt"><a href="<?php echo trailingslashit( $bp->root_domain . '/' . $bp->groups->root_slug ) . '?random-group' ?>"><?php _e( 'Random Group', 'buddypress' ) ?></a></li>
     428                                <li class="alt"><a href="<?php echo trailingslashit( bp_get_root_domain() . '/' . $bp->groups->root_slug ) . '?random-group' ?>"><?php _e( 'Random Group', 'buddypress' ) ?></a></li>
    429429
    430430                        <?php endif; ?>
     
    432432                        <?php if ( is_multisite() && bp_is_active( 'blogs' ) ) : ?>
    433433
    434                                 <li><a href="<?php echo trailingslashit( $bp->root_domain . '/' . $bp->blogs->root_slug ) . '?random-blog' ?>"><?php _e( 'Random Blog', 'buddypress' ) ?></a></li>
     434                                <li><a href="<?php echo trailingslashit( bp_get_root_domain() . '/' . $bp->blogs->root_slug ) . '?random-blog' ?>"><?php _e( 'Random Blog', 'buddypress' ) ?></a></li>
    435435
    436436                        <?php endif; ?>
  • trunk/bp-core/bp-core-filters.php

    r3972 r3982  
    137137                return wp_get_referer();
    138138
    139         return $bp->root_domain;
     139        return bp_get_root_domain();
    140140}
    141141add_filter( 'login_redirect', 'bp_core_login_redirect' );
  • trunk/bp-core/bp-core-functions.php

    r3955 r3982  
    513513
    514514        if ( empty( $_POST['search-terms'] ) ) {
    515                 bp_core_redirect( $bp->root_domain );
     515                bp_core_redirect( bp_get_root_domain() );
    516516                return;
    517517        }
     
    543543
    544544                if ( empty( $slug ) ) {
    545                         bp_core_redirect( $bp->root_domain );
     545                        bp_core_redirect( bp_get_root_domain() );
    546546                        return;
    547547                }
  • 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
  • trunk/bp-forums/bp-forums-filters.php

    r3660 r3982  
    7676        global $bp;
    7777
    78         return apply_filters( 'bp_forums_filter_tag_link', $bp->root_domain . '/' . $bp->forums->slug . '/tag/' . $tag . '/' );
     78        return apply_filters( 'bp_forums_filter_tag_link', bp_get_root_domain() . '/' . $bp->forums->slug . '/tag/' . $tag . '/' );
    7979}
    8080add_filter( 'bb_get_tag_link', 'bp_forums_filter_tag_link', 10, 4);
     
    124124        $content = htmlspecialchars_decode( $content );
    125125
    126         $pattern = "|<a href=&#039;" . $bp->root_domain . "/" . $bp->members->slug . "/[A-Za-z0-9-_\.]+/&#039; rel=&#039;nofollow&#039;>(@[A-Za-z0-9-_\.]+)</a>|";
     126        $pattern = "|<a href=&#039;" . bp_get_root_domain() . "/" . $bp->members->slug . "/[A-Za-z0-9-_\.]+/&#039; rel=&#039;nofollow&#039;>(@[A-Za-z0-9-_\.]+)</a>|";
    127127
    128128        $content = preg_replace( $pattern, "$1", $content );
  • trunk/bp-forums/bp-forums-screens.php

    r3959 r3982  
    1010                if ( !bp_forums_is_installed_correctly() ) {
    1111                        bp_core_add_message( __( 'The forums component has not been set up yet.', 'buddypress' ), 'error' );
    12                         bp_core_redirect( $bp->root_domain );
     12                        bp_core_redirect( bp_get_root_domain() );
    1313                }
    1414
  • trunk/bp-forums/bp-forums-template.php

    r3933 r3982  
    395395
    396396                /* Currently this will only work with group forums, extended support in the future */
    397                 return apply_filters( 'bp_get_the_topic_object_permalink', $bp->root_domain . '/' . $bp->groups->root_slug . '/' . $forum_template->topic->object_slug . '/forum/' );
     397                return apply_filters( 'bp_get_the_topic_object_permalink', bp_get_root_domain() . '/' . $bp->groups->root_slug . '/' . $forum_template->topic->object_slug . '/forum/' );
    398398        }
    399399
     
    548548
    549549                if ( !empty( $forum_template->topic->object_slug ) )
    550                         $permalink = trailingslashit( $bp->root_domain . '/' . $bp->groups->root_slug . '/' . $forum_template->topic->object_slug );
     550                        $permalink = trailingslashit( bp_get_root_domain() . '/' . $bp->groups->root_slug . '/' . $forum_template->topic->object_slug );
    551551                else if ( !empty( $bp->is_single_item ) )
    552                         $permalink = trailingslashit( $bp->root_domain . '/' . $bp->current_component . '/' . $bp->current_item );
     552                        $permalink = trailingslashit( bp_get_root_domain() . '/' . $bp->current_component . '/' . $bp->current_item );
    553553                else
    554                         $permalink = trailingslashit( $bp->root_domain . '/' . $bp->current_component . '/' . $bp->current_action );
     554                        $permalink = trailingslashit( bp_get_root_domain() . '/' . $bp->current_component . '/' . $bp->current_action );
    555555
    556556                return apply_filters( 'bp_get_the_topic_permalink', trailingslashit( $permalink . 'forum/topic/' . $forum_template->topic->topic_slug ) );
     
    663663                global $bp;
    664664
    665                 return apply_filters( 'bp_get_my_forum_topics_link', $bp->root_domain . '/' . $bp->forums->slug . '/personal/' );
     665                return apply_filters( 'bp_get_my_forum_topics_link', bp_get_root_domain() . '/' . $bp->forums->slug . '/personal/' );
    666666        }
    667667
     
    672672                global $bp;
    673673
    674                 return apply_filters( 'bp_get_unreplied_forum_topics_link', $bp->root_domain . '/' . $bp->forums->slug . '/unreplied/' );
     674                return apply_filters( 'bp_get_unreplied_forum_topics_link', bp_get_root_domain() . '/' . $bp->forums->slug . '/unreplied/' );
    675675        }
    676676
     
    682682                global $bp;
    683683
    684                 return apply_filters( 'bp_get_popular_forum_topics_link', $bp->root_domain . '/' . $bp->forums->slug . '/popular/' );
     684                return apply_filters( 'bp_get_popular_forum_topics_link', bp_get_root_domain() . '/' . $bp->forums->slug . '/popular/' );
    685685        }
    686686
     
    691691                global $bp;
    692692
    693                 return apply_filters( 'bp_get_newest_forum_topics_link', $bp->root_domain . '/' . $bp->forums->slug . '/' );
     693                return apply_filters( 'bp_get_newest_forum_topics_link', bp_get_root_domain() . '/' . $bp->forums->slug . '/' );
    694694        }
    695695
     
    11011101
    11021102                if ( $bp->is_single_item )
    1103                         $permalink = trailingslashit( $bp->root_domain . '/' . $bp->current_component . '/' . $bp->current_item );
     1103                        $permalink = trailingslashit( bp_get_root_domain() . '/' . $bp->current_component . '/' . $bp->current_item );
    11041104                else
    1105                         $permalink = trailingslashit( $bp->root_domain . $bp->current_component . '/' . $bp->current_action );
     1105                        $permalink = trailingslashit( bp_get_root_domain() . $bp->current_component . '/' . $bp->current_action );
    11061106
    11071107                return apply_filters( 'bp_get_forum_permalink', trailingslashit( $permalink . 'forum' ) );
     
    11141114                global $bp;
    11151115
    1116                 return apply_filters( 'bp_get_forum_directory_permalink', trailingslashit( $bp->root_domain . '/' . $bp->forums->root_slug ) );
     1116                return apply_filters( 'bp_get_forum_directory_permalink', trailingslashit( bp_get_root_domain() . '/' . $bp->forums->root_slug ) );
    11171117        }
    11181118
     
    11371137                global $topic_template;
    11381138
    1139                 return apply_filters( 'bp_get_forum_action', $bp->root_domain . esc_attr( $_SERVER['REQUEST_URI'] ) );
     1139                return apply_filters( 'bp_get_forum_action', bp_get_root_domain() . esc_attr( $_SERVER['REQUEST_URI'] ) );
    11401140        }
    11411141
     
    11461146                global $bp;
    11471147
    1148                 return apply_filters( 'bp_get_forum_topic_action', $bp->root_domain . esc_attr( $_SERVER['REQUEST_URI'] ) );
     1148                return apply_filters( 'bp_get_forum_topic_action', bp_get_root_domain() . esc_attr( $_SERVER['REQUEST_URI'] ) );
    11491149        }
    11501150
  • trunk/bp-groups/bp-groups-actions.php

    r3917 r3982  
    3333
    3434                $reset_steps = true;
    35                 bp_core_redirect( $bp->root_domain . '/' . $bp->groups->root_slug . '/create/step/' . array_shift( array_keys( $bp->groups->group_creation_steps ) ) . '/' );
     35                bp_core_redirect( bp_get_root_domain() . '/' . $bp->groups->root_slug . '/create/step/' . array_shift( array_keys( $bp->groups->group_creation_steps ) ) . '/' );
    3636        }
    3737
     
    3939        if ( $bp->action_variables[1] && !$bp->groups->group_creation_steps[$bp->action_variables[1]] ) {
    4040                bp_core_add_message( __('There was an error saving group details. Please try again.', 'buddypress'), 'error' );
    41                 bp_core_redirect( $bp->root_domain . '/' . $bp->groups->root_slug . '/create/' );
     41                bp_core_redirect( bp_get_root_domain() . '/' . $bp->groups->root_slug . '/create/' );
    4242        }
    4343
     
    6161                        if ( empty( $_POST['group-name'] ) || empty( $_POST['group-desc'] ) || !strlen( trim( $_POST['group-name'] ) ) || !strlen( trim( $_POST['group-desc'] ) ) ) {
    6262                                bp_core_add_message( __( 'Please fill in all of the required fields', 'buddypress' ), 'error' );
    63                                 bp_core_redirect( $bp->root_domain . '/' . $bp->groups->root_slug . '/create/step/' . $bp->groups->current_create_step . '/' );
     63                                bp_core_redirect( bp_get_root_domain() . '/' . $bp->groups->root_slug . '/create/step/' . $bp->groups->current_create_step . '/' );
    6464                        }
    6565
     
    6868                        if ( !$bp->groups->new_group_id = groups_create_group( array( 'group_id' => $new_group_id, 'name' => $_POST['group-name'], 'description' => $_POST['group-desc'], 'slug' => groups_check_slug( sanitize_title( esc_attr( $_POST['group-name'] ) ) ), 'date_created' => bp_core_current_time(), 'status' => 'public' ) ) ) {
    6969                                bp_core_add_message( __( 'There was an error saving group details, please try again.', 'buddypress' ), 'error' );
    70                                 bp_core_redirect( $bp->root_domain . '/' . $bp->groups->root_slug . '/create/step/' . $bp->groups->current_create_step . '/' );
     70                                bp_core_redirect( bp_get_root_domain() . '/' . $bp->groups->root_slug . '/create/step/' . $bp->groups->current_create_step . '/' );
    7171                        }
    7272
     
    9595                        if ( !$bp->groups->new_group_id = groups_create_group( array( 'group_id' => $bp->groups->new_group_id, 'status' => $group_status, 'enable_forum' => $group_enable_forum ) ) ) {
    9696                                bp_core_add_message( __( 'There was an error saving group details, please try again.', 'buddypress' ), 'error' );
    97                                 bp_core_redirect( $bp->root_domain . '/' . $bp->groups->root_slug . '/create/step/' . $bp->groups->current_create_step . '/' );
     97                                bp_core_redirect( bp_get_root_domain() . '/' . $bp->groups->root_slug . '/create/step/' . $bp->groups->current_create_step . '/' );
    9898                        }
    9999                }
     
    151151                        }
    152152
    153                         bp_core_redirect( $bp->root_domain . '/' . $bp->groups->root_slug . '/create/step/' . $next_step . '/' );
     153                        bp_core_redirect( bp_get_root_domain() . '/' . $bp->groups->root_slug . '/create/step/' . $next_step . '/' );
    154154                }
    155155        }
     
    274274                $group = groups_get_groups( array( 'type' => 'random', 'per_page' => 1 ) );
    275275
    276                 bp_core_redirect( $bp->root_domain . '/' . $bp->groups->slug . '/' . $group['groups'][0]->slug . '/' );
     276                bp_core_redirect( bp_get_root_domain() . '/' . $bp->groups->slug . '/' . $group['groups'][0]->slug . '/' );
    277277        }
    278278}
  • trunk/bp-groups/bp-groups-classes.php

    r3981 r3982  
    11471147                // Construct the admin edit tab for the new group extension
    11481148                if ( !empty( $this->enable_edit_item ) && !empty( $bp->is_item_admin ) ) {
    1149                         add_action( 'groups_admin_tabs', create_function( '$current, $group_slug', '$selected = ""; if ( "' . esc_attr( $this->slug ) . '" == $current ) $selected = " class=\"current\""; echo "<li{$selected}><a href=\"' . $bp->root_domain . '/' . $bp->groups->slug . '/{$group_slug}/admin/' . esc_attr( $this->slug ) . '\">' . esc_attr( $this->name ) . '</a></li>";' ), 10, 2 );
     1149                        add_action( 'groups_admin_tabs', create_function( '$current, $group_slug', '$selected = ""; if ( "' . esc_attr( $this->slug ) . '" == $current ) $selected = " class=\"current\""; echo "<li{$selected}><a href=\"' . bp_get_root_domain() . '/' . $bp->groups->slug . '/{$group_slug}/admin/' . esc_attr( $this->slug ) . '\">' . esc_attr( $this->name ) . '</a></li>";' ), 10, 2 );
    11501150
    11511151                        // Catch the edit screen and forward it to the plugin template
  • trunk/bp-groups/bp-groups-loader.php

    r3955 r3982  
    242242                        );
    243243
    244                         $group_link = trailingslashit( $bp->root_domain . '/' . $this->root_slug . '/' . $this->current_group->slug );
     244                        $group_link = trailingslashit( bp_get_root_domain() . '/' . $this->root_slug . '/' . $this->current_group->slug );
    245245
    246246                        // Add the "Home" subnav item, as this will always be present
  • trunk/bp-groups/bp-groups-screens.php

    r3957 r3982  
    680680                // Ask for a login if the user is coming here via an email notification
    681681                if ( !is_user_logged_in() )
    682                         bp_core_redirect( site_url( 'wp-login.php?redirect_to=' . $bp->root_domain . '/' . $bp->current_component . '/' . $bp->current_item . '/admin/membership-requests/' ) );
     682                        bp_core_redirect( site_url( 'wp-login.php?redirect_to=' . bp_get_root_domain() . '/' . $bp->current_component . '/' . $bp->current_item . '/admin/membership-requests/' ) );
    683683
    684684                if ( !$bp->is_item_admin || 'public' == $bp->groups->current_group->status )
  • trunk/bp-groups/bp-groups-template.php

    r3955 r3982  
    410410                        $group =& $groups_template->group;
    411411
    412                 return apply_filters( 'bp_get_group_permalink', $bp->root_domain . '/' . $bp->groups->root_slug . '/' . $group->slug . '/' );
     412                return apply_filters( 'bp_get_group_permalink', bp_get_root_domain() . '/' . $bp->groups->root_slug . '/' . $group->slug . '/' );
    413413        }
    414414
     
    422422                        $group =& $groups_template->group;
    423423
    424                 return apply_filters( 'bp_get_group_admin_permalink', $bp->root_domain . '/' . $bp->groups->root_slug . '/' . $group->slug . '/admin' );
     424                return apply_filters( 'bp_get_group_admin_permalink', bp_get_root_domain() . '/' . $bp->groups->root_slug . '/' . $group->slug . '/admin' );
    425425        }
    426426
     
    10491049?>
    10501050        <?php if ( $bp->is_item_admin || $bp->is_item_mod ) { ?>
    1051                 <li<?php if ( 'edit-details' == $current_tab || empty( $current_tab ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->root_slug ?>/<?php echo $group->slug ?>/admin/edit-details"><?php _e('Edit Details', 'buddypress') ?></a></li>
     1051                <li<?php if ( 'edit-details' == $current_tab || empty( $current_tab ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo bp_get_root_domain() . '/' . $bp->groups->root_slug ?>/<?php echo $group->slug ?>/admin/edit-details"><?php _e('Edit Details', 'buddypress') ?></a></li>
    10521052        <?php } ?>
    10531053
     
    10561056                        return false;
    10571057        ?>
    1058         <li<?php if ( 'group-settings' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->root_slug ?>/<?php echo $group->slug ?>/admin/group-settings"><?php _e('Group Settings', 'buddypress') ?></a></li>
    1059         <li<?php if ( 'group-avatar' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->root_slug ?>/<?php echo $group->slug ?>/admin/group-avatar"><?php _e('Group Avatar', 'buddypress') ?></a></li>
    1060         <li<?php if ( 'manage-members' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->root_slug ?>/<?php echo $group->slug ?>/admin/manage-members"><?php _e('Manage Members', 'buddypress') ?></a></li>
     1058        <li<?php if ( 'group-settings' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo bp_get_root_domain() . '/' . $bp->groups->root_slug ?>/<?php echo $group->slug ?>/admin/group-settings"><?php _e('Group Settings', 'buddypress') ?></a></li>
     1059        <li<?php if ( 'group-avatar' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo bp_get_root_domain() . '/' . $bp->groups->root_slug ?>/<?php echo $group->slug ?>/admin/group-avatar"><?php _e('Group Avatar', 'buddypress') ?></a></li>
     1060        <li<?php if ( 'manage-members' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo bp_get_root_domain() . '/' . $bp->groups->root_slug ?>/<?php echo $group->slug ?>/admin/manage-members"><?php _e('Manage Members', 'buddypress') ?></a></li>
    10611061
    10621062        <?php if ( $groups_template->group->status == 'private' ) : ?>
    1063                 <li<?php if ( 'membership-requests' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->root_slug ?>/<?php echo $group->slug ?>/admin/membership-requests"><?php _e('Membership Requests', 'buddypress') ?></a></li>
     1063                <li<?php if ( 'membership-requests' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo bp_get_root_domain() . '/' . $bp->groups->root_slug ?>/<?php echo $group->slug ?>/admin/membership-requests"><?php _e('Membership Requests', 'buddypress') ?></a></li>
    10641064        <?php endif; ?>
    10651065
    10661066        <?php do_action( 'groups_admin_tabs', $current_tab, $group->slug ) ?>
    10671067
    1068         <li<?php if ( 'delete-group' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->root_slug ?>/<?php echo $group->slug ?>/admin/delete-group"><?php _e('Delete Group', 'buddypress') ?></a></li>
     1068        <li<?php if ( 'delete-group' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo bp_get_root_domain() . '/' . $bp->groups->root_slug ?>/<?php echo $group->slug ?>/admin/delete-group"><?php _e('Delete Group', 'buddypress') ?></a></li>
    10691069<?php
    10701070}
     
    17391739                $is_enabled = bp_are_previous_group_creation_steps_complete( $slug ); ?>
    17401740
    1741                 <li<?php if ( $bp->groups->current_create_step == $slug ) : ?> class="current"<?php endif; ?>><?php if ( $is_enabled ) : ?><a href="<?php echo $bp->root_domain . '/' . $bp->groups->root_slug ?>/create/step/<?php echo $slug ?>/"><?php else: ?><span><?php endif; ?><?php echo $counter ?>. <?php echo $step['name'] ?><?php if ( $is_enabled ) : ?></a><?php else: ?></span><?php endif ?></li><?php
     1741                <li<?php if ( $bp->groups->current_create_step == $slug ) : ?> class="current"<?php endif; ?>><?php if ( $is_enabled ) : ?><a href="<?php echo bp_get_root_domain() . '/' . $bp->groups->root_slug ?>/create/step/<?php echo $slug ?>/"><?php else: ?><span><?php endif; ?><?php echo $counter ?>. <?php echo $step['name'] ?><?php if ( $is_enabled ) : ?></a><?php else: ?></span><?php endif ?></li><?php
    17421742                $counter++;
    17431743        }
     
    17631763                        $bp->action_variables[1] = array_shift( array_keys( $bp->groups->group_creation_steps ) );
    17641764
    1765                 return apply_filters( 'bp_get_group_creation_form_action', $bp->root_domain . '/' . $bp->groups->root_slug . '/create/step/' . $bp->action_variables[1] );
     1765                return apply_filters( 'bp_get_group_creation_form_action', bp_get_root_domain() . '/' . $bp->groups->root_slug . '/create/step/' . $bp->action_variables[1] );
    17661766        }
    17671767
     
    24922492                // Append $action to $url if there is no $type
    24932493                if ( !empty( $action ) )
    2494                         $url = $bp->root_domain . '/' . $bp->groups->root_slug . '/' . $bp->groups->current_group->slug . '/' . $action;
     2494                        $url = bp_get_root_domain() . '/' . $bp->groups->root_slug . '/' . $bp->groups->current_group->slug . '/' . $action;
    24952495                else
    2496                         $url = $bp->root_domain . '/' . $bp->groups->root_slug . '/' . $bp->groups->current_group->slug;
     2496                        $url = bp_get_root_domain() . '/' . $bp->groups->root_slug . '/' . $bp->groups->current_group->slug;
    24972497
    24982498                // Add a slash at the end of our user url
  • trunk/bp-members/bp-members-functions.php

    r3972 r3982  
    8686                // If we are using a members slug, include it.
    8787                if ( !defined( 'BP_ENABLE_ROOT_PROFILES' ) )
    88                         $domain = $bp->root_domain . '/' . $bp->members->root_slug . '/' . $username;
     88                        $domain = bp_get_root_domain() . '/' . $bp->members->root_slug . '/' . $username;
    8989                else
    90                         $domain = $bp->root_domain . '/' . $username;
     90                        $domain = bp_get_root_domain() . '/' . $username;
    9191
    9292                // Add a slash at the end
  • trunk/bp-members/bp-members-signup.php

    r3960 r3982  
    1111
    1212        if ( bp_is_component_front_page( 'register' ) && ( is_user_logged_in() || !bp_get_signup_allowed() ) )
    13                 bp_core_redirect( $bp->root_domain . '/' . $bp->members->slug );
     13                bp_core_redirect( bp_get_root_domain() . '/' . $bp->members->slug );
    1414
    1515        // If the user is logged in, redirect away from here
    1616        if ( is_user_logged_in() )
    17                 bp_core_redirect( $bp->root_domain );
     17                bp_core_redirect( bp_get_root_domain() );
    1818
    1919        // If signups are disabled, just re-direct
    2020        if ( !bp_get_signup_allowed() )
    21                 bp_core_redirect( $bp->root_domain );
     21                bp_core_redirect( bp_get_root_domain() );
    2222
    2323        $bp->signup->step = 'request-details';
     
    7373                        // This situation doesn't naturally occur so bounce to website root
    7474                        } else {
    75                                 bp_core_redirect( $bp->root_domain );
     75                                bp_core_redirect( bp_get_root_domain() );
    7676                        }
    7777                }
     
    167167                if ( !empty( $user->errors ) ) {
    168168                        bp_core_add_message( $user->get_error_message(), 'error' );
    169                         bp_core_redirect( $bp->root_domain . '/' . BP_ACTIVATION_SLUG );
     169                        bp_core_redirect( bp_get_root_domain() . '/' . BP_ACTIVATION_SLUG );
    170170                }
    171171
  • trunk/bp-members/bp-members-template.php

    r3955 r3982  
    445445
    446446                if ( !empty( $update['id'] ) )
    447                         $update_content .= ' &middot; <a href="' . $bp->root_domain . '/' . $bp->activity->root_slug . '/p/' . $update['id'] . '">' . __( 'View', 'buddypress' ) . '</a>';
     447                        $update_content .= ' &middot; <a href="' . bp_get_root_domain() . '/' . $bp->activity->root_slug . '/p/' . $update['id'] . '">' . __( 'View', 'buddypress' ) . '</a>';
    448448
    449449                return apply_filters( 'bp_get_member_latest_update', $update_content );
     
    580580        // Always add a log out list item to the end of the navigation
    581581        if ( function_exists( 'wp_logout_url' ) )
    582                 $logout_link = '<li><a id="wp-logout" href="' .  wp_logout_url( $bp->root_domain ) . '">' . __( 'Log Out', 'buddypress' ) . '</a></li>';
     582                $logout_link = '<li><a id="wp-logout" href="' .  wp_logout_url( bp_get_root_domain() ) . '">' . __( 'Log Out', 'buddypress' ) . '</a></li>';
    583583        else
    584                 $logout_link = '<li><a id="wp-logout" href="' . site_url() . '/wp-login.php?action=logout&amp;redirect_to=' . $bp->root_domain . '">' . __( 'Log Out', 'buddypress' ) . '</a></li>';
     584                $logout_link = '<li><a id="wp-logout" href="' . site_url() . '/wp-login.php?action=logout&amp;redirect_to=' . bp_get_root_domain() . '">' . __( 'Log Out', 'buddypress' ) . '</a></li>';
    585585
    586586        echo apply_filters( 'bp_logout_nav_link', $logout_link );
     
    802802
    803803                if ( bp_has_custom_signup_page() )
    804                         $page = $bp->root_domain . '/' . BP_REGISTER_SLUG;
    805                 else
    806                         $page = $bp->root_domain . '/wp-signup.php';
     804                        $page = bp_get_root_domain() . '/' . BP_REGISTER_SLUG;
     805                else
     806                        $page = bp_get_root_domain() . '/wp-signup.php';
    807807
    808808                return apply_filters( 'bp_get_signup_page', $page );
     
    823823
    824824                if ( bp_has_custom_activation_page() )
    825                         $page = trailingslashit( $bp->root_domain ) . BP_ACTIVATION_SLUG;
    826                 else
    827                         $page = trailingslashit( $bp->root_domain ) . 'wp-activate.php';
     825                        $page = trailingslashit( bp_get_root_domain() ) . BP_ACTIVATION_SLUG;
     826                else
     827                        $page = trailingslashit( bp_get_root_domain() ) . 'wp-activate.php';
    828828
    829829                return apply_filters( 'bp_get_activation_page', $page );
  • trunk/bp-themes/bp-default/_inc/ajax.php

    r3967 r3982  
    211211                                        <?php echo bp_core_get_userlink( bp_get_activity_user_id() ) ?> &middot; <?php printf( __( '%s ago', 'buddypress' ), bp_core_time_since( bp_core_current_time() ) ) ?> &middot;
    212212                                        <a class="acomment-reply" href="#acomment-<?php bp_activity_id() ?>" id="acomment-reply-<?php echo esc_attr( $_POST['form_id'] ) ?>"><?php _e( 'Reply', 'buddypress' ) ?></a>
    213                                          &middot; <a href="<?php echo wp_nonce_url( $bp->root_domain . '/' . $bp->activity->slug . '/delete/' . bp_get_activity_id() . '?cid=' . $comment_id, 'bp_activity_delete_link' ) ?>" class="delete acomment-delete confirm" rel="nofollow"><?php _e( 'Delete', 'buddypress' ) ?></a>
     213                                         &middot; <a href="<?php echo wp_nonce_url( bp_get_root_domain() . '/' . $bp->activity->slug . '/delete/' . bp_get_activity_id() . '?cid=' . $comment_id, 'bp_activity_delete_link' ) ?>" class="delete acomment-delete confirm" rel="nofollow"><?php _e( 'Delete', 'buddypress' ) ?></a>
    214214                                </div>
    215215
  • trunk/bp-xprofile/bp-xprofile-screens.php

    r3791 r3982  
    4040        // Check the field group exists
    4141        if ( !xprofile_get_field_group( $bp->action_variables[1] ) )
    42                 bp_core_redirect( $bp->root_domain );
     42                bp_core_redirect( bp_get_root_domain() );
    4343
    4444        // Check to see if any new information has been submitted
Note: See TracChangeset for help on using the changeset viewer.