bbp_get_search_title

Get the search page title.

Description

bbp_get_search_title(); 

Usage

  1. if ( !function_exists( 'bbp_get_search_title' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/search/template.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bbp_get_search_title(); 
  7.  

Defined (1)

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

/includes/search/template.php  
  1. function bbp_get_search_title() { 
  2.  
  3. // Get search terms 
  4. $search_terms = bbp_get_search_terms(); 
  5.  
  6. // No search terms specified 
  7. if ( empty( $search_terms ) ) { 
  8. $title = esc_html__( 'Search', bbpress ); 
  9.  
  10. // Include search terms in title 
  11. } else { 
  12. $title = sprintf( esc_html__( "Search Results for '%s'", bbpress ), esc_attr( $search_terms ) ); 
  13.  
  14. return apply_filters( 'bbp_get_search_title', $title, $search_terms );