wp pluggable.php |自定义通知电子邮件给新用户

时间:2019-10-20 23:41:01

标签: php wordpress notifications

我正在为Wordpress中的新用户设置通知的自定义设置。

文件wp-includes/pluggable.php

    /* translators: %s: user login */

$message = sprintf(__('Username: %s'), $user->user_login) . "\r\n\r\n"; 
$message .= __('Dear user,') . "\r\n\r\n";
$message .= __('welcome on board.') . "\r\n\r\n";
$message .= __('Please follow the link in order to set your personal password.') . "\r\n\r\n";
$message .= '<' . network_site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user->user_login), 'login') . ">\r\n\r\n";

$message .= __('Best wishes,') . "\r\n\r\n";
$message .= __('The team') . "\r\n\r\n";

问题是我想设置

$message = sprintf(__('Username: %s'), $user->user_login) . "\r\n\r\n"; 

之后

$message .= __('Please follow the link in order to set your personal password.') . "\r\n\r\n";

最终输出

 /* translators: %s: user login */


$message .= __('Dear user,') . "\r\n\r\n";
$message .= __('welcome on board.') . "\r\n\r\n";
$message .= __('Please take care of your Username and follow the link in order to set your personal password.') . "\r\n\r\n";

$message = sprintf(__('Username: %s'), $user->user_login) . "\r\n\r\n"; 

$message .= '<' . network_site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user->user_login), 'login') . ">\r\n\r\n";

$message .= __('Best wishes,') . "\r\n\r\n";
$message .= __('The team') . "\r\n\r\n";

但是它不起作用,用户收到的电子邮件不接受前三个$ messages,它仅显示用户名$ message和随后的$ messages。

我在哪里错了?

0 个答案:

没有答案