Ticket #1050: activity-filter-links2.patch
| File activity-filter-links2.patch, 1.2 KB (added by , 16 years ago) |
|---|
-
bp-activity-templatetags.php
372 372 if ( !$component_names ) 373 373 return false; 374 374 375 $link = remove_query_arg( array( 'afilter' ), $_SERVER['REQUEST_URI'] );376 $link = remove_query_arg( array( 'acpage' ), $link );377 378 375 foreach ( (array) $component_names as $component_name ) { 379 376 if ( isset( $_GET['afilter'] ) && $component_name == $_GET['afilter'] ) 380 377 $selected = ' class="selected"'; … … 400 397 } 401 398 402 399 $link = add_query_arg( 'afilter', $component_name ); 400 $link = remove_query_arg( 'acpage' , $link ); 401 403 402 $link = apply_filters( 'bp_get_activity_filter_link_href', $link, $component_name ); 404 403 405 404 $component_links[] = $before . '<a href="' . $link . '">' . ucwords( __( $component_name, 'buddypress' ) ) . '</a>' . $after; 406 405 } 407 406 408 $link = remove_query_arg( array( 'afilter' ), $link );409 407 $link = remove_query_arg( 'afilter' , $link ); 408 410 409 if ( isset( $_GET['afilter'] ) ) 411 410 $component_links[] = '<' . $tag . ' id="afilter-clear"><a href="' . $link . '"">' . __( 'Clear Filter', 'buddypress' ) . '</a></' . $tag . '>'; 412 411