I want to be able to create custom login errors.
For instance if a user visits a restricted area without being logged in then I am redirecting to
wp-login.php?ref=access and I would like to output
Restricted area, please login to continue. or something similar.
Any idea how to do this. I found that there are filters for
login_errors but I can't find anywhere else in the code this comes up, except in the login page itself.
Lastly, I really don't want to have to change any of the core files to do this either. I've spent a lot of time and energy trying to make sure that the wordpress core is completely untouched so that I can upgrade it.
Anyone have any ideas?