uo_forgot_after_container
Fires after the forgot password form container has been rendered.
add_action( 'uo_forgot_after_container', $callback, 10, 1 );
Description
Fires after the entire forgot password form container is rendered. Use this hook to add custom content or scripts below the main forgot password form, ensuring it appears only after all form elements and the footer are processed.
Usage
add_action( 'uo_forgot_after_container', 'your_function_name', 10, 1 );
Examples
<?php
/**
* Add a custom message after the forgot password form container.
*
* This function demonstrates how to hook into the 'uo_forgot_after_container'
* action hook to display a custom message or additional elements after the
* main container of the forgot password form.
*
* @param array $args An array of arguments passed to the action hook.
*/
function my_custom_forgot_password_message( $args ) {
// Check if the form is for a specific context (optional, depending on plugin's usage)
$form_context = isset( $args['context'] ) ? $args['context'] : '';
// Display a simple message after the form container
echo '<div class="custom-forgot-message" style="margin-top: 20px; padding: 15px; background-color: #e0f7fa; border-left: 4px solid #00bcd4;">';
echo '<strong>Important:</strong> Please check your spam folder if you do not receive the password reset email within a few minutes.';
echo '</div>';
// You could also conditionally display something based on the context
if ( 'user_profile' === $form_context ) {
echo '<p>This reset request was initiated from your user profile.</p>';
}
}
add_action( 'uo_forgot_after_container', 'my_custom_forgot_password_message', 10, 1 ); // 10 is the priority, 1 is the number of accepted arguments
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:173
src/templates/frontend-login/layout_1-lost-pwd.php:166
</div>
<?php do_action( 'uo_forgot_after_footer' ); ?>
</div>
</div>
<?php do_action( 'uo_forgot_after_container' ); ?>