get_search_query_terms

The BP Groupblog get search query terms function.

Description

get_search_query_terms(); 

Usage

  1. if ( !function_exists( 'get_search_query_terms' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bp-groupblog/themes/p2/functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = get_search_query_terms(); 
  7.  

Defined (1)

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

/themes/p2/functions.php  
  1. function get_search_query_terms() { 
  2. $search = get_query_var( 's' ); 
  3. $search_terms = get_query_var( 'search_terms' ); 
  4. if ( !empty($search_terms) ) { 
  5. return $search_terms; 
  6. } else if ( !empty($search) ) { 
  7. return array($search); 
  8. return array();