bp_email_new_network_admin_email_content( string $email_text, array $new_admin_email )
Filters the text of the email sent when a change of network admin email address is attempted.
Description
The following strings have a special meaning and will get replaced dynamically:
USERNAME### The current user’s username.
ADMIN_URL### The link to click on to confirm the email change.
EMAIL### The proposed new network admin email address.
SITENAME### The name of the network.
SITEURL### The URL to the network.
Parameters
- $email_text
-
(Required) Text in the email.
- $new_admin_email
-
(Required) Data relating to the new network admin email address.
- 'hash'
(string) The secure hash used in the confirmation link URL. - 'newemail'
(string) The proposed new network admin email address.
- 'hash'
Source
File: bp-core/bp-core-wp-emails.php
function bp_email_new_network_admin_email_content( $email_text, $new_admin_email ) { $current_user = wp_get_current_user(); if ( empty( $current_user->ID ) ) { return $email_text; } /* translators: Do not translate USERNAME, ADMIN_URL, EMAIL, SITENAME, SITEURL: those are placeholders. */ $email_text = '<p>' . __( 'Howdy ###USERNAME###,', 'buddyboss' ) . '</p>'; $email_text .= '<p>' . __( 'You recently requested to have the network admin email address on your network changed.', 'buddyboss' ) . '</p>'; $email_text .= '<p>' . __( 'If this is correct, please click on the following link to change it: <br />###ADMIN_URL###', 'buddyboss' ) . '</p>'; $email_text .= '<p>' . __( 'You can safely ignore and delete this email if you do not want to take this action.', 'buddyboss' ) . '</p>'; $email_text .= '<p>' . __( 'This email has been sent to ###EMAIL###', 'buddyboss' ) . '</p>'; $email_text .= '<p>' . __( 'Regards, <br /> All at ###SITENAME### <br /> ###SITEURL###', 'buddyboss' ) . '</p>'; add_filter( 'wp_mail_content_type', 'bp_email_set_content_type' ); //add this to support html in email $email_text = bp_email_core_wp_get_template( $email_text, $current_user ); return $email_text; }
Changelog
Version | Description |
---|---|
BuddyBoss 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.