password_reset_expiration
Filter HookDescription
Filters the expiration time of password reset keys.Hook Information
File Location |
wp-includes/user.php
View on GitHub
|
Hook Type | Filter |
Line Number | 3114 |
Hook Parameters
Type | Name | Description |
---|---|---|
int
|
$expiration
|
The expiration time in seconds. |
Usage Examples
Basic Usage
<?php
// Hook into password_reset_expiration
add_filter('password_reset_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:3114
- How this hook is used in WordPress core
<?php
3109 *
3110 * @since 4.3.0
3111 *
3112 * @param int $expiration The expiration time in seconds.
3113 */
3114 $expiration_duration = apply_filters( 'password_reset_expiration', DAY_IN_SECONDS );
3115
3116 if ( str_contains( $user->user_activation_key, ':' ) ) {
3117 list( $pass_request_time, $pass_key ) = explode( ':', $user->user_activation_key, 2 );
3118 $expiration_time = $pass_request_time + $expiration_duration;
3119 } else {
PHP Documentation
<?php
/**
* Filters the expiration time of password reset keys.
*
* @since 4.3.0
*
* @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.