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-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
Note: See TracChangeset for help on using the changeset viewer.