Changeset 3758 for branches/plugin/bbp-includes/bbp-forum-template.php
- Timestamp:
- 02/25/2012 08:50:27 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-includes/bbp-forum-template.php
r3737 r3758 32 32 */ 33 33 function bbp_get_forum_post_type() { 34 global $bbp; 35 36 return apply_filters( 'bbp_get_forum_post_type', $bbp->forum_post_type ); 34 return apply_filters( 'bbp_get_forum_post_type', bbpress()->forum_post_type ); 37 35 } 38 36 … … 59 57 */ 60 58 function bbp_has_forums( $args = '' ) { 61 global $bbp;59 $bbp = bbpress(); 62 60 63 61 // Setup possible post__not_in array … … 115 113 */ 116 114 function bbp_forums() { 117 global $bbp;118 115 119 116 // Put into variable to check against next 120 $have_posts = $bbp->forum_query->have_posts();117 $have_posts = bbpress()->forum_query->have_posts(); 121 118 122 119 // Reset the post data when finished … … 136 133 */ 137 134 function bbp_the_forum() { 138 global $bbp; 139 return $bbp->forum_query->the_post(); 135 return bbpress()->forum_query->the_post(); 140 136 } 141 137 … … 171 167 */ 172 168 function bbp_get_forum_id( $forum_id = 0 ) { 173 global $bbp, $wp_query; 169 global $wp_query; 170 171 $bbp = bbpress(); 174 172 175 173 // Easy empty checking … … 329 327 * @since bbPress (r3249) 330 328 * 331 * @global bbPress $bbp The main bbPress class332 329 * @param string $title Default text to use as title 333 330 * … … 342 339 */ 343 340 function bbp_get_forum_archive_title( $title = '' ) { 344 global $bbp;345 341 346 342 // If no title was passed … … 348 344 349 345 // Set root text to page title 350 $page = bbp_get_page_by_path( $bbp->root_slug );346 $page = bbp_get_page_by_path( bbpress()->root_slug ); 351 347 if ( !empty( $page ) ) { 352 348 $title = get_the_title( $page->ID ); … … 1759 1755 */ 1760 1756 function bbp_get_forum_class( $forum_id = 0 ) { 1761 global $bbp; 1762 1757 $bbp = bbpress(); 1763 1758 $forum_id = bbp_get_forum_id( $forum_id ); 1764 1759 $count = isset( $bbp->forum_query->current_post ) ? $bbp->forum_query->current_post : 1; … … 2052 2047 */ 2053 2048 function bbp_get_form_forum_visibility() { 2054 global $bbp;2055 2049 2056 2050 // Get _POST data … … 2064 2058 // No data 2065 2059 else 2066 $forum_visibility = $bbp->public_status_id;2060 $forum_visibility = bbpress()->public_status_id; 2067 2061 2068 2062 return apply_filters( 'bbp_get_form_forum_visibility', esc_attr( $forum_visibility ) );
Note: See TracChangeset
for help on using the changeset viewer.