Skip to:
Content

BuddyPress.org

Ticket #7562: 7562.patch

File 7562.patch, 1.0 KB (added by imath, 8 years ago)
  • src/bp-templates/bp-legacy/buddypress-functions.php

    diff --git src/bp-templates/bp-legacy/buddypress-functions.php src/bp-templates/bp-legacy/buddypress-functions.php
    index dcd0254..65d5214 100644
    function bp_legacy_theme_ajax_querystring( $query_string, $object ) { 
    692692
    693693                if ( bp_is_active( 'activity' ) ) {
    694694                        $actions = bp_activity_get_actions_for_context();
    695                         foreach ( $actions as $action ) {
    696                                 if ( $action['key'] === $_BP_COOKIE['bp-' . $object . '-filter'] ) {
    697                                         $qs[] = 'action=' . $_BP_COOKIE['bp-' . $object . '-filter'];
    698                                 }
     695
     696                        // Accepts multiple actions in comma separated values (eg: 'friendship_accepted,friendship_created')
     697                        $action_filter = explode( ',', $_BP_COOKIE['bp-' . $object . '-filter'] );
     698
     699                        // If All actions are available fot the context, include them into the query string
     700                        if ( ! array_diff( $action_filter, wp_list_pluck( $actions, 'key' ) ) ) {
     701                                $qs[] = 'action=' . join( ',', $action_filter );
    699702                        }
    700703                }
    701704        }