- Timestamp:
- 08/23/2021 02:03:02 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-notifications/bp-notifications-functions.php
r12605 r13091 30 30 * @type string $date_notified Timestamp for the notification. 31 31 * } 32 * @return int|bool ID of the newly created notification on success, false 33 * on failure. 32 * @return int|bool ID of the newly created notification on success, false on failure. 34 33 */ 35 34 function bp_notifications_add_notification( $args = array() ) { … … 96 95 * 97 96 * @param int $id ID of the notification to delete. 98 * @return false|int Trueon success, false on failure.97 * @return false|int Integer on success, false on failure. 99 98 */ 100 99 function bp_notifications_delete_notification( $id ) { … … 115 114 * @param int $id ID of the notification. 116 115 * @param int|bool $is_new 0 for read, 1 for unread. 117 * @return false|int Trueon success, false on failure.116 * @return false|int Number of rows updated on success, false on failure. 118 117 */ 119 118 function bp_notifications_mark_notification( $id, $is_new = false ) { … … 147 146 if ( false === $notifications ) { 148 147 $notifications = BP_Notifications_Notification::get( array( 149 'user_id' => $user_id 148 'user_id' => $user_id, 150 149 ) ); 151 150 wp_cache_set( 'all_for_user_' . $user_id, $notifications, 'bp_notifications' ); … … 483 482 return BP_Notifications_Notification::update( 484 483 array( 485 'is_new' => $is_new 484 'is_new' => $is_new, 486 485 ), 487 486 array( 488 487 'user_id' => $user_id, 489 488 'component_name' => $component_name, 490 'component_action' => $component_action 489 'component_action' => $component_action, 491 490 ) 492 491 ); … … 512 511 return BP_Notifications_Notification::update( 513 512 array( 514 'is_new' => $is_new 513 'is_new' => $is_new, 515 514 ), 516 515 array( … … 519 518 'secondary_item_id' => $secondary_item_id, 520 519 'component_name' => $component_name, 521 'component_action' => $component_action 520 'component_action' => $component_action, 522 521 ) 523 522 ); … … 541 540 return BP_Notifications_Notification::update( 542 541 array( 543 'is_new' => $is_new 542 'is_new' => $is_new, 544 543 ), 545 544 array( … … 547 546 'secondary_item_id' => $secondary_item_id, 548 547 'component_name' => $component_name, 549 'component_action' => $component_action 548 'component_action' => $component_action, 550 549 ) 551 550 ); … … 572 571 return BP_Notifications_Notification::update( 573 572 array( 574 'is_new' => $is_new 573 'is_new' => $is_new, 575 574 ), 576 575 array( 577 576 'item_id' => $user_id, 578 577 'component_name' => $component_name, 579 'component_action' => $component_action 578 'component_action' => $component_action, 580 579 ) 581 580 );
Note: See TracChangeset
for help on using the changeset viewer.