Changeset 7533
- Timestamp:
- 11/08/2013 05:45:34 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-members/bp-members-notifications.php
r7532 r7533 24 24 * @param string $secondary_item_id 25 25 * @param string $date_notified 26 * @param string $is_new 27 * @return boolean True on success, false on fail 28 */ 29 function bp_core_add_notification( $item_id, $user_id, $component_name, $component_action, $secondary_item_id = 0, $date_notified = false, $is_new = true ) { 30 31 // Bail if notifications is not active 32 if ( ! bp_is_active( 'notifications' ) ) { 33 return false; 34 } 35 36 $args = array( 26 * @param int $is_new 27 * @return boolean True on success, false on fail 28 */ 29 function bp_core_add_notification( $item_id, $user_id, $component_name, $component_action, $secondary_item_id = 0, $date_notified = false, $is_new = 1 ) { 30 31 // Bail if notifications is not active 32 if ( ! bp_is_active( 'notifications' ) ) { 33 return false; 34 } 35 36 // Notifications must always have a time 37 if ( false === $date_notified ) { 38 $date_notified = bp_core_current_time(); 39 } 40 41 // Add the notification 42 return bp_notifications_add_notification( array( 37 43 'item_id' => $item_id, 38 44 'user_id' => $user_id, … … 42 48 'date_notified' => $date_notified, 43 49 'is_new' => $is_new 44 ); 45 46 return bp_notifications_add_notification( $args ); 50 ) ); 47 51 } 48 52
Note: See TracChangeset
for help on using the changeset viewer.