uo_forgot_after_form
Fires after the user's forgot password form is submitted, allowing custom actions.
add_action( 'uo_forgot_after_form', $callback, 10, 1 );
Description
Fires after the "Forgot Password" form is displayed on the frontend. Developers can use this hook to add custom content or functionality immediately following the form, such as additional links, messages, or scripts, before the footer section of the page.
Usage
add_action( 'uo_forgot_after_form', 'your_function_name', 10, 1 );
Examples
<?php
/**
* Example: Display a message after the forgot password form is rendered.
*
* This function is hooked into 'uo_forgot_after_form' and will be executed
* after the HTML for the password reset form has been outputted.
* It can be used to display additional information or a brief note to the user.
*/
add_action( 'uo_forgot_after_form', 'my_custom_forgot_password_message', 10 );
function my_custom_forgot_password_message() {
// You can optionally check if the user is logged in or not,
// though this hook is specifically for the forgot password form,
// so it's unlikely a user is logged in at this point.
// if ( ! is_user_logged_in() ) {
echo '<p class="ult-form__message">Please enter your username or email address to reset your password.</p>';
// }
}
// Note: The 'uo_forgot_after_form' hook does not pass any parameters.
// Therefore, the 'accepted_args' for add_action should be 0.
// The example above correctly uses the default of 10 for priority.
?>
Placement
This code should be placed in the functions.php file of your active theme, a custom plugin, or using a code snippets plugin.
Source Code
src/templates/frontend-login/modern_ui-lost-pwd.php:151
src/templates/frontend-login/layout_1-lost-pwd.php:144
</div>
<?php do_action( 'uo_forgot_after_submit' ); ?>
</form>
</div>
<?php do_action( 'uo_forgot_after_form' ); ?>
<?php } ?>
<?php do_action( 'uo_forgot_before_footer' ); ?>
</div>
<div class="ult-form__footer">