Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/17/2017 06:57:37 PM (9 years ago)
Author:
dcavins
Message:

Redirect group requests to new group slug.

If a user attempts to visit a group using an old slug, redirect her to
the current URI.

Fixes #6014.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/classes/class-bp-groups-component.php

    r11544 r11559  
    197197
    198198        // Are we viewing a single group?
    199         if ( bp_is_groups_component() && $group_id = BP_Groups_Group::group_exists( bp_current_action() ) ) {
    200 
     199        if ( bp_is_groups_component()
     200            && ( ( $group_id = BP_Groups_Group::group_exists( bp_current_action() ) )
     201                || ( $group_id = BP_Groups_Group::get_id_by_previous_slug( bp_current_action() ) ) )
     202            ) {
    201203            $bp->is_single_item  = true;
    202204
Note: See TracChangeset for help on using the changeset viewer.