Для фильтра wp-login.php
есть фильтр. Но не трогайте основные файлы WordPress, фильтры и блокировки действий на месте, поэтому вы можете изменять поведение WP без редактирования ядра.
add_filter('registration_errors', 'registration_errors_so_16002591');
function registration_errors_so_16002591($errors)
{
if(isset($errors->errors['invalid_email'])) {
$errors->errors['invalid_email'][0] = '<strong>bad</strong> email';
}
if(isset($errors->errors['username_exists'])) {
$errors->errors['username_exists'][0] = 'nick <strong>picken</strong>';
}
// Other errors
// ['empty_email']
// ['empty_username']
return $errors;
}
Связанные Q & А: Where to put my code: plugin or functions.php?