Skip to:
Content

BuddyPress.org

Changeset 5570


Ignore:
Timestamp:
12/17/2011 05:45:59 PM (13 years ago)
Author:
boonebgorges
Message:

Don't exclude pages in bp_core_exclude_pages() on non-root blogs.
Fixes #3864.
Props npetetin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.5/bp-core/bp-core-filters.php

    r5354 r5570  
    1414function bp_core_exclude_pages( $pages ) {
    1515    global $bp;
    16 
    17     if ( !empty( $bp->pages->activate ) )
    18         $pages[] = $bp->pages->activate->id;
    19 
    20     if ( !empty( $bp->pages->register ) )
    21         $pages[] = $bp->pages->register->id;
    22 
    23     if ( !empty( $bp->pages->forums ) && ( !bp_is_active( 'forums' ) || ( bp_is_active( 'forums' ) && bp_forums_has_directory() && !bp_forums_is_installed_correctly() ) ) )
    24         $pages[] = $bp->pages->forums->id;
     16   
     17    if ( bp_is_root_blog() ) {
     18        if ( !empty( $bp->pages->activate ) )
     19            $pages[] = $bp->pages->activate->id;
     20   
     21        if ( !empty( $bp->pages->register ) )
     22            $pages[] = $bp->pages->register->id;
     23   
     24        if ( !empty( $bp->pages->forums ) && ( !bp_is_active( 'forums' ) || ( bp_is_active( 'forums' ) && bp_forums_has_directory() && !bp_forums_is_installed_correctly() ) ) )
     25            $pages[] = $bp->pages->forums->id;
     26    }
    2527
    2628    return apply_filters( 'bp_core_exclude_pages', $pages );
Note: See TracChangeset for help on using the changeset viewer.