WordPress at a glance
function is not described

WP_Recovery_Mode::handle_cookie() protected WP 5.2.0

Handles checking for the recovery mode cookie and validating it.

{} It's a method of the class: WP_Recovery_Mode{}

No Hooks.

Return

Null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->handle_cookie();

Changelog

Since 5.2.0 Introduced.

Code of WP_Recovery_Mode::handle_cookie() WP 5.5.1

<?php
protected function handle_cookie() {
	$validated = $this->cookie_service->validate_cookie();

	if ( is_wp_error( $validated ) ) {
		$this->cookie_service->clear_cookie();

		$validated->add_data( array( 'status' => 403 ) );
		wp_die( $validated );
	}

	$session_id = $this->cookie_service->get_session_id_from_cookie();
	if ( is_wp_error( $session_id ) ) {
		$this->cookie_service->clear_cookie();

		$session_id->add_data( array( 'status' => 403 ) );
		wp_die( $session_id );
	}

	$this->is_active  = true;
	$this->session_id = $session_id;
}