Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/25/2022 01:45:23 PM (5 years ago)
Author:
imath
Message:

Clear the user notification cache when bulk marking as unread items

Props oztaser, niftythree

Fixes #8642 (branch 10.0)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/10.0/src/bp-notifications/bp-notifications-cache.php

    r13244 r13248  
    105105                // Get the list of user IDs from notification IDs.
    106106        } elseif ( isset( $where_args['ids'] ) && $where_args['ids'] ) {
    107                 $ids = (array) $where_args['ids'];
     107                $ids    = (array) $where_args['ids'];
     108                $is_new = 1;
     109
     110                if ( isset( $update_args['data']['is_new'] ) && 1 === $update_args['data']['is_new'] ) {
     111                        $is_new = 0;
     112                }
    108113
    109114                $ns = BP_Notifications_Notification::get(
    110115                        array(
    111                                 'id' => $ids,
     116                                'id'      => $ids,
     117                                'is_new'  => $is_new,
    112118                        )
    113119                );
Note: See TracChangeset for help on using the changeset viewer.