Skip to:
Content

BuddyPress.org

Ticket #7029: 7029.diff

File 7029.diff, 2.4 KB (added by tharsheblows, 4 years ago)

adds in field to email settings to opt out of group membership completed emails

  • src/bp-groups/bp-groups-screens.php

     
    14231423                $group_promo   = 'yes';
    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';
    14271427
     1428        if ( !$group_request_completed = bp_get_user_meta( bp_displayed_user_id(), 'notification_membership_request_completed', true ) )
     1429                $group_request_completed = 'yes'; ?>
     1430
    14281431        <table class="notification-settings" id="groups-notification-settings">
    14291432                <thead>
    14301433                        <tr>
     
    14601463                                <td class="yes"><input type="radio" name="notifications[notification_groups_membership_request]" id="notification-groups-membership-request-yes" value="yes" <?php checked( $group_request, 'yes', true ) ?>/><label for="notification-groups-membership-request-yes" class="bp-screen-reader-text"><?php _e( 'Yes, send email', 'buddypress' ); ?></label></td>
    14611464                                <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>
    14621465                        </tr>
     1466                        <tr id="groups-notification-settings-request-completed">
     1467                                <td></td>
     1468                                <td><?php _ex( 'Your request to join a group has been approved or denied', 'group settings on notification settings page', 'buddypress' ) ?></td>
     1469                                <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>
     1470                                <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>
     1471                        </tr>
    14631472
    14641473                        <?php
    14651474