Changeset 3384
- Timestamp:
- 08/07/2011 02:11:44 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-includes/bbp-common-template.php
r3382 r3384 64 64 * 65 65 * @since bbPress (r3251) 66 * 66 * 67 67 * @uses is_post_type_archive() To check if we are looking at the forum archive 68 68 * @uses bbp_get_forum_post_type() To get the forum post type ID … … 71 71 */ 72 72 function bbp_is_forum_archive() { 73 73 74 74 // Default to false 75 75 $retval = false; … … 78 78 if ( is_post_type_archive( bbp_get_forum_post_type() ) || bbp_is_query_name( 'bbp_forum_archive' ) ) 79 79 $retval = true; 80 80 81 81 return (bool) apply_filters( 'bbp_is_forum_archive', $retval ); 82 82 } … … 158 158 * 159 159 * @since bbPress (r3251) 160 * 160 * 161 161 * @uses is_post_type_archive() To check if we are looking at the topic archive 162 162 * @uses bbp_get_topic_post_type() To get the topic post type ID … … 172 172 if ( is_post_type_archive( bbp_get_topic_post_type() ) || bbp_is_query_name( 'bbp_topic_archive' ) ) 173 173 $retval = true; 174 174 175 175 return (bool) apply_filters( 'bbp_is_topic_archive', $retval ); 176 176 } … … 231 231 * 232 232 * @global bbPress $bbp 233 * @return bool True if it's a topic tag, false if not 233 * @return bool True if it's a topic tag, false if not 234 234 */ 235 235 function bbp_is_topic_tag() { … … 502 502 if ( bbp_is_forum_archive() ) 503 503 $bbp_classes[] = bbp_get_forum_post_type() . '-archive'; 504 504 505 505 if ( bbp_is_topic_archive() ) 506 506 $bbp_classes[] = bbp_get_topic_post_type() . '-archive'; 507 507 508 508 /** Components ************************************************************/ 509 509 … … 618 618 619 619 elseif ( bbp_is_topic_archive() ) 620 $retval = true; 621 622 elseif ( bbp_is_topic_tag() ) 620 623 $retval = true; 621 624 … … 1090 1093 1091 1094 <?php 1092 1095 1093 1096 wp_nonce_field( 'bbp-new-reply' ); 1094 1097 … … 1099 1102 1100 1103 <?php endif; 1101 1104 1102 1105 } 1103 1106 } … … 1401 1404 // No custom home text 1402 1405 if ( empty( $args['home_text'] ) ) { 1403 1406 1404 1407 // Set home text to page title 1405 1408 if ( $front_id = get_option( 'page_on_front' ) ) { 1406 1409 $pre_front_text = get_the_title( $front_id ); 1407 1410 1408 1411 // Default to 'Home' 1409 1412 } else { … … 1421 1424 $pre_root_text = bbp_get_forum_archive_title(); 1422 1425 } 1423 1426 1424 1427 /** Includes **********************************************************/ 1425 1428 … … 1437 1440 1438 1441 /** Current Text ******************************************************/ 1439 1442 1440 1443 // Forum archive 1441 1444 if ( bbp_is_forum_archive() ) … … 1497 1500 'current_text' => $pre_current_text 1498 1501 ); 1499 $r = apply_filters( 'bbp_get_breadcrumb_pre', wp_parse_args( $args, $defaults ) ); 1502 $r = apply_filters( 'bbp_get_breadcrumb_pre', wp_parse_args( $args, $defaults ) ); 1500 1503 extract( $r ); 1501 1504 … … 1512 1515 // Do we want to include a link to the forum root? 1513 1516 if ( !empty( $include_root ) || empty( $root_text ) ) { 1514 1517 1515 1518 // Page exists at root slug path, so use its permalink 1516 1519 if ( $page = bbp_get_page_by_path( $bbp->root_slug ) ) { 1517 1520 $root_url = get_permalink( $page->ID ); 1518 1521 1519 1522 // Use the root slug 1520 1523 } else { … … 1783 1786 if ( bbp_is_user_home() ) { 1784 1787 $title = __( 'Your Profile', 'bbpress' ); 1785 1788 1786 1789 // Other users profile 1787 1790 } else { … … 1796 1799 if ( bbp_is_user_home() ) { 1797 1800 $title = __( 'Edit Your Profile', 'bbpress' ); 1798 1801 1799 1802 // Other users profile 1800 1803 } else {
Note: See TracChangeset
for help on using the changeset viewer.