bbp_buffer_template_part( string $slug, string $name = null, $echo = true )
Get a template part in an output buffer, and return it
Description Description
Parameters Parameters
- $slug
-
(Required)
- $name
-
(Optional)
Default value: null
Return Return
(string)
Source Source
File: includes/core/template-functions.php
function bbp_buffer_template_part( $slug, $name = null, $echo = true ) { ob_start(); bbp_get_template_part( $slug, $name ); // Get the output buffer contents $output = ob_get_clean(); // Echo or return the output buffer contents if ( true === $echo ) { echo $output; } else { return $output; } }
Changelog Changelog
Version | Description |
---|---|
2.4.0 | Introduced. |