Changeset 7543 for trunk/bp-notifications/bp-notifications-functions.php
- Timestamp:
- 11/09/2013 01:59:32 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-notifications/bp-notifications-functions.php
r7537 r7543 84 84 } 85 85 86 return BP_Notifications_Notification::delete( $id ); 86 return BP_Notifications_Notification::delete( array( 'id' => $id ) ); 87 } 88 89 /** 90 * Mark notification read/unread for a user by ID. 91 * 92 * Used when clearing out notifications for a specific notification item. 93 * 94 * @since BuddyPress (1.9.0) 95 * 96 * @param int $user_id ID of the user whose notifications are being deleted. 97 * @param int $is_new 0 for read, 1 for unread 98 * @return bool True on success, false on failure. 99 */ 100 function bp_notifications_mark_notification( $id, $is_new = false ) { 101 if ( ! bp_notifications_check_notification_access( bp_loggedin_user_id(), $id ) ) { 102 return false; 103 } 104 105 return BP_Notifications_Notification::update( 106 array( 'is_new' => $is_new ), 107 array( 'id' => $id ) 108 ); 87 109 } 88 110
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)