bp_directory_blogs_search_form()
Output the blog directory search form.
Description
Source
File: bp-blogs/bp-blogs-template.php
1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 | function bp_directory_blogs_search_form() { $query_arg = bp_core_get_component_search_query_arg( 'blogs' ); if ( ! empty ( $_REQUEST [ $query_arg ] ) ) { $search_value = stripslashes ( $_REQUEST [ $query_arg ] ); } else { $search_value = bp_get_search_default_text( 'blogs' ); } $search_form_html = '<form action= "" method= "get" id= "search-blogs-form" > <label for = "blogs_search" ><input type= "text" name= "' . esc_attr( $query_arg ) . '" id= "blogs_search" placeholder= "'. esc_attr( $search_value ) .'" /></label> <input type= "submit" id= "blogs_search_submit" name= "blogs_search_submit" value= "' . __( 'Search', 'buddyboss' ) . '" /> </form>'; /** * Filters the output for the blog directory search form. * * @since BuddyPress 1.9.0 * * @param string $search_form_html HTML markup for blog directory search form. */ echo apply_filters( 'bp_directory_blogs_search_form' , $search_form_html ); } |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.