Skip to:
Content

BuddyPress.org

Ticket #3582: 3582.02.patch

File 3582.02.patch, 1.4 KB (added by boonebgorges, 10 years ago)
  • bp-core/bp-core-filters.php

    function bp_modify_page_title( $title, $sep, $seplocation ) { 
    299299                if ( !bp_current_component() )
    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
    305305        } elseif ( bp_is_register_page() ) {
  • bp-core/bp-core-template.php

    function bp_root_slug( $component = '' ) { 
    652652
    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
    658660                        if ( !empty( $bp->{$component_name}->root_slug ) ) {