members_screen_notification_settings()
Add Members-related settings to the Settings > Notifications page.
Source Source
File: bp-members/bp-members-notifications.php
function members_screen_notification_settings() { // Bail early if invitations are not allowed--they are the only members notification so far. if ( ! bp_get_members_invitations_allowed () ) { return; } if ( ! $allow_acceptance_emails = bp_get_user_meta( bp_displayed_user_id(), 'notification_members_invitation_accepted', true ) ) { $allow_acceptance_emails = 'yes'; } ?> <table class="notification-settings" id="members-notification-settings"> <thead> <tr> <th class="icon"></th> <th class="title"><?php _ex( 'Members', 'Member 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="members-notification-settings-invitation_accepted"> <td></td> <td><?php _ex( 'Someone accepts your membership invitation', 'Member settings on notification settings page', 'buddypress' ) ?></td> <td class="yes"><input type="radio" name="notifications[notification_members_invitation_accepted]" id="notification-members-invitation-accepted-yes" value="yes" <?php checked( $allow_acceptance_emails, 'yes', true ) ?>/><label for="notification-members-invitation-accepted-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_members_invitation_accepted]" id="notification-members-invitation-accepted-no" value="no" <?php checked( $allow_acceptance_emails, 'no', true ) ?>/><label for="notification-members-invitation-accepted-no" class="bp-screen-reader-text"><?php /* translators: accessibility text */ _e( 'No, do not send email', 'buddypress' ); ?></label></td> </tr> <?php /** * Fires after the last table row on the members notification screen. * * @since 1.0.0 */ do_action( 'members_screen_notification_settings' ); ?> </tbody> </table> <?php }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
8.0.0 | Introduced. |