WordPress at a glance
function is not described

WP_Recovery_Mode::handle_exit_recovery_mode() public WP 5.2.0

Handles a request to exit Recovery Mode.

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

No Hooks.

Return

Null. Nothing.

Usage

$WP_Recovery_Mode = new WP_Recovery_Mode();
$WP_Recovery_Mode->handle_exit_recovery_mode();

Changelog

Since 5.2.0 Introduced.

Code of WP_Recovery_Mode::handle_exit_recovery_mode() WP 5.5.1

<?php
public function handle_exit_recovery_mode() {
	$redirect_to = wp_get_referer();

	// Safety check in case referrer returns false.
	if ( ! $redirect_to ) {
		$redirect_to = is_user_logged_in() ? admin_url() : home_url();
	}

	if ( ! $this->is_active() ) {
		wp_safe_redirect( $redirect_to );
		die;
	}

	if ( ! isset( $_GET['action'] ) || self::EXIT_ACTION !== $_GET['action'] ) {
		return;
	}

	if ( ! isset( $_GET['_wpnonce'] ) || ! wp_verify_nonce( $_GET['_wpnonce'], self::EXIT_ACTION ) ) {
		wp_die( __( 'Exit recovery mode link expired.' ), 403 );
	}

	if ( ! $this->exit_recovery_mode() ) {
		wp_die( __( 'Failed to exit recovery mode. Please try again later.' ) );
	}

	wp_safe_redirect( $redirect_to );
	die;
}