# 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 | // Title 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 | |
| | 2487 | /** Edit *****************************************************************/ |
| | 2488 | |
| | 2489 | // Forum edit page |
| | 2490 | } elseif (bbp_is_forum_edit() ) { |
| | 2491 | $title['text'] = bbp_get_forum_title(); |
| | 2492 | $title['format'] = __( 'Forum Edit: %s', 'bbpress' ); |
| | 2493 | |
| | 2494 | // Topic edit page |
| | 2495 | } elseif ( bbp_is_topic_edit() ) { |
| | 2496 | $title['text'] = bbp_get_topic_title(); |
| | 2497 | $title['format'] = __( 'Topic Edit: %s', 'bbpress' ); |
| | 2498 | |
| | 2499 | // Reply edit page |
| | 2500 | } elseif ( bbp_is_reply_edit() ) { |
| | 2501 | $title['text'] = bbp_get_reply_title(); |
| | 2502 | $title['format'] = __( 'Reply Edit: %s', 'bbpress' ); |
| | 2503 | |
| | 2504 | // Topic tag edit page |
| | 2505 | } elseif ( bbp_is_topic_tag_edit() ) { |
| | 2506 | $title['text'] = bbp_get_topic_tag_name(); |
| | 2507 | $title['format'] = __( 'Topic Tag Edit: %s', 'bbpress' ); |
| | 2508 | |
| 2484 | 2509 | /** Singles ***************************************************************/ |
| 2485 | 2510 | |
| 2486 | 2511 | // Forum page |
| 2487 | 2512 | } elseif ( bbp_is_single_forum() ) { |
| 2488 | | $title = sprintf( __( 'Forum: %s', 'bbpress' ), bbp_get_forum_title() ); |
| | 2513 | $title['text'] = bbp_get_forum_title(); |
| | 2514 | $title['format'] = __( 'Forum: %s', 'bbpress' ); |
| 2489 | 2515 | |
| 2490 | 2516 | // Topic page |
| 2491 | 2517 | } elseif ( bbp_is_single_topic() ) { |
| 2492 | | $title = sprintf( __( 'Topic: %s', 'bbpress' ), bbp_get_topic_title() ); |
| | 2518 | $title['text'] = bbp_get_topic_title(); |
| | 2519 | $title['format'] = __( 'Topic: %s', 'bbpress' ); |
| 2493 | 2520 | |
| 2494 | 2521 | // Replies |
| 2495 | 2522 | } elseif ( bbp_is_single_reply() ) { |
| 2496 | | $title = bbp_get_reply_title(); |
| | 2523 | $title['text'] = bbp_get_reply_title(); |
| 2497 | 2524 | |
| 2498 | | // Topic tag page (or edit) |
| 2499 | | } 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 ); |
| | 2525 | // Topic tag page |
| | 2526 | } elseif ( bbp_is_topic_tag() || get_query_var( 'bbp_topic_tag' ) ) { |
| | 2527 | $title['text'] = bbp_get_topic_tag_name(); |
| | 2528 | $title['format'] = __( 'Topic Tag: %s', 'bbpress' ); |
| 2502 | 2529 | |
| 2503 | 2530 | /** Users *****************************************************************/ |
| 2504 | 2531 | |
| … |
… |
|
| 2507 | 2534 | |
| 2508 | 2535 | // Current users profile |
| 2509 | 2536 | if ( bbp_is_user_home() ) { |
| 2510 | | $title = __( 'Your Profile', 'bbpress' ); |
| | 2537 | $title['text'] = __( 'Your Profile', 'bbpress' ); |
| 2511 | 2538 | |
| 2512 | 2539 | // Other users profile |
| 2513 | 2540 | } else { |
| 2514 | | $userdata = get_userdata( bbp_get_user_id() ); |
| 2515 | | $title = sprintf( __( '%s\'s Profile', 'bbpress' ), $userdata->display_name ); |
| | 2541 | $title['text'] = get_userdata( bbp_get_user_id() )->display_name; |
| | 2542 | $title['format'] = __( '%s\'s Profile', 'bbpress' ); |
| 2516 | 2543 | } |
| 2517 | 2544 | |
| 2518 | 2545 | // Profile edit page |
| … |
… |
|
| 2520 | 2547 | |
| 2521 | 2548 | // Current users profile |
| 2522 | 2549 | if ( bbp_is_user_home_edit() ) { |
| 2523 | | $title = __( 'Edit Your Profile', 'bbpress' ); |
| | 2550 | $title['text'] = __( 'Edit Your Profile', 'bbpress' ); |
| 2524 | 2551 | |
| 2525 | 2552 | // Other users profile |
| 2526 | 2553 | } else { |
| 2527 | | $userdata = get_userdata( bbp_get_user_id() ); |
| 2528 | | $title = sprintf( __( 'Edit %s\'s Profile', 'bbpress' ), $userdata->display_name ); |
| | 2554 | $title['text'] = get_userdata( bbp_get_user_id() )->display_name; |
| | 2555 | $title['format'] = __( 'Edit %s\'s Profile', 'bbpress' ); |
| 2529 | 2556 | } |
| 2530 | 2557 | |
| 2531 | 2558 | /** Views *****************************************************************/ |
| 2532 | 2559 | |
| 2533 | 2560 | // Views |
| 2534 | 2561 | } elseif ( bbp_is_single_view() ) { |
| 2535 | | $title = sprintf( __( 'View: %s', 'bbpress' ), bbp_get_view_title() ); |
| | 2562 | $title['text'] = bbp_get_view_title(); |
| | 2563 | $title['format'] = __( 'View: %s', 'bbpress' ); |
| 2536 | 2564 | |
| 2537 | 2565 | /** Search ****************************************************************/ |
| 2538 | 2566 | |
| 2539 | 2567 | // Search |
| 2540 | 2568 | } elseif ( bbp_is_search() ) { |
| 2541 | | $title = bbp_get_search_title(); |
| | 2569 | $title['text'] = bbp_get_search_title(); |
| 2542 | 2570 | } |
| | 2571 | |
| | 2572 | // Allow to change the title format/text |
| | 2573 | $title = apply_filters( 'bbp_raw_title_array', $title ); |
| | 2574 | |
| | 2575 | // Set title array defaults |
| | 2576 | $title = wp_parse_args( $title, array( |
| | 2577 | 'text' => "", |
| | 2578 | 'format' => '%s' |
| | 2579 | ) ); |
| | 2580 | |
| | 2581 | // Get the formatted raw title |
| | 2582 | $title = sprintf( $title['format'], $title['text'] ); |
| 2543 | 2583 | |
| 2544 | 2584 | // Filter the raw title |
| 2545 | 2585 | $title = apply_filters( 'bbp_raw_title', $title, $sep, $seplocation ); |