Skip to:
Content

BuddyPress.org

Changeset 4652


Ignore:
Timestamp:
07/12/2011 03:29:12 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Audit the usage of $bp->forums->slug and $bp->forums->root_slug. See #3325.

Location:
trunk
Files:
3 edited

Legend:

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

    r4651 r4652  
    832832
    833833            case 'forums':
    834                 $slug = bp_is_active( 'forums' ) ? $bp->forums->root_slug : '';
     834                $slug = bp_is_active( 'forums' ) ? bp_get_groups_root_slug() : '';
    835835                $query_string = '/?fs=';
    836836                break;
  • trunk/bp-forums/bp-forums-filters.php

    r4536 r4652  
    7676    global $bp;
    7777
    78     return apply_filters( 'bp_forums_filter_tag_link', bp_get_root_domain() . '/' . $bp->forums->root_slug . '/tag/' . $tag . '/' );
     78    return apply_filters( 'bp_forums_filter_tag_link', bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/tag/' . $tag . '/' );
    7979}
    8080add_filter( 'bb_get_tag_link', 'bp_forums_filter_tag_link', 10, 4);
  • trunk/bp-forums/bp-forums-template.php

    r4648 r4652  
    689689        global $bp;
    690690
    691         return apply_filters( 'bp_get_my_forum_topics_link', bp_get_root_domain() . '/' . $bp->forums->slug . '/personal/' );
     691        return apply_filters( 'bp_get_my_forum_topics_link', bp_get_root_domain() . '/' . bp_get_forums_root_slug() . '/personal/' );
    692692    }
    693693
     
    698698        global $bp;
    699699
    700         return apply_filters( 'bp_get_unreplied_forum_topics_link', bp_get_root_domain() . '/' . $bp->forums->slug . '/unreplied/' );
     700        return apply_filters( 'bp_get_unreplied_forum_topics_link', bp_get_root_domain() . '/' . bp_get_forums_root_slug() . '/unreplied/' );
    701701    }
    702702
     
    708708        global $bp;
    709709
    710         return apply_filters( 'bp_get_popular_forum_topics_link', bp_get_root_domain() . '/' . $bp->forums->slug . '/popular/' );
     710        return apply_filters( 'bp_get_popular_forum_topics_link', bp_get_root_domain() . '/' . bp_get_forums_root_slug() . '/popular/' );
    711711    }
    712712
     
    717717        global $bp;
    718718
    719         return apply_filters( 'bp_get_newest_forum_topics_link', bp_get_root_domain() . '/' . $bp->forums->slug . '/' );
     719        return apply_filters( 'bp_get_newest_forum_topics_link', bp_get_root_domain() . '/' . bp_get_forums_root_slug() . '/' );
    720720    }
    721721
     
    726726        global $bp;
    727727
    728         if ( !bp_is_directory() || !$bp->current_action )
     728        if ( !bp_is_directory() || !bp_current_action() )
    729729            return 'newest';
    730730
    731 
    732         return apply_filters( 'bp_get_forum_topic_type', $bp->current_action );
     731        return apply_filters( 'bp_get_forum_topic_type', bp_current_action() );
    733732    }
    734733
     
    739738        global $bp;
    740739
    741         if ( bp_is_directory() && $bp->forums->slug == $bp->current_component )
    742             return apply_filters( 'bp_get_forums_tag_name', $bp->action_variables[0] );
     740        if ( bp_is_directory() && bp_is_forums_component() && !empty( $bp->action_variables[0] ) )
     741            $tag_name = $bp->action_variables[0];
     742        else
     743            $tag_name = false;
     744
     745        return apply_filters( 'bp_get_forums_tag_name', $tag_name );
    743746    }
    744747
     
    11771180        global $bp;
    11781181
    1179         return apply_filters( 'bp_get_forum_directory_permalink', trailingslashit( bp_get_root_domain() . '/' . $bp->forums->root_slug ) );
     1182        return apply_filters( 'bp_get_forum_directory_permalink', trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() ) );
    11801183    }
    11811184
Note: See TracChangeset for help on using the changeset viewer.