Skip to:
Content

BuddyPress.org

Changeset 5359


Ignore:
Timestamp:
11/24/2011 03:42:59 AM (15 years ago)
Author:
boonebgorges
Message:

Don't set a current component when show_on_front is set to a BP component but a WP object is being requested via the 'p' URL parameter, as in Preview mode. Fixes #3747

File:
1 edited

Legend:

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

    r5329 r5359  
    124124
    125125        // If a component is set to the front page, force its name into $bp_uri
    126         // so that $current_component is populated
    127         if ( 'page' == get_option( 'show_on_front' ) && get_option( 'page_on_front' ) && empty( $bp_uri ) ) {
     126        // so that $current_component is populated (unless a specific WP post is being requested
     127        // via a URL parameter, usually signifying Preview mode)
     128        if ( 'page' == get_option( 'show_on_front' ) && get_option( 'page_on_front' ) && empty( $bp_uri ) && empty( $_GET['p'] ) ) {
    128129                $post = get_post( get_option( 'page_on_front' ) );
    129130                if ( !empty( $post ) ) {
Note: See TracChangeset for help on using the changeset viewer.