您可以筛选\'gettext\'
.
未测试的示例代码:
add_filter( \'gettext\', \'wpse_65085_change_error_messages\', 10, 3 );
function wpse_65085_change_error_messages( $translated, $text, domain )
{
if ( \'default\' !== $domain )
{
return $translated;
}
switch( $text )
{
case \'Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! " ? $ % ^ & ).\':
return __( \'Use whatever you want\', \'your_plugin_text_domain\' );
// more cases here.
default:
return $translated;
}
}