Skip to:
Content

Changeset 5153


Ignore:
Timestamp:
09/16/2011 08:22:32 PM (7 years ago)
Author:
boonebgorges
Message:

Ensures that bp_get_root_slug() gets the proper root_slug when searching in active_components. Ensures that the title of component directories is correct when the component slug has been changed from the default. Fixes #3582. Props r-a-y

Location:
trunk/bp-core
Files:
2 edited

Legend:

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

    r5127 r5153  
    300300            $title = sprintf( __( '%s Directory', 'buddypress' ), bp_get_name_from_root_slug( bp_members_slug() ) );
    301301        else
    302             $title = sprintf( __( '%s Directory', 'buddypress' ), bp_get_name_from_root_slug() );
     302            $title = sprintf( __( '%s Directory', 'buddypress' ), bp_get_name_from_root_slug( bp_get_root_slug() ) );
    303303
    304304    // Sign up page
  • trunk/bp-core/bp-core-template.php

    r5134 r5153  
    653653        // Component is active
    654654        if ( !empty( $bp->active_components[$component] ) ) {
    655             $component_name = $bp->active_components[$component];
     655            // Backward compatibility: in legacy plugins, the canonical component id
     656            // was stored as an array value in $bp->active_components
     657            $component_name = '1' == $bp->active_components[$component] ? $component : $bp->active_components[$component];
    656658
    657659            // Component has specific root slug
Note: See TracChangeset for help on using the changeset viewer.