bp_directory_blogs_search_form

Output the blog directory search form.

Description

bp_directory_blogs_search_form(); 

Usage

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

Defined (1)

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

/bp-blogs/bp-blogs-template.php  
  1. function bp_directory_blogs_search_form() { 
  2.  
  3. $query_arg = bp_core_get_component_search_query_arg( 'blogs' ); 
  4.  
  5. if ( ! empty( $_REQUEST[ $query_arg ] ) ) { 
  6. $search_value = stripslashes( $_REQUEST[ $query_arg ] ); 
  7. } else { 
  8. $search_value = bp_get_search_default_text( 'blogs' ); 
  9.  
  10. $search_form_html = '<form action="" method="get" id="search-blogs-form"> 
  11. <label for="blogs_search"><input type="text" name="' . esc_attr( $query_arg ) . '" id="blogs_search" placeholder="'. esc_attr( $search_value ) .'" /></label> 
  12. <input type="submit" id="blogs_search_submit" name="blogs_search_submit" value="' . __( 'Search', buddypress ) . '" /> 
  13. </form>'; 
  14.  
  15. /** 
  16. * Filters the output for the blog directory search form. 
  17. * @since 1.9.0 
  18. * @param string $search_form_html HTML markup for blog directory search form. 
  19. */ 
  20. echo apply_filters( 'bp_directory_blogs_search_form', $search_form_html );