bp_settings_pending_email_notice()
Add the ‘pending email change’ message to the settings page.
Description
Source
File: bp-settings/bp-settings-template.php
function bp_settings_pending_email_notice() { $pending_email = bp_get_user_meta( bp_displayed_user_id(), 'pending_email_change', true ); if ( empty( $pending_email['newemail'] ) ) { return; } if ( bp_get_displayed_user_email() == $pending_email['newemail'] ) { return; } ?> <div id="message" class="bp-template-notice error"> <p><?php printf( __( 'There is a pending change of your email address to %s.', 'buddyboss' ), '<code>' . esc_html( $pending_email['newemail'] ) . '</code>' ); ?> <br /> <?php printf( __( 'Check your email (%1$s) for the verification link, or <a href="%2$s">cancel the pending change</a>.', 'buddyboss' ), '<code>' . esc_html( bp_get_displayed_user_email() ) . '</code>', esc_url( wp_nonce_url( bp_displayed_user_domain() . bp_get_settings_slug() . '/?dismiss_email_change=1', 'bp_dismiss_email_change' ) ) ); ?></p> </div> <?php }
Changelog
Version | Description |
---|---|
BuddyPress 2.1.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.