login_init
Action HookDescription
Fires when the login form is initialized.Hook Information
| File Location |
wp-login.php
View on GitHub
|
| Hook Type | Action |
| Line Number | 546 |
Hook Parameters
This hook doesn't accept any parameters.
Usage Examples
Basic Usage
<?php
// Hook into login_init
add_action('login_init', 'my_custom_function');
function my_custom_function() {
// Your custom code here
}
Source Code Context
wp-login.php:546
- How this hook is used in WordPress core
<?php
541 /**
542 * Fires when the login form is initialized.
543 *
544 * @since 3.2.0
545 */
546 do_action( 'login_init' );
547
548 /**
549 * Fires before a specified login form action.
550 *
551 * The dynamic portion of the hook name, `$action`, refers to the action
PHP Documentation
<?php
/**
* Fires when the login form is initialized.
*
* @since 3.2.0
*/
Quick Info
- Hook Type: Action
- Parameters: 0
- File: wp-login.php
Related Hooks
Related hooks will be displayed here in future updates.