Changeset 8097
- Timestamp:
- 03/09/2014 07:37:47 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-notifications.php
r8037 r8097 556 556 if ( bp_is_active( 'notifications' ) ) { 557 557 bp_notifications_delete_all_notifications_by_type( $group_id, buddypress()->groups->id ); 558 } 558 } 559 559 } 560 560 add_action( 'groups_delete_group', 'bp_groups_delete_group_delete_all_notifications', 10 ); 561 562 /** 563 * When a demotion takes place, delete any corresponding promotion notifications. 564 * 565 * @since BuddyPress (2.0.0) 566 */ 567 function bp_groups_delete_promotion_notifications( $user_id = 0, $group_id = 0 ) { 568 if ( bp_is_active( 'notifications' ) && ! empty( $group_id ) && ! empty( $user_id ) ) { 569 bp_notifications_delete_notifications_by_item_id( $user_id, $group_id, buddypress()->groups->id, 'member_promoted_to_admin' ); 570 bp_notifications_delete_notifications_by_item_id( $user_id, $group_id, buddypress()->groups->id, 'member_promoted_to_mod' ); 571 } 572 } 573 add_action( 'groups_demoted_member', 'bp_groups_delete_promotion_notifications', 10, 2 ); 561 574 562 575 /**
Note: See TracChangeset
for help on using the changeset viewer.