groups_screen_notification_settings()
Render the group settings fields on the Notification Settings page.
Description
Source
File: bp-groups/bp-groups-notifications.php
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 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 | 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 _e( 'Social Groups' , 'buddyboss' ) ?></th> <th class = "yes" ><?php _e( 'Yes' , 'buddyboss' ) ?></th> <th class = "no" ><?php _e( 'No' , 'buddyboss' )?></th> </tr> </thead> <tbody> <tr id= "groups-notification-settings-invitation" > <td></td> <td><?php _e( 'A member invites you to join a group' , 'buddyboss' ) ?></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' , 'buddyboss' ); ?></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' , 'buddyboss' ); ?></label></td> </tr> <tr id= "groups-notification-settings-info-updated" > <td></td> <td><?php _e( 'Group information is updated' , 'buddyboss' ) ?></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' , 'buddyboss' ); ?></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' , 'buddyboss' ); ?></label></td> </tr> <tr id= "groups-notification-settings-promoted" > <td></td> <td><?php _e( 'You are promoted to a group organizer or moderator' , 'buddyboss' ) ?></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' , 'buddyboss' ); ?></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' , 'buddyboss' ); ?></label></td> </tr> <tr id= "groups-notification-settings-request" > <td></td> <td><?php _e( 'A member requests to join a private group you organize' , 'buddyboss' ) ?></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' , 'buddyboss' ); ?></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' , 'buddyboss' ); ?></label></td> </tr> <tr id= "groups-notification-settings-request-completed" > <td></td> <td><?php _e( 'Your request to join a group has been approved or denied' , 'buddyboss' ) ?></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' , 'buddyboss' ); ?></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' , 'buddyboss' ); ?></label></td> </tr> <?php /** * Fires at the end of the available group settings fields on Notification Settings page. * * @since BuddyPress 1.0.0 */ do_action( 'groups_screen_notification_settings' ); ?> </tbody> </table> <?php } |
Changelog
Version | Description |
---|---|
BuddyPress 1.0.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.