diff --git src/bp-members/bp-members-notifications.php src/bp-members/bp-members-notifications.php
index 922129d5a..56038b3dc 100644
|
|
|
function members_format_notifications( $action, $item_id, $secondary_item_id, $t |
| 142 | 142 | * @param int $inviter_id ID of the user who invited this user to the site. |
| 143 | 143 | */ |
| 144 | 144 | function bp_members_invitations_accepted_invitation_notification( $invite, $new_user, $inviter_id ) { |
| | 145 | if ( ! bp_is_active( 'notifications' ) ) { |
| | 146 | return; |
| | 147 | } |
| 145 | 148 | |
| 146 | 149 | // Notify all inviters. |
| 147 | 150 | $args = array( |
| … |
… |
add_action( 'members_invitations_invite_accepted', 'bp_members_invitations_accep |
| 182 | 185 | * @since 8.0.0 |
| 183 | 186 | */ |
| 184 | 187 | function bp_members_mark_read_accepted_invitation_notification() { |
| 185 | | if ( false === is_singular() || false === is_user_logged_in() || ! bp_is_user() || empty( $_GET['welcome'] ) ) { |
| | 188 | if ( false === is_singular() || false === is_user_logged_in() || ! bp_is_user() || empty( $_GET['welcome'] ) || ! bp_is_active( 'notifications' ) ) { |
| 186 | 189 | return; |
| 187 | 190 | } |
| 188 | 191 | |
| … |
… |
add_action( 'bp_screens', 'bp_members_mark_read_accepted_invitation_notification |
| 208 | 211 | function bp_members_mark_read_submitted_membership_request_notification() { |
| 209 | 212 | |
| 210 | 213 | $signup_screens = array( 'users_page_bp-signups', 'users_page_bp-signups-network' ); |
| 211 | | if ( ! wp_doing_ajax() && in_array( get_current_screen()->base, $signup_screens, true ) && ! empty( $_GET['mod_req'] ) && ! empty( $_GET['signup_id'] ) ) { |
| | 214 | if ( ! wp_doing_ajax() && in_array( get_current_screen()->base, $signup_screens, true ) && ! empty( $_GET['mod_req'] ) && ! empty( $_GET['signup_id'] ) && bp_is_active( 'notifications' ) ) { |
| 212 | 215 | // Mark all notifications about this request as read. |
| 213 | 216 | BP_Notifications_Notification::update( |
| 214 | 217 | array( |