Changeset 8116
- Timestamp:
- 03/12/2014 06:46:44 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-template.php
r8093 r8116 312 312 } 313 313 314 // Default search string 315 if ( ! empty( $_REQUEST['group-filter-box'] ) ) { 316 $search_terms = $_REQUEST['group-filter-box']; 317 } elseif ( isset( $_REQUEST['s'] ) && !empty( $_REQUEST['s'] ) ) { 318 $search_terms = $_REQUEST['s']; 319 } else { 320 $search_terms = false; 321 } 322 314 323 $defaults = array( 315 324 'type' => $type, // 'type' is an override for 'order' and 'orderby'. See docblock. … … 325 334 'user_id' => $user_id, // Pass a user ID to limit to groups this user has joined 326 335 'slug' => $slug, // Pass a group slug to only return that group 327 'search_terms' => '',// Pass search terms to return only matching groups336 'search_terms' => $search_terms, // Pass search terms to return only matching groups 328 337 'meta_query' => false, // Filter by groupmeta. See WP_Meta_Query for format 329 338 'include' => false, // Pass comma separated list or array of group ID's to return only these groups … … 335 344 336 345 $r = wp_parse_args( $args, $defaults ); 337 338 if ( empty( $r['search_terms'] ) ) {339 if ( isset( $_REQUEST['group-filter-box'] ) && !empty( $_REQUEST['group-filter-box'] ) )340 $r['search_terms'] = $_REQUEST['group-filter-box'];341 elseif ( isset( $_REQUEST['s'] ) && !empty( $_REQUEST['s'] ) )342 $r['search_terms'] = $_REQUEST['s'];343 else344 $r['search_terms'] = false;345 }346 346 347 347 $groups_template = new BP_Groups_Template( array(
Note: See TracChangeset
for help on using the changeset viewer.