I want to write a plugin hook for wp-login.php?action=lostpassword
.
Does anyone know what the add_action() is for wp-login.php?action=lostpassword
?
I searched the CODEX and could not discover it.
Thank you.
The login form actions are located in wp-login.php
here and here.
// "login_form_{$action}"
login_form_lostpassword
login_form_postpass
login_form_logout
lostpassword_form
resetpass_form
register_form
There's also the general login_init
which will fire for all actions.
To enqueue scripts on login, use login_enqueue_scripts
. Right after that, login_head
will allow you to add custom meta tags, etc. to the <head>
.
The end of the page is injectable with login_footer
.
lostpassword_post
, which comes with an argument \WP_Error $errors
. validate_password_reset
which
has two arguments, first again the \WP_Error $errors
and the
current \WP_User $user
as second (or another \WP_Error
in case
the user is errornous).login_init
is exactly what I was looking for.