Skip to content

Instantly share code, notes, and snippets.

@petersplugins
Created December 7, 2016 16:41
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save petersplugins/88411cf9de62aea4cd20c7fedaaf780a to your computer and use it in GitHub Desktop.
Save petersplugins/88411cf9de62aea4cd20c7fedaaf780a to your computer and use it in GitHub Desktop.
<?php
// This code snippet prevents WordPress from giving hints on incorrect logins
// Add a custom function to filter the login error message
add_filter( 'login_errors', 'hide_login_hint' );
function hide_login_hint( $error ){
// No matter what error occurred always display the same message
return 'Login incorrect.';
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment