Changeset 13091 for trunk/src/bp-notifications/actions/bulk-manage.php
- Timestamp:
- 08/23/2021 02:03:02 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-notifications/actions/bulk-manage.php
r13034 r13091 1 1 <?php 2 2 /** 3 * Notifications: Bulk-manage action handler 3 * Notifications: Bulk-manage action handler. 4 4 * 5 5 * @package BuddyPress … … 28 28 29 29 // Bail if no action or no IDs. 30 if ( ( ! in_array( $action, array( 'delete', 'read', 'unread' ) ) ) || empty( $notifications ) || empty( $nonce ) ) {30 if ( ( ! in_array( $action, array( 'delete', 'read', 'unread' ), true ) ) || empty( $notifications ) || empty( $nonce ) ) { 31 31 return false; 32 32 } … … 42 42 // Delete, mark as read or unread depending on the user 'action'. 43 43 switch ( $action ) { 44 case 'delete' 44 case 'delete': 45 45 foreach ( $notifications as $notification ) { 46 46 bp_notifications_delete_notification( $notification ); 47 47 } 48 48 bp_core_add_message( __( 'Notifications deleted.', 'buddypress' ) ); 49 break;49 break; 50 50 51 case 'read' 51 case 'read': 52 52 foreach ( $notifications as $notification ) { 53 53 bp_notifications_mark_notification( $notification, false ); 54 54 } 55 55 bp_core_add_message( __( 'Notifications marked as read', 'buddypress' ) ); 56 break;56 break; 57 57 58 case 'unread' 58 case 'unread': 59 59 foreach ( $notifications as $notification ) { 60 60 bp_notifications_mark_notification( $notification, true ); 61 61 } 62 62 bp_core_add_message( __( 'Notifications marked as unread.', 'buddypress' ) ); 63 break;63 break; 64 64 } 65 65
Note: See TracChangeset
for help on using the changeset viewer.