2013-04-14 3 views

답변

3

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 & A : Where to put my code: plugin or functions.php?

관련 문제