
站长必藏:26个Linux服务器管理常用SSH命令行
welcome_user_msg_filter ( $text )
welcome_user_msg_filter。这个过滤器用于定制新用户首次登录网站时显示的欢迎信息。它需要两个参数–$message和$user_id。$message是默认的欢迎词,$user_id是用户的ID。
确保欢迎词不是空的。目前未使用。
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; }