Changeset 3449 for trunk/bp-groups/bp-groups-templatetags.php
- Timestamp:
- 11/19/2010 07:41:13 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-templatetags.php
r3372 r3449 139 139 $type = 'active'; 140 140 $user_id = false; 141 $search_terms = false;141 $search_terms = null; 142 142 $slug = false; 143 143 … … 160 160 } 161 161 162 if ( isset( $_REQUEST['group-filter-box'] ) || isset( $_REQUEST['s'] ) )163 $search_terms = ( isset( $_REQUEST['group-filter-box'] ) ) ? $_REQUEST['group-filter-box'] : $_REQUEST['s'];164 165 162 $defaults = array( 166 163 'type' => $type, … … 180 177 $r = wp_parse_args( $args, $defaults ); 181 178 extract( $r ); 179 180 if ( is_null( $search_terms ) ) { 181 if ( isset( $_REQUEST['group-filter-box'] ) && !empty( $_REQUEST['group-filter-box'] ) ) 182 $search_terms = $_REQUEST['group-filter-box']; 183 elseif ( isset( $_REQUEST['s'] ) && !empty( $_REQUEST['s'] ) ) 184 $search_terms = $_REQUEST['s']; 185 else 186 $search_terms = false; 187 } 182 188 183 189 $groups_template = new BP_Groups_Template( (int)$user_id, $type, (int)$page, (int)$per_page, (int)$max, $slug, $search_terms, $include, (bool)$populate_extras, $exclude ); … … 1812 1818 1813 1819 $search_value = __( 'Search anything...', 'buddypress' ); 1814 if ( !empty( $_REQUEST['s'] ) )1820 if ( isset( $_REQUEST['s'] ) && !empty( $_REQUEST['s'] ) ) 1815 1821 $search_value = $_REQUEST['s']; 1816 1822
Note: See TracChangeset
for help on using the changeset viewer.