buddyboss_global_search_buffer_template_part

The BuddyPress Global Search buddyboss global search buffer template part function.

Description

buddyboss_global_search_buffer_template_part( $template, (string) $variation = '', (bool) $echo = true ); 

Parameters (3)

0. $template
The template.
1. $variation — Optional. (string) => ''
The variation.
2. $echo — Optional. (bool) => true
The echo.

Usage

  1. if ( !function_exists( 'buddyboss_global_search_buffer_template_part' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress-global-search/includes/template.php'; 
  3.  
  4. // The template. 
  5. $template = null; 
  6.  
  7. // The variation. 
  8. $variation = ''; 
  9.  
  10. // The echo. 
  11. $echo = true; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = buddyboss_global_search_buffer_template_part($template, $variation, $echo); 
  15.  

Defined (1)

The function is defined in the following location(s).

/includes/template.php  
  1. function buddyboss_global_search_buffer_template_part( $template, $variation='', $echo=true ) { 
  2. ob_start(); 
  3.  
  4. buddyboss_global_search_load_template( $template, $variation ); 
  5. // Get the output buffer contents 
  6. $output = ob_get_clean(); 
  7.  
  8. // Echo or return the output buffer contents 
  9. if ( true === $echo ) { 
  10. echo $output; 
  11. } else { 
  12. return $output;