wp-includes/class-wp-recovery-mode-key-service.php:45Creates a recovery mode key.
$tokenstringstringOne hook fires while WP_Recovery_Mode_Key_Service::generate_and_store_recovery_mode_key() runs, in this order:
Fires when a recovery mode key is generated.
public function generate_and_store_recovery_mode_key( $token ) { $key = wp_generate_password( 22, false ); $records = $this->get_keys(); $records[ $token ] = array( 'hashed_key' => wp_fast_hash( $key ), 'created_at' => time(), ); $this->update_keys( $records ); /** * Fires when a recovery mode key is generated. * * @since 5.2.0 * * @param string $token The recovery data token. * @param string $key The recovery mode key. */ do_action( 'generate_recovery_mode_key', $token, $key ); return $key; }Introduced in 5.2.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/class-wp-recovery-mode-key-service.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.