BBP_Shortcodes::display_search_form()
Display the search form in an output buffer and return to ensure post/page contents are displayed first.
Description
Source
File: bp-forums/common/shortcodes.php
public function display_search_form() {
// Bail if search is disabled
if ( ! bbp_allow_search() ) {
return;
}
// Start output buffer
$this->start( 'bbp_search_form' );
// Output templates
bbp_get_template_part( 'form', 'search' );
// Return contents of output buffer
return $this->end();
}
Changelog
| Version | Description |
|---|---|
| bbPress (r4585) | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.