Changeset 4935
- Timestamp:
- 05/20/2013 10:48:51 PM (13 years ago)
- Location:
- trunk/includes
- Files:
-
- 4 edited
-
common/template-tags.php (modified) (2 diffs)
-
core/template-functions.php (modified) (1 diff)
-
core/theme-compat.php (modified) (1 diff)
-
topics/template-tags.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/common/template-tags.php
r4921 r4935 146 146 */ 147 147 function bbp_is_forum_archive() { 148 global $wp_query; 148 149 149 150 // Default to false … … 151 152 152 153 // In forum archive 153 if ( is_post_type_archive( bbp_get_forum_post_type() ) || bbp_is_query_name( 'bbp_forum_archive' ) )154 if ( is_post_type_archive( bbp_get_forum_post_type() ) || bbp_is_query_name( 'bbp_forum_archive' ) || !empty( $wp_query->bbp_show_topics_on_root ) ) 154 155 $retval = true; 155 156 -
trunk/includes/core/template-functions.php
r4931 r4935 510 510 $posts_query->set( 'post_type', bbp_get_topic_post_type() ); 511 511 $posts_query->set( 'posts_per_page', bbp_get_topics_per_page() ); 512 513 // Do topics on forums root 514 } elseif ( is_post_type_archive( bbp_get_topic_post_type() ) && ( 'topics' === bbp_show_on_root() ) ) { 515 $posts_query->bbp_show_topics_on_root = true; 512 516 } 513 517 } -
trunk/includes/core/theme-compat.php
r4608 r4935 751 751 add_filter( 'the_content', 'bbp_replace_the_content' ); 752 752 753 // Use the topics archive 754 } elseif ( 'topics' === bbp_show_on_root() ) { 755 $new_content = $bbp->shortcodes->display_topics_index(); 756 753 757 // No page so show the archive 754 758 } else { -
trunk/includes/topics/template-tags.php
r4896 r4935 309 309 $base = get_permalink(); 310 310 311 // Forum archive 312 } elseif ( bbp_is_forum_archive() ) { 313 $base = bbp_get_forums_url(); 314 311 315 // Topic archive 312 316 } elseif ( bbp_is_topic_archive() ) {
Note: See TracChangeset
for help on using the changeset viewer.