bbp_search_query

Run the search query.

Description

bbp_search_query( (array) $new_args = array() ); 

Parameters (1)

0. $new_args — Optional. (array) => array()
The new args.

Usage

  1. if ( !function_exists( 'bbp_search_query' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/search/functions.php'; 
  3.  
  4. // The new args. 
  5. $new_args = array(); 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bbp_search_query($new_args); 
  9.  

Defined (1)

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

/includes/search/functions.php  
  1. function bbp_search_query( $new_args = array() ) { 
  2.  
  3. // Existing arguments  
  4. $query_args = bbp_get_search_query_args(); 
  5.  
  6. // Merge arguments 
  7. if ( !empty( $new_args ) ) { 
  8. $new_args = bbp_parse_args( $new_args, array(), 'search_query' ); 
  9. $query_args = array_merge( $query_args, $new_args ); 
  10.  
  11. return bbp_has_search_results( $query_args );