Skip to:
Content

BuddyPress.org

Changeset 10718


Ignore:
Timestamp:
04/27/2016 10:51:33 AM (9 years ago)
Author:
djpaul
Message:

Emails: add option to notifications settings to opt-out of emails sent when group membership requests are accepted/rejected.

Fixes #7029

Props tharsheblows

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-screens.php

    r10652 r10718  
    14241424
    14251425    if ( !$group_request = bp_get_user_meta( bp_displayed_user_id(), 'notification_groups_membership_request', true ) )
    1426         $group_request = 'yes'; ?>
     1426        $group_request = 'yes';
     1427
     1428    if ( ! $group_request_completed = bp_get_user_meta( bp_displayed_user_id(), 'notification_membership_request_completed', true ) ) {
     1429        $group_request_completed = 'yes';
     1430    }
     1431    ?>
    14271432
    14281433    <table class="notification-settings" id="groups-notification-settings">
     
    14611466                <td class="no"><input type="radio" name="notifications[notification_groups_membership_request]" id="notification-groups-membership-request-no" value="no" <?php checked( $group_request, 'no', true ) ?>/><label for="notification-groups-membership-request-no" class="bp-screen-reader-text"><?php _e( 'No, do not send email', 'buddypress' ); ?></label></td>
    14621467            </tr>
     1468            <tr id="groups-notification-settings-request-completed">
     1469                <td></td>
     1470                <td><?php _ex( 'Your request to join a group has been approved or denied', 'group settings on notification settings page', 'buddypress' ) ?></td>
     1471                <td class="yes"><input type="radio" name="notifications[notification_membership_request_completed]" id="notification-groups-membership-request-completed-yes" value="yes" <?php checked( $group_request_completed, 'yes', true ) ?>/><label for="notification-groups-membership-request-completed-yes" class="bp-screen-reader-text"><?php _e( 'Yes, send email', 'buddypress' ); ?></label></td>
     1472                <td class="no"><input type="radio" name="notifications[notification_membership_request_completed]" id="notification-groups-membership-request-completed-no" value="no" <?php checked( $group_request_completed, 'no', true ) ?>/><label for="notification-groups-membership-request-completed-no" class="bp-screen-reader-text"><?php _e( 'No, do not send email', 'buddypress' ); ?></label></td>
     1473            </tr>
    14631474
    14641475            <?php
Note: See TracChangeset for help on using the changeset viewer.