Skip to:
Content

BuddyPress.org

Ticket #1050: activity-filter-links2.patch

File activity-filter-links2.patch, 1.2 KB (added by johnjamesjacoby, 16 years ago)

Fix bp_get_activity_filter_links pagination issue

  • bp-activity-templatetags.php

     
    372372                if ( !$component_names )
    373373                        return false;
    374374               
    375                 $link = remove_query_arg( array( 'afilter' ), $_SERVER['REQUEST_URI'] );
    376                 $link = remove_query_arg( array( 'acpage' ), $link );
    377 
    378375                foreach ( (array) $component_names as $component_name ) {
    379376                        if ( isset( $_GET['afilter'] ) && $component_name == $_GET['afilter'] )
    380377                                $selected = ' class="selected"';
     
    400397                        }
    401398                       
    402399                        $link = add_query_arg( 'afilter', $component_name );
     400                        $link = remove_query_arg( 'acpage' , $link );
     401
    403402                        $link = apply_filters( 'bp_get_activity_filter_link_href', $link, $component_name );
    404                        
     403
    405404                        $component_links[] = $before . '<a href="' . $link . '">' . ucwords( __( $component_name, 'buddypress' ) ) . '</a>' . $after;
    406405                }
    407406
    408                 $link = remove_query_arg( array( 'afilter' ), $link );
    409                
     407                $link = remove_query_arg( 'afilter' , $link );
     408
    410409                if ( isset( $_GET['afilter'] ) )
    411410                        $component_links[] = '<' . $tag . ' id="afilter-clear"><a href="' . $link . '"">' . __( 'Clear Filter', 'buddypress' ) . '</a></' . $tag . '>';
    412411