bp_directory_forums_search_form

Output the forums directory search form.

Description

bp_directory_forums_search_form(); 

Usage

  1. if ( !function_exists( 'bp_directory_forums_search_form' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bp-forums-template.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_directory_forums_search_form(); 
  7.  

Defined (1)

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

/bp-forums/bp-forums-template.php  
  1. function bp_directory_forums_search_form() { 
  2. $default_search_value = bp_get_search_default_text( 'forums' ); 
  3. $search_value = !empty( $_REQUEST['fs'] ) ? stripslashes( $_REQUEST['fs'] ) : $default_search_value; 
  4.  
  5. $search_form_html = '<form action="" method="get" id="search-forums-form"> 
  6. <label for="forums_search"><input type="text" name="s" id="forums_search" placeholder="'. esc_attr( $search_value ) .'" /></label> 
  7. <input type="submit" id="forums_search_submit" name="forums_search_submit" value="' . __( 'Search', buddypress ) . '" /> 
  8. </form>'; 
  9.  
  10. /** 
  11. * Filters the forums directory search form. 
  12. * @since 1.9.0 
  13. * @param string $search_form_html HTML search form for the forums directory. 
  14. */ 
  15. echo apply_filters( 'bp_directory_forums_search_form', $search_form_html );