On this page
WP_Recovery_Mode_Key_Service::remove_key( string $token )
This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
Removes a used recovery key.
Parameters
$tokenstring Required-
The token used when generating a recovery mode key.
Source
File: wp-includes/class-wp-recovery-mode-key-service.php. View all references
private function remove_key( $token ) {
$records = $this->get_keys();
if ( ! isset( $records[ $token ] ) ) {
return;
}
unset( $records[ $token ] );
$this->update_keys( $records );
}
Related
Uses
| Uses | Description |
|---|---|
| WP_Recovery_Mode_Key_Service::get_keys() wp-includes/class-wp-recovery-mode-key-service.php | Gets the recovery key records. |
| WP_Recovery_Mode_Key_Service::update_keys() wp-includes/class-wp-recovery-mode-key-service.php | Updates the recovery key records. |
Used By
| Used By | Description |
|---|---|
| WP_Recovery_Mode_Key_Service::validate_recovery_mode_key() wp-includes/class-wp-recovery-mode-key-service.php | Verifies if the recovery mode key is correct. |
Changelog
| Version | Description |
|---|---|
| 5.2.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_recovery_mode_key_service/remove_key