确保欢迎消息不为空。目前尚未使用
原型
welcome_user_msg_filter( string $text )
参数
$text
(string)
(Required)
返回值
(string)
源文件
路径:wp-includes/ms-functions.php
<?php
...
function welcome_user_msg_filter( $text ) {
if ( !$text ) {
remove_filter( 'site_option_welcome_user_email', 'welcome_user_msg_filter' );
/* translators: Do not translate USERNAME, PASSWORD, LOGINLINK, SITE_NAME: those are placeholders. */
$text = __( 'Howdy USERNAME,
Your new account is set up.
You can log in with the following information:
Username: USERNAME
Password: PASSWORD
LOGINLINK
Thanks!
--The Team @ SITE_NAME' );
update_site_option( 'welcome_user_email', $text );
}
return $text;
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/welcome_user_msg_filter/