wp_login_errors
Filter HookDescription
Filters the login page errors.Hook Information
| File Location |
wp-login.php
View on GitHub
|
| Hook Type | Filter |
| Line Number | 1483 |
Hook Parameters
| Type | Name | Description |
|---|---|---|
WP_Error
|
$errors
|
WP Error object. |
string
|
$redirect_to
|
Redirect destination URL. |
Usage Examples
Basic Usage
<?php
// Hook into wp_login_errors
add_filter('wp_login_errors', 'my_custom_filter', 10, 2);
function my_custom_filter($errors, $redirect_to) {
// Your custom filtering logic here
return $errors;
}
Source Code Context
wp-login.php:1483
- How this hook is used in WordPress core
<?php
1478 * @since 3.6.0
1479 *
1480 * @param WP_Error $errors WP Error object.
1481 * @param string $redirect_to Redirect destination URL.
1482 */
1483 $errors = apply_filters( 'wp_login_errors', $errors, $redirect_to );
1484
1485 // Clear any stale cookies.
1486 if ( $reauth ) {
1487 wp_clear_auth_cookie();
1488 }
PHP Documentation
<?php
/**
* Filters the login page errors.
*
* @since 3.6.0
*
* @param WP_Error $errors WP Error object.
* @param string $redirect_to Redirect destination URL.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-login.php
Related Hooks
Related hooks will be displayed here in future updates.