bp_directory_members_search_form()
Output the Members directory search form.
Description
Source
File: bp-members/bp-members-template.php
1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 | function bp_directory_members_search_form() { $query_arg = bp_core_get_component_search_query_arg( 'members' ); if ( ! empty ( $_REQUEST [ $query_arg ] ) ) { $search_value = stripslashes ( $_REQUEST [ $query_arg ] ); } else { $search_value = bp_get_search_default_text( 'members' ); } $search_form_html = '<form action= "" method= "get" id= "search-members-form" > <label for = "members_search" ><input type= "text" name= "' . esc_attr( $query_arg ) . '" id= "members_search" placeholder= "'. esc_attr( $search_value ) .'" /></label> <input type= "submit" id= "members_search_submit" name= "members_search_submit" value= "' . __( 'Search', 'buddyboss' ) . '" /> </form>'; /** * Filters the Members component search form. * * @since BuddyPress 1.9.0 * * @param string $search_form_html HTML markup for the member search form. */ echo apply_filters( 'bp_directory_members_search_form' , $search_form_html ); } |
Changelog
Version | Description |
---|---|
BuddyPress 1.0.0 | Introduced. |
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.