Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/08/2011 09:37:42 PM (13 years ago)
Author:
boonebgorges
Message:

Force ambiguous item URIs to resolve to their most specific versions, to avoid content duplication. Fixes #1741

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-members/bp-members-loader.php

    r5302 r5313  
    115115        }
    116116
    117         if ( !$bp->current_component && bp_displayed_user_id() )
    118             $bp->current_component = $bp->default_component;
     117        if ( !bp_current_component() && bp_displayed_user_id() ) {
     118            /**
     119             * BuddyPress will attempt to resolve to the most specific URL possible,
     120             * to avoid search-engine-unfriendly content reduplication. Filter
     121             * bp_guarantee_unique_uris (and return false) to avoid this behavior
     122             */
     123            if ( apply_filters( 'bp_guarantee_unique_uris', true ) ) {
     124                bp_core_redirect( bp_displayed_user_domain() . $bp->default_component );
     125            } else {
     126                $bp->current_component = $bp->default_component;
     127            }
     128        }
    119129    }
    120130
Note: See TracChangeset for help on using the changeset viewer.