当插入主题的函数时,以下内容应按原样工作(使用新消息的字符串和主题的文本域)。php:
function wpse71032_change_tml_registration_message( $translated_text, $text, $domain ) {
if( $domain === \'theme-my-login\' &&
$text === \'Your registration was successful but you must now confirm your email address before you can log in. Please check your email and click on the link provided.\'
) {
/* in the below, change the first argument to the message you want
and the second argument to your theme\'s textdomain */
$translated_text = __( \'%Registration Message%\', \'theme_text_domain\' );
}
return $translated_text;
}
add_filter( \'gettext\', \'wpse71032_change_tml_registration_message\', 20, 3 );
请参见
the article on the gettext filter 在筛选器引用中。