WP_Recovery_Mode_Link_Service::generate_url()publicWP 5.2.0

Generates a URL to begin recovery mode.

Only one recovery mode URL can may be valid at the same time.

Method of the class: WP_Recovery_Mode_Link_Service{}

No Hooks.

Return

String. Generated URL.

Usage

$WP_Recovery_Mode_Link_Service = new WP_Recovery_Mode_Link_Service();
$WP_Recovery_Mode_Link_Service->generate_url();

Changelog

Since 5.2.0 Introduced.

WP_Recovery_Mode_Link_Service::generate_url() code WP 6.1.1

public function generate_url() {
	$token = $this->key_service->generate_recovery_mode_token();
	$key   = $this->key_service->generate_and_store_recovery_mode_key( $token );

	return $this->get_recovery_mode_begin_url( $token, $key );
}