Skip to:
Content

BuddyPress.org

Ticket #6077: 6077.01.patch

File 6077.01.patch, 1.0 KB (added by DJPaul, 7 years ago)
  • src/bp-core/bp-core-filters.php

    diff --git a/src/bp-core/bp-core-filters.php b/src/bp-core/bp-core-filters.php
    index d290903..ad23f0b 100644
    a b function bp_modify_page_title( $title, $sep = '', $seplocation = '' ) { 
    465465                }
    466466
    467467                // Append action name if we're on a member component sub-page
    468                 if ( ! empty( $bp->bp_options_nav[ $component_id ][ bp_current_action() ]['name'] ) && ! empty( $bp->canonical_stack['action'] ) ) {
    469                         $component_subnav_name = "{$bp->bp_options_nav[ $component_id ][ bp_current_action() ]['name']}";
     468                if ( ! empty( $bp->bp_options_nav[ $component_id ] ) && ! empty( $bp->canonical_stack['action'] ) ) {
     469                        $component_subnav_name = wp_filter_object_list( $bp->bp_options_nav[ $component_id ], array( 'slug' => bp_current_action() ), 'and', 'name' );
     470
     471                        if ( $component_subnav_name ) {
     472                                $component_subnav_name = array_shift( $component_subnav_name );
     473                        } else {
     474                                $component_subnav_name = '';
     475                        }
     476
    470477                } else {
    471478                        $component_subnav_name = '';
    472479                }