Skip to:
Content

BuddyPress.org

Changeset 5934


Ignore:
Timestamp:
03/16/2012 04:22:12 AM (14 years ago)
Author:
johnjamesjacoby
Message:

Whitelist 'page' action variable to prevent bbPress pagination from unsetting the action in the canonical_stack. Fixes #4084.

File:
1 edited

Legend:

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

    r5929 r5934  
    8080        // version will not contain this subnav slug.
    8181        if ( !empty( $default_subnav_slug ) && bp_is_current_action( $default_subnav_slug ) ) {
    82             unset( $bp->canonical_stack['action'] );
     82            if ( ! bp_is_action_variable( 'page', 0 ) && ! bp_action_variable( 1 ) ) {
     83                unset( $bp->canonical_stack['action'] );
     84            }
    8385        } else if ( !bp_current_action() ) {
    8486            if ( is_object( $screen_function[0] ) ) {
     
    100102        // The canonical version will not contain this subnav slug.
    101103        if ( !empty( $default_subnav_slug ) && bp_is_current_action( $default_subnav_slug ) ) {
    102             unset( $bp->canonical_stack['action'] );
     104            if ( ! bp_is_action_variable( 'page', 0 ) && ! bp_action_variable( 1 ) ) {
     105                unset( $bp->canonical_stack['action'] );
     106            }
    103107        } else if ( !bp_current_action() ) {
    104108            if ( is_object( $screen_function[0] ) ) {
Note: See TracChangeset for help on using the changeset viewer.