Changeset 7131 for trunk/bp-core/bp-core-template-loader.php
- Timestamp:
- 05/30/2013 10:58:46 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-template-loader.php
r6824 r7131 212 212 213 213 // Get the output buffer contents 214 $output = ob_get_contents(); 215 216 // Flush the output buffer 217 ob_end_clean(); 214 $output = ob_get_clean(); 218 215 219 216 // Echo or return the output buffer contents … … 342 339 $new_template = apply_filters( 'bp_get_root_template', false, $template ); 343 340 344 // BuddyPress template file exists 341 // A BuddyPress template file was located, so override the WordPress 342 // template and use it to switch off BuddyPress's theme compatibility. 345 343 if ( !empty( $new_template ) ) { 346 347 // Override the WordPress template with a BuddyPress one 348 $template = $new_template; 349 350 // @see: bp_template_include_theme_compat() 351 buddypress()->theme_compat->found_template = true; 344 $template = bbp_set_template_included( $new_template ); 352 345 } 353 346 354 347 return apply_filters( 'bp_template_include_theme_supports', $template ); 348 } 349 350 /** 351 * Set the included template 352 * 353 * @since BuddyPress (1.8) 354 * @param mixed $template Default false 355 * @return mixed False if empty. Template name if template included 356 */ 357 function bp_set_template_included( $template = false ) { 358 buddypress()->theme_compat->found_template = $template; 359 360 return buddypress()->theme_compat->found_template; 361 } 362 363 /** 364 * Is a BuddyPress template being included? 365 * 366 * @since BuddyPress (1.8) 367 * @return bool True if yes, false if no 368 */ 369 function bp_is_template_included() { 370 return ! empty( buddypress()->theme_compat->found_template ); 355 371 } 356 372
Note: See TracChangeset
for help on using the changeset viewer.