- Timestamp:
- 01/05/2016 03:23:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-notifications/bp-notifications-functions.php
r10417 r10437 422 422 } 423 423 424 /** 425 * Delete a user's notifications when the user is deleted. 426 * 427 * @since 2.5.0 428 * 429 * @param int $user_id ID of the user who is about to be deleted. 430 * @return int|bool The number of rows deleted, or false on error. 431 */ 432 function bp_notifications_delete_notifications_on_user_delete( $user_id ) { 433 return BP_Notifications_Notification::delete( array( 434 'user_id' => $user_id, 435 'item_id' => false, 436 'secondary_item_id' => false, 437 'component_action' => false, 438 'component_name' => false, 439 ) ); 440 } 441 add_action( 'wpmu_delete_user', 'bp_notifications_delete_notifications_on_user_delete' ); 442 add_action( 'delete_user', 'bp_notifications_delete_notifications_on_user_delete' ); 443 424 444 /** Mark **********************************************************************/ 425 445
Note: See TracChangeset
for help on using the changeset viewer.