- Timestamp:
- 02/22/2022 07:23:34 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/10.0/src/bp-notifications/bp-notifications-cache.php
r13091 r13244 102 102 $n = bp_notifications_get_notification( $where_args['id'] ); 103 103 bp_notifications_clear_all_for_user_cache( $n->user_id ); 104 105 // Get the list of user IDs from notification IDs. 106 } elseif ( isset( $where_args['ids'] ) && $where_args['ids'] ) { 107 $ids = (array) $where_args['ids']; 108 109 $ns = BP_Notifications_Notification::get( 110 array( 111 'id' => $ids, 112 ) 113 ); 114 115 $user_ids = wp_list_pluck( $ns, 'user_id' ); 116 $user_ids = array_unique( $user_ids ); 117 118 foreach ( $user_ids as $user_id ) { 119 bp_notifications_clear_all_for_user_cache( $user_id ); 120 } 104 121 } 105 122 }
Note: See TracChangeset
for help on using the changeset viewer.