Changeset 3902 for branches/plugin/bbp-includes/bbp-common-template.php
- Timestamp:
- 05/15/2012 05:15:22 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-includes/bbp-common-template.php
r3901 r3902 3 3 /** 4 4 * bbPress Common Template Tags 5 * 6 * Common template tags are ones that are used by more than one component, like 7 * forums, topics, replies, users, topic tags, etc... 5 8 * 6 9 * @package bbPress … … 293 296 */ 294 297 function bbp_is_topic_tag() { 295 $bbp = bbpress();296 298 297 299 // Return false if editing a topic tag … … 325 327 // Check query 326 328 if ( !empty( $wp_query->bbp_is_topic_tag_edit ) && ( true == $wp_query->bbp_is_topic_tag_edit ) ) 327 returntrue;329 $retval = true; 328 330 329 331 // Editing in admin … … 348 350 function bbp_is_custom_post_type() { 349 351 350 // Current post type351 $ post_type = get_post_type();352 353 // bbPress post types354 $bbp_post_types =array(352 // Assume false 353 $retval = false; 354 355 // Viewing one of the bbPress post types 356 if ( in_array( get_post_type(), array( 355 357 bbp_get_forum_post_type(), 356 358 bbp_get_topic_post_type(), 357 359 bbp_get_reply_post_type() 358 ); 359 360 // Viewing one of the bbPress post types 361 if ( in_array( $post_type, $bbp_post_types ) ) 362 return true; 363 364 return false; 360 ) ) ) 361 $retval = true; 362 363 return (bool) apply_filters( 'bbp_is_custom_post_type', $retval ); 365 364 } 366 365 … … 403 402 // Check query 404 403 if ( !empty( $wp_query->bbp_is_reply_edit ) && ( true == $wp_query->bbp_is_reply_edit ) ) 405 returntrue;404 $retval = true; 406 405 407 406 // Editing in admin … … 820 819 /** Done ******************************************************************/ 821 820 822 return apply_filters( 'is_bbpress', $retval );821 return (bool) apply_filters( 'is_bbpress', $retval ); 823 822 } 824 823
Note: See TracChangeset
for help on using the changeset viewer.