user_request_key_expiration
Filter HookDescription
Filters the expiration time of confirm keys.Hook Information
File Location |
wp-includes/user.php
View on GitHub
|
Hook Type | Filter |
Line Number | 5002 |
Hook Parameters
Type | Name | Description |
---|---|---|
int
|
$expiration
|
The expiration time in seconds. |
Usage Examples
Basic Usage
<?php
// Hook into user_request_key_expiration
add_filter('user_request_key_expiration', 'my_custom_filter', 10, 1);
function my_custom_filter($expiration) {
// Your custom filtering logic here
return $expiration;
}
Source Code Context
wp-includes/user.php:5002
- How this hook is used in WordPress core
<?php
4997 *
4998 * @since 4.9.6
4999 *
5000 * @param int $expiration The expiration time in seconds.
5001 */
5002 $expiration_duration = (int) apply_filters( 'user_request_key_expiration', DAY_IN_SECONDS );
5003 $expiration_time = $key_request_time + $expiration_duration;
5004
5005 if ( ! wp_verify_fast_hash( $key, $saved_key ) ) {
5006 return new WP_Error( 'invalid_key', __( 'The confirmation key is invalid for this personal data request.' ) );
5007 }
PHP Documentation
<?php
/**
* Filters the expiration time of confirm keys.
*
* @since 4.9.6
*
* @param int $expiration The expiration time in seconds.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/user.php
Related Hooks
Related hooks will be displayed here in future updates.