# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: includes\common
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
|
|
|
|
| 2471 | 2471 | // Store original title to compare |
| 2472 | 2472 | $_title = $title; |
| 2473 | 2473 | |
| | 2474 | // bbPress title args array. |
| | 2475 | $title = array( ); |
| | 2476 | |
| 2474 | 2477 | /** Archives **************************************************************/ |
| 2475 | 2478 | |
| 2476 | 2479 | // Forum Archive |
| 2477 | 2480 | if ( bbp_is_forum_archive() ) { |
| 2478 | | $title = bbp_get_forum_archive_title(); |
| | 2481 | $title['text'] = bbp_get_forum_archive_title(); |
| 2479 | 2482 | |
| 2480 | 2483 | // Topic Archive |
| 2481 | 2484 | } elseif ( bbp_is_topic_archive() ) { |
| 2482 | | $title = bbp_get_topic_archive_title(); |
| | 2485 | $title['text'] = bbp_get_topic_archive_title(); |
| 2483 | 2486 | |
| 2484 | 2487 | /** Singles ***************************************************************/ |
| 2485 | 2488 | |
| 2486 | 2489 | // Forum page |
| 2487 | 2490 | } elseif ( bbp_is_single_forum() ) { |
| 2488 | | $title = sprintf( __( 'Forum: %s', 'bbpress' ), bbp_get_forum_title() ); |
| | 2491 | $title['text'] = bbp_get_forum_title(); |
| | 2492 | $title['layout'] = __( 'Forum: %s', 'bbpress' ); |
| 2489 | 2493 | |
| 2490 | 2494 | // Topic page |
| 2491 | 2495 | } elseif ( bbp_is_single_topic() ) { |
| 2492 | | $title = sprintf( __( 'Topic: %s', 'bbpress' ), bbp_get_topic_title() ); |
| | 2496 | $title['text'] = bbp_get_topic_title(); |
| | 2497 | $title['layout'] = __( 'Topic: %s', 'bbpress' ); |
| 2493 | 2498 | |
| 2494 | 2499 | // Replies |
| 2495 | 2500 | } elseif ( bbp_is_single_reply() ) { |
| 2496 | | $title = bbp_get_reply_title(); |
| | 2501 | $title['text'] = bbp_get_reply_title(); |
| 2497 | 2502 | |
| 2498 | 2503 | // Topic tag page (or edit) |
| 2499 | 2504 | } elseif ( bbp_is_topic_tag() || bbp_is_topic_tag_edit() || get_query_var( 'bbp_topic_tag' ) ) { |
| 2500 | | $term = get_queried_object(); |
| 2501 | | $title = sprintf( __( 'Topic Tag: %s', 'bbpress' ), $term->name ); |
| | 2505 | $title['text'] = single_term_title( '', false ); |
| | 2506 | $title['layout'] = __( 'Topic Tag: %s', 'bbpress' ); |
| 2502 | 2507 | |
| 2503 | 2508 | /** Users *****************************************************************/ |
| 2504 | 2509 | |
| … |
… |
|
| 2507 | 2512 | |
| 2508 | 2513 | // Current users profile |
| 2509 | 2514 | if ( bbp_is_user_home() ) { |
| 2510 | | $title = __( 'Your Profile', 'bbpress' ); |
| | 2515 | $title['text'] = __( 'Your Profile', 'bbpress' ); |
| 2511 | 2516 | |
| 2512 | 2517 | // Other users profile |
| 2513 | 2518 | } else { |
| 2514 | | $userdata = get_userdata( bbp_get_user_id() ); |
| 2515 | | $title = sprintf( __( '%s\'s Profile', 'bbpress' ), $userdata->display_name ); |
| | 2519 | $title['text'] = get_userdata( bbp_get_user_id() )->display_name; |
| | 2520 | $title['layout'] = __( '%s\'s Profile', 'bbpress' ); |
| 2516 | 2521 | } |
| 2517 | 2522 | |
| 2518 | 2523 | // Profile edit page |
| … |
… |
|
| 2520 | 2525 | |
| 2521 | 2526 | // Current users profile |
| 2522 | 2527 | if ( bbp_is_user_home_edit() ) { |
| 2523 | | $title = __( 'Edit Your Profile', 'bbpress' ); |
| | 2528 | $title['text'] = __( 'Edit Your Profile', 'bbpress' ); |
| 2524 | 2529 | |
| 2525 | 2530 | // Other users profile |
| 2526 | 2531 | } else { |
| 2527 | | $userdata = get_userdata( bbp_get_user_id() ); |
| 2528 | | $title = sprintf( __( 'Edit %s\'s Profile', 'bbpress' ), $userdata->display_name ); |
| | 2532 | $title['text'] = get_userdata( bbp_get_user_id() )->display_name; |
| | 2533 | $title['layout'] = __( 'Edit %s\'s Profile', 'bbpress' ); |
| 2529 | 2534 | } |
| 2530 | 2535 | |
| 2531 | 2536 | /** Views *****************************************************************/ |
| 2532 | 2537 | |
| 2533 | 2538 | // Views |
| 2534 | 2539 | } elseif ( bbp_is_single_view() ) { |
| 2535 | | $title = sprintf( __( 'View: %s', 'bbpress' ), bbp_get_view_title() ); |
| | 2540 | $title['text'] = bbp_get_view_title(); |
| | 2541 | $title['layout'] = __( 'View: %s', 'bbpress' ); |
| 2536 | 2542 | |
| 2537 | 2543 | /** Search ****************************************************************/ |
| 2538 | 2544 | |
| 2539 | 2545 | // Search |
| 2540 | 2546 | } elseif ( bbp_is_search() ) { |
| 2541 | | $title = bbp_get_search_title(); |
| | 2547 | $title['text'] = bbp_get_search_title(); |
| 2542 | 2548 | } |
| | 2549 | |
| | 2550 | // Allow to change the title layout/text |
| | 2551 | $title = apply_filters( 'bbp_raw_title_args', $title ); |
| | 2552 | |
| | 2553 | // Set title array defaults |
| | 2554 | $title = wp_parse_args( $title, array( |
| | 2555 | 'text' => null, |
| | 2556 | 'layout' => '%s' |
| | 2557 | ) ); |
| | 2558 | |
| | 2559 | // Set the raw title |
| | 2560 | $title = sprintf( $title['layout'], $title['text'] ); |
| 2543 | 2561 | |
| 2544 | 2562 | // Filter the raw title |
| 2545 | 2563 | $title = apply_filters( 'bbp_raw_title', $title, $sep, $seplocation ); |