Changeset 10110 for trunk/src/bp-groups/bp-groups-template.php
- Timestamp:
- 09/14/2015 03:39:38 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-template.php
r10075 r10110 487 487 * to groups of which the specified user 488 488 * is a member. Default: null. 489 * @type string $search_terms If provided, only groups whose names or descriptions 490 * match the search terms will be returned. Default: false. 489 * @type string $search_terms If provided, only groups whose names or descriptions match the search terms 490 * will be returned. Default: value of `$_REQUEST['groups_search']` or 491 * `$_REQUEST['s']`, if present. Otherwise false. 491 492 * @type array $meta_query An array of meta_query conditions. 492 493 * See {@link WP_Meta_Query::queries} for description. … … 534 535 535 536 // Default search string (too soon to escape here) 536 if ( ! empty( $_REQUEST['group-filter-box'] ) ) { 537 $search_query_arg = bp_core_get_component_search_query_arg( 'groups' ); 538 if ( ! empty( $_REQUEST[ $search_query_arg ] ) ) { 539 $search_terms = stripslashes( $_REQUEST[ $search_query_arg ] ); 540 } elseif ( ! empty( $_REQUEST['group-filter-box'] ) ) { 537 541 $search_terms = $_REQUEST['group-filter-box']; 538 542 } elseif ( !empty( $_REQUEST['s'] ) ) { … … 4979 4983 function bp_directory_groups_search_form() { 4980 4984 4981 $default_search_value = bp_get_search_default_text( 'groups' ); 4982 $search_value = !empty( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : $default_search_value; 4985 $query_arg = bp_core_get_component_search_query_arg( 'groups' ); 4986 4987 if ( ! empty( $_REQUEST[ $query_arg ] ) ) { 4988 $search_value = stripslashes( $_REQUEST[ $query_arg ] ); 4989 } else { 4990 $search_value = bp_get_search_default_text( 'groups' ); 4991 } 4983 4992 4984 4993 $search_form_html = '<form action="" method="get" id="search-groups-form"> 4985 <label><input type="text" name=" s" id="groups_search" placeholder="'. esc_attr( $search_value ) .'" /></label>4994 <label><input type="text" name="' . esc_attr( $query_arg ) . '" id="groups_search" placeholder="'. esc_attr( $search_value ) .'" /></label> 4986 4995 <input type="submit" id="groups_search_submit" name="groups_search_submit" value="'. __( 'Search', 'buddypress' ) .'" /> 4987 4996 </form>';
Note: See TracChangeset
for help on using the changeset viewer.