login_footer
Action HookDescription
Filters the login redirect URL.Hook Information
| File Location |
wp-login.php
View on GitHub
|
| Hook Type | Action |
| Line Number | 1373 |
Hook Parameters
| Type | Name | Description |
|---|---|---|
string
|
$redirect_to
|
The redirect destination URL. |
string
|
$requested_redirect_to
|
The requested redirect destination URL passed as a parameter. |
WP_User|WP_Error
|
$user
|
WP_User object if login was successful, WP_Error object otherwise. |
Usage Examples
Basic Usage
<?php
// Hook into login_footer
add_action('login_footer', 'my_custom_function', 10, 3);
function my_custom_function($redirect_to, $requested_redirect_to, $user) {
// Your custom code here
}
Source Code Context
wp-login.php:1373
- How this hook is used in WordPress core
<?php
1368 ?>
1369 </div>
1370 <?php
1371
1372 /** This action is documented in wp-login.php */
1373 do_action( 'login_footer' );
1374
1375 if ( $customize_login ) {
1376 ob_start();
1377 ?>
1378 <script>setTimeout( function(){ new wp.customize.Messenger({ url: '<?php echo wp_customize_url(); ?>', channel: 'login' }).send('login') }, 1000 );</script>
PHP Documentation
<?php
/**
* Filters the login redirect URL.
*
* @since 3.0.0
*
* @param string $redirect_to The redirect destination URL.
* @param string $requested_redirect_to The requested redirect destination URL passed as a parameter.
* @param WP_User|WP_Error $user WP_User object if login was successful, WP_Error object otherwise.
*/
Quick Info
- Hook Type: Action
- Parameters: 3
- File: wp-login.php
Related Hooks
Related hooks will be displayed here in future updates.