Changeset 2322 for trunk/bp-themes/bp-default/_inc/ajax.php
- Timestamp:
- 01/17/2010 08:27:37 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/bp-themes/bp-default/_inc/ajax.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-themes/bp-default/_inc/ajax.php
r2291 r2322 19 19 $search_terms = esc_attr( $_POST['search_terms'] ); 20 20 21 /* Plugins can pass extra parameters and use the bp_dtheme_ajax_querystring_content_filter filter to parse them */ 22 $extras = esc_attr( $_POST['extras'] ); 23 21 24 if ( __( 'Search anything...', 'buddypress' ) == $search_terms || 'false' == $search_terms ) 22 25 $search_terms = false; 23 26 24 27 /* Build the querystring */ 25 if ( 'active' != $filter && 'newest' != $filter && 'popular' != $filter && 'online' != $filter && 'alphabetical' != $filter)28 if ( empty( $filter ) ) 26 29 $filter = 'active'; 27 30 31 if ( empty( $type ) ) 32 $type = 'all'; 33 28 34 $bp->ajax_querystring = 'type=' . $filter . '&page=' . $page; 29 35 30 if ( $search_terms)36 if ( !empty( $search_terms ) ) 31 37 $bp->ajax_querystring .= '&search_terms=' . $search_terms; 32 38 33 if ( !$type ) 34 $type = 'all'; 35 36 if ( ( 'all' != $type ) && !is_user_logged_in() ) 37 $filter = 'all'; 38 39 if ( 'all' != $type || $bp->displayed_user->id ) { 39 if ( $bp->displayed_user->id ) { 40 40 $user_id = ( $bp->displayed_user->id ) ? $bp->displayed_user->id : $bp->loggedin_user->id; 41 41 $bp->ajax_querystring .= '&user_id=' . $user_id; 42 42 } 43 44 $bp->ajax_querystring = apply_filters( 'bp_dtheme_ajax_querystring_content_filter', $bp->ajax_querystring, $extras ); 43 45 44 46 locate_template( array( "$content/$content-loop.php" ), true ); … … 164 166 165 167 if ( !$query_string ) { 166 167 168 /* If we are on a profile page we only want to show that users activity */ 168 169 if ( $bp->displayed_user->id ) { … … 238 239 $query_string = implode( '&', $new_args ) . '&page=' . $page; 239 240 240 $bp->ajax_querystring = $query_string;241 $bp->ajax_querystring = apply_filters( 'bp_dtheme_ajax_querystring_activity_filter', $query_string, $type ); 241 242 $result['query_string'] = $bp->ajax_querystring; 242 $result['feed_url'] = $feed_url;243 $result['feed_url'] = apply_filters( 'bp_dtheme_ajax_feed_url', $feed_url ); 243 244 244 245 /* Buffer the loop in the template to a var for JS to spit out. */
Note: See TracChangeset
for help on using the changeset viewer.