uo_login_after_footer
Fires after the footer of the user login form has been rendered.
add_action( 'uo_login_after_footer', $callback, 10, 1 );
Description
Fires after the login form's footer elements in the frontend login templates. Developers can use this hook to add custom content or functionality directly after the login form's footer, before any scripts are loaded.
Usage
add_action( 'uo_login_after_footer', 'your_function_name', 10, 1 );
Examples
add_action( 'uo_login_after_footer', 'my_custom_login_footer_script', 10, 0 );
/**
* Adds a custom script or content to the footer of the user login form.
* This could be used for displaying additional information, custom links,
* or embedding small JavaScript snippets.
*/
function my_custom_login_footer_script() {
// Example: Display a link to the password reset page
$password_reset_url = wp_lostpassword_url();
if ( $password_reset_url ) {
echo '<p class="my-login-footer-text"><a href="' . esc_url( $password_reset_url ) . '">Forgot your password?</a></p>';
}
// Example: Add a small JavaScript snippet to log something to the console
?>
<script type="text/javascript">
console.log('Custom content loaded after the login form footer.');
</script>
<?php
}
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/layout_1-login.php:230
src/templates/frontend-login/modern_ui-login.php:237
<?php do_action( 'uo_login_after_register' ); ?>
<?php } ?>
</div>
<?php do_action( 'uo_login_after_footer' ); ?>
</div>
</div>
<script type='text/javascript'>
jQuery(document).ready(function () {