| [ Index ] |
PHP Cross Reference of WordPress |
[Source view] [Print] [Project Stats]
Error Protection API: WP_Recovery_Mode_Key_Service class
| File Size: | 183 lines (4 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 1 file wp-includes/class-phpass.php |
| generate_recovery_mode_token() X-Ref |
| Creates a recovery mode token. return: string A random string to identify its associated key in storage. since: 5.2.0 |
| generate_and_store_recovery_mode_key( $token ) X-Ref |
| Creates a recovery mode key. return: string Recovery mode key. since: 5.2.0 param: string $token A token generated by {@see generate_recovery_mode_token()}. |
| validate_recovery_mode_key( $token, $key, $ttl ) X-Ref |
| Verifies if the recovery mode key is correct. Recovery mode keys can only be used once; the key will be consumed in the process. return: true|WP_Error True on success, error object on failure. since: 5.2.0 param: string $token The token used when generating the given key. param: string $key The unhashed key. param: int $ttl Time in seconds for the key to be valid for. |
| clean_expired_keys( $ttl ) X-Ref |
| Removes expired recovery mode keys. since: 5.2.0 param: int $ttl Time in seconds for the keys to be valid for. |
| remove_key( $token ) X-Ref |
| Removes a used recovery key. since: 5.2.0 param: string $token The token used when generating a recovery mode key. |
| get_keys() X-Ref |
| Gets the recovery key records. return: array Associative array of $token => $data pairs, where $data has keys 'hashed_key' since: 5.2.0 |
| update_keys( array $keys ) X-Ref |
| Updates the recovery key records. return: bool True on success, false on failure. since: 5.2.0 param: array $keys Associative array of $token => $data pairs, where $data has keys 'hashed_key' |
| Generated: Sat Nov 8 01:00:02 2025 | Cross-referenced by PHPXref 0.7.1 |