编辑Wordpress“电子邮件更改通知”电子邮件文本

If I log in to Wordpress as an admin and change another user's email address, the following email is automatically sent to that user saying the following:

Hi [username], This notice confirms that your email was changed on [website]. If you did not change your email, please contact the Site Administrator at [admin email] This email has been sent to [user email] Regards, All at [website] [website url]

Is there a way to edit this message to say something else?

You would use the email_change_email filter. Learn about this filter in the WordPress Codex. Also learn about it on hookr.io

Learn about adding filters here.

    /* Filter Email Change Email Text */

    function so43532474_custom_change_email_address_change( $email_change, $user, $userdata ) {

        $new_message_txt = __( 'Change the text here, use ###USERNAME###, ###ADMIN_EMAIL###, ###EMAIL###, ###SITENAME###, ###SITEURL### tags.' );

        $email_change[ 'message' ] = $new_message_txt;

        return $email_change;

    }
    add_filter( 'email_change_email', 'so43532474_custom_change_email_address_change', 10, 3 );