groups_screen_notification_settings()

Render the group settings fields on the Notification Settings page.


Description Description


Source Source

File: bp-groups/bp-groups-notifications.php

1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
function groups_screen_notification_settings() {
 
    if ( !$group_invite = bp_get_user_meta( bp_displayed_user_id(), 'notification_groups_invite', true ) )
        $group_invite  = 'yes';
 
    if ( !$group_update = bp_get_user_meta( bp_displayed_user_id(), 'notification_groups_group_updated', true ) )
        $group_update  = 'yes';
 
    if ( !$group_promo = bp_get_user_meta( bp_displayed_user_id(), 'notification_groups_admin_promotion', true ) )
        $group_promo   = 'yes';
 
    if ( !$group_request = bp_get_user_meta( bp_displayed_user_id(), 'notification_groups_membership_request', true ) )
        $group_request = 'yes';
 
    if ( ! $group_request_completed = bp_get_user_meta( bp_displayed_user_id(), 'notification_membership_request_completed', true ) ) {
        $group_request_completed = 'yes';
    }
    ?>
 
    <table class="notification-settings" id="groups-notification-settings">
        <thead>
            <tr>
                <th class="icon"></th>
                <th class="title"><?php _ex( 'Groups', 'Group settings on notification settings page', 'buddypress' ) ?></th>
                <th class="yes"><?php _e( 'Yes', 'buddypress' ) ?></th>
                <th class="no"><?php _e( 'No', 'buddypress' )?></th>
            </tr>
        </thead>
 
        <tbody>
            <tr id="groups-notification-settings-invitation">
                <td></td>
                <td><?php _ex( 'A member invites you to join a group', 'group settings on notification settings page','buddypress' ) ?></td>
                <td class="yes"><input type="radio" name="notifications[notification_groups_invite]" id="notification-groups-invite-yes" value="yes" <?php checked( $group_invite, 'yes', true ) ?>/><label for="notification-groups-invite-yes" class="bp-screen-reader-text"><?php
                    /* translators: accessibility text */
                    _e( 'Yes, send email', 'buddypress' );
                ?></label></td>
                <td class="no"><input type="radio" name="notifications[notification_groups_invite]" id="notification-groups-invite-no" value="no" <?php checked( $group_invite, 'no', true ) ?>/><label for="notification-groups-invite-no" class="bp-screen-reader-text"><?php
                    /* translators: accessibility text */
                    _e( 'No, do not send email', 'buddypress' );
                ?></label></td>
            </tr>
            <tr id="groups-notification-settings-info-updated">
                <td></td>
                <td><?php _ex( 'Group information is updated', 'group settings on notification settings page', 'buddypress' ) ?></td>
                <td class="yes"><input type="radio" name="notifications[notification_groups_group_updated]" id="notification-groups-group-updated-yes" value="yes" <?php checked( $group_update, 'yes', true ) ?>/><label for="notification-groups-group-updated-yes" class="bp-screen-reader-text"><?php
                    /* translators: accessibility text */
                    _e( 'Yes, send email', 'buddypress' );
                ?></label></td>
                <td class="no"><input type="radio" name="notifications[notification_groups_group_updated]" id="notification-groups-group-updated-no" value="no" <?php checked( $group_update, 'no', true ) ?>/><label for="notification-groups-group-updated-no" class="bp-screen-reader-text"><?php
                    /* translators: accessibility text */
                    _e( 'No, do not send email', 'buddypress' );
                ?></label></td>
            </tr>
            <tr id="groups-notification-settings-promoted">
                <td></td>
                <td><?php _ex( 'You are promoted to a group administrator or moderator', 'group settings on notification settings page', 'buddypress' ) ?></td>
                <td class="yes"><input type="radio" name="notifications[notification_groups_admin_promotion]" id="notification-groups-admin-promotion-yes" value="yes" <?php checked( $group_promo, 'yes', true ) ?>/><label for="notification-groups-admin-promotion-yes" class="bp-screen-reader-text"><?php
                    /* translators: accessibility text */
                    _e( 'Yes, send email', 'buddypress' );
                ?></label></td>
                <td class="no"><input type="radio" name="notifications[notification_groups_admin_promotion]" id="notification-groups-admin-promotion-no" value="no" <?php checked( $group_promo, 'no', true ) ?>/><label for="notification-groups-admin-promotion-no" class="bp-screen-reader-text"><?php
                    /* translators: accessibility text */
                    _e( 'No, do not send email', 'buddypress' );
                ?></label></td>
            </tr>
            <tr id="groups-notification-settings-request">
                <td></td>
                <td><?php _ex( 'A member requests to join a private group for which you are an admin', 'group settings on notification settings page', 'buddypress' ) ?></td>
                <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
                    /* translators: accessibility text */
                    _e( 'Yes, send email', 'buddypress' );
                ?></label></td>
                <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
                    /* translators: accessibility text */
                    _e( 'No, do not send email', 'buddypress' );
                ?></label></td>
            </tr>
            <tr id="groups-notification-settings-request-completed">
                <td></td>
                <td><?php _ex( 'Your request to join a group has been approved or denied', 'group settings on notification settings page', 'buddypress' ) ?></td>
                <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
                    /* translators: accessibility text */
                    _e( 'Yes, send email', 'buddypress' );
                ?></label></td>
                <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
                    /* translators: accessibility text */
                    _e( 'No, do not send email', 'buddypress' );
                ?></label></td>
            </tr>
 
            <?php
 
            /**
             * Fires at the end of the available group settings fields on Notification Settings page.
             *
             * @since 1.0.0
             */
            do_action( 'groups_screen_notification_settings' ); ?>
 
        </tbody>
    </table>
 
<?php
}

Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.