Changeset 5211
- Timestamp:
- 11/29/2013 03:27:50 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.5/includes/forums/template.php
r5165 r5211 115 115 function bbp_has_forums( $args = '' ) { 116 116 117 // Forum archive only shows root 118 if ( bbp_is_forum_archive() ) { 119 $default_post_parent = 0; 120 121 // User subscriptions shows any 122 } elseif ( bbp_is_subscriptions() ) { 123 $default_post_parent = 'any'; 124 125 // Could be anything, so look for possible parent ID 126 } else { 127 $default_post_parent = bbp_get_forum_id(); 128 } 129 117 130 // Parse arguments with default forum query for most circumstances 118 131 $bbp_f = bbp_parse_args( $args, array( 119 132 'post_type' => bbp_get_forum_post_type(), 120 'post_parent' => bbp_is_forum_archive() ? 0 : bbp_get_forum_id(),133 'post_parent' => $default_post_parent, 121 134 'post_status' => bbp_get_public_status_id(), 122 135 'posts_per_page' => get_option( '_bbp_forums_per_page', 50 ),
Note: See TracChangeset
for help on using the changeset viewer.