uo_reset_after_container
Fires after the main WordPress content container has been reset.
add_action( 'uo_reset_after_container', $callback, 10, 1 );
Description
Fires after the password reset form container is rendered. Use this hook to inject custom content or modify the form's structure before the submit button. It's ideal for adding extra fields, instructions, or social login options before the reset action.
Usage
add_action( 'uo_reset_after_container', 'your_function_name', 10, 1 );
Examples
<?php
/**
* Example: Add a custom message or perform an action after the password reset container is displayed.
*
* This hook is fired after the main container for the password reset form is rendered.
* It's useful for adding supplementary information, tracking scripts, or performing
* actions related to the password reset process.
*/
add_action( 'uo_reset_after_container', 'my_custom_reset_after_container_logic', 10 );
function my_custom_reset_after_container_logic() {
// You can output custom HTML here. For example, a friendly reminder or a link to the login page.
echo '<div class="custom-reset-message" style="margin-top: 20px; color: #555;">';
echo '<p>Thank you for resetting your password. If you have any issues, please contact support.</p>';
echo '<p><a href="' . esc_url( wp_login_url() ) . '">Go back to login</a></p>';
echo '</div>';
// Alternatively, you could perform a more complex action, like logging an event.
// For example:
// if ( is_user_logged_in() ) {
// error_log( 'User ' . get_current_user_id() . ' completed the password reset flow.' );
// }
}
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/default-reset-pwd.php:61
src/templates/frontend-login/modern_ui-reset-pwd.php:154
src/templates/frontend-login/layout_1-reset-pwd.php:147
<?php do_action( 'uo_reset_before_submit' ); ?>
<p class="submit"><input type="submit" name="wp-submit" id="wp-submit"
class="button button-primary button-large"
value="<?php echo $innerText['Reset-Password-Button']; ?>"/></p>
<?php do_action( 'uo_reset_after_submit' ); ?>
</form>
<?php do_action( 'uo_reset_after_form' ); ?>
<?php do_action( 'uo_reset_after_container' ); ?>