Skip to:
Content

BuddyPress.org

Changeset 5360


Ignore:
Timestamp:
11/24/2011 03:43:29 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
  • branches/1.5/bp-core/bp-core-catchuri.php

    r5234 r5360  
    112112
    113113        // If a component is set to the front page, force its name into $bp_uri
    114         // so that $current_component is populated
    115         if ( 'page' == get_option( 'show_on_front' ) && get_option( 'page_on_front' ) && empty( $bp_uri ) ) {
     114        // so that $current_component is populated (unless a specific WP post is being requested
     115        // via a URL parameter, usually signifying Preview mode)
     116        if ( 'page' == get_option( 'show_on_front' ) && get_option( 'page_on_front' ) && empty( $bp_uri ) && empty( $_GET['p'] ) ) {
    116117                $post = get_post( get_option( 'page_on_front' ) );
    117118                if ( !empty( $post ) ) {
Note: See TracChangeset for help on using the changeset viewer.