Changeset 9104
- Timestamp:
- 10/29/2014 07:39:14 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-core/bp-core-filters.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-filters.php
r9103 r9104 428 428 429 429 // If this is not a BP page, just return the title produced by WP 430 if ( bp_is_blog_page() ) 430 if ( bp_is_blog_page() ) { 431 431 return $title; 432 } 432 433 433 434 // If this is a 404, let WordPress handle it … … 437 438 438 439 // If this is the front page of the site, return WP's title 439 if ( is_front_page() || is_home() ) 440 if ( is_front_page() || is_home() ) { 440 441 return $title; 442 } 441 443 442 444 $title = ''; 443 445 444 446 // Displayed user 445 if ( bp_get_displayed_user_fullname() && ! is_404() ) {447 if ( bp_get_displayed_user_fullname() && ! is_404() ) { 446 448 447 449 // Get the component's ID to try and get it's name … … 449 451 450 452 // Use the actual component name 451 if ( ! empty( $bp->{$component_id}->name ) ) {453 if ( ! empty( $bp->{$component_id}->name ) ) { 452 454 $component_name = $bp->{$component_id}->name; 453 455 454 456 // Fall back on the component ID (probably same as current_component) 455 } elseif ( ! empty( $bp->{$component_id}->id ) ) {457 } elseif ( ! empty( $bp->{$component_id}->id ) ) { 456 458 $component_name = $bp->{$component_id}->id; 457 459 } … … 461 463 462 464 // A single group 463 } elseif ( bp_is_active( 'groups' ) && ! empty( $bp->groups->current_group ) && !empty( $bp->bp_options_nav[$bp->groups->current_group->slug] ) ) {464 $subnav = isset( $bp->bp_options_nav[ $bp->groups->current_group->slug][bp_current_action()]['name'] ) ? $bp->bp_options_nav[$bp->groups->current_group->slug][bp_current_action()]['name'] : '';465 } elseif ( bp_is_active( 'groups' ) && ! empty( $bp->groups->current_group ) && ! empty( $bp->bp_options_nav[$bp->groups->current_group->slug] ) ) { 466 $subnav = isset( $bp->bp_options_nav[ $bp->groups->current_group->slug ][ bp_current_action() ]['name'] ) ? $bp->bp_options_nav[ $bp->groups->current_group->slug ][ bp_current_action() ]['name'] : ''; 465 467 // translators: "group name | group nav section name" 466 468 $title = sprintf( __( '%1$s | %2$s', 'buddypress' ), $bp->bp_options_title, $subnav ); … … 469 471 } elseif ( bp_is_single_item() ) { 470 472 // translators: "component item name | component nav section name | root component name" 471 $title = sprintf( __( '%1$s | %2$s | %3$s', 'buddypress' ), $bp->bp_options_title, $bp->bp_options_nav[ bp_current_item()][bp_current_action()]['name'], bp_get_name_from_root_slug( bp_get_root_slug() ) );473 $title = sprintf( __( '%1$s | %2$s | %3$s', 'buddypress' ), $bp->bp_options_title, $bp->bp_options_nav[ bp_current_item() ][ bp_current_action() ]['name'], bp_get_name_from_root_slug( bp_get_root_slug() ) ); 472 474 473 475 // An index or directory
Note: See TracChangeset
for help on using the changeset viewer.