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


Top ↑

Return Return

(string)


Top ↑

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;
	}
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.4.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.