您可以使用login_errors
过滤器挂钩,如下所示:
add_filter(\'login_errors\',\'login_error_message\');
function login_error_message($error){
//check if that\'s the error you are looking for
$pos = strpos($error, \'incorrect\');
if (is_int($pos)) {
//its the right error so you can overwrite it
$error = "Wrong information";
}
return $error;
}
更新:我刚刚测试了代码,它工作得很好,只是将代码粘贴到我的主题函数中。php文件,无需使用更改任何内容。采购订单文件
