shake_error_codes
Filter HookDescription
Filters the error codes array for shaking the login form.Hook Information
File Location |
wp-login.php
View on GitHub
|
Hook Type | Filter |
Line Number | 67 |
Hook Parameters
Type | Name | Description |
---|---|---|
string[]
|
$shake_error_codes
|
Error codes that shake the login form. |
Usage Examples
Basic Usage
<?php
// Hook into shake_error_codes
add_filter('shake_error_codes', 'my_custom_filter', 10, 1);
function my_custom_filter($shake_error_codes) {
// Your custom filtering logic here
return $shake_error_codes;
}
Source Code Context
wp-login.php:67
- How this hook is used in WordPress core
<?php
62 *
63 * @since 3.0.0
64 *
65 * @param string[] $shake_error_codes Error codes that shake the login form.
66 */
67 $shake_error_codes = apply_filters( 'shake_error_codes', $shake_error_codes );
68
69 if ( $shake_error_codes && $wp_error->has_errors() && in_array( $wp_error->get_error_code(), $shake_error_codes, true ) ) {
70 add_action( 'login_footer', 'wp_shake_js', 12 );
71 }
72
PHP Documentation
<?php
/**
* Filters the error codes array for shaking the login form.
*
* @since 3.0.0
*
* @param string[] $shake_error_codes Error codes that shake the login form.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-login.php
Related Hooks
Related hooks will be displayed here in future updates.