Changeset 7624 for trunk/bp-groups/bp-groups-screens.php
- Timestamp:
- 11/30/2013 06:14:08 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-screens.php
r7537 r7624 28 28 function groups_screen_my_groups() { 29 29 30 $bp = buddypress();31 32 // Delete group request notifications for the user33 if ( isset( $_GET['n'] ) ) {34 bp_core_mark_notifications_by_type( bp_loggedin_user_id(), $bp->groups->id, 'membership_request_accepted' );35 bp_core_mark_notifications_by_type( bp_loggedin_user_id(), $bp->groups->id, 'membership_request_rejected' );36 bp_core_mark_notifications_by_type( bp_loggedin_user_id(), $bp->groups->id, 'member_promoted_to_mod' );37 bp_core_mark_notifications_by_type( bp_loggedin_user_id(), $bp->groups->id, 'member_promoted_to_admin' );38 }39 40 30 do_action( 'groups_screen_my_groups' ); 41 31 … … 94 84 } 95 85 96 // Remove notifications97 bp_core_mark_notifications_by_type( bp_loggedin_user_id(), buddypress()->groups->id, 'group_invite' );98 99 86 do_action( 'groups_screen_group_invites', $group_id ); 100 87 … … 104 91 function groups_screen_group_home() { 105 92 106 if ( ! bp_is_single_item() ) 107 return false; 108 109 $bp = buddypress(); 110 111 if ( isset( $_GET['n'] ) ) { 112 bp_core_mark_notifications_by_type( bp_loggedin_user_id(), $bp->groups->id, 'membership_request_accepted' ); 113 bp_core_mark_notifications_by_type( bp_loggedin_user_id(), $bp->groups->id, 'membership_request_rejected' ); 114 bp_core_mark_notifications_by_type( bp_loggedin_user_id(), $bp->groups->id, 'member_promoted_to_mod' ); 115 bp_core_mark_notifications_by_type( bp_loggedin_user_id(), $bp->groups->id, 'member_promoted_to_admin' ); 93 if ( ! bp_is_single_item() ) { 94 return false; 116 95 } 117 96 … … 805 784 806 785 function groups_screen_group_admin_requests() { 807 global $bp; 808 809 if ( 'membership-requests' != bp_get_group_current_admin_tab() ) 810 return false; 811 812 if ( ! bp_is_item_admin() || ( 'public' == $bp->groups->current_group->status ) ) 813 return false; 814 815 // Remove any screen notifications 816 bp_core_mark_notifications_by_type( bp_loggedin_user_id(), $bp->groups->id, 'new_membership_request' ); 817 818 $request_action = (string)bp_action_variable( 1 ); 819 $membership_id = (int)bp_action_variable( 2 ); 786 $bp = buddypress(); 787 788 if ( 'membership-requests' != bp_get_group_current_admin_tab() ) { 789 return false; 790 } 791 792 if ( ! bp_is_item_admin() || ( 'public' == $bp->groups->current_group->status ) ) { 793 return false; 794 } 795 796 $request_action = (string) bp_action_variable( 1 ); 797 $membership_id = (int) bp_action_variable( 2 ); 820 798 821 799 if ( !empty( $request_action ) && !empty( $membership_id ) ) {
Note: See TracChangeset
for help on using the changeset viewer.