WP_Recovery_Mode_Cookie_Service::clear_cookie()publicWP 5.2.0

Clears the recovery mode cookie.

Method of the class: WP_Recovery_Mode_Cookie_Service{}

No Hooks.

Return

null. Nothing (null).

Usage

$WP_Recovery_Mode_Cookie_Service = new WP_Recovery_Mode_Cookie_Service();
$WP_Recovery_Mode_Cookie_Service->clear_cookie();

Changelog

Since 5.2.0 Introduced.

WP_Recovery_Mode_Cookie_Service::clear_cookie() code WP 6.5.4

public function clear_cookie() {
	setcookie( RECOVERY_MODE_COOKIE, ' ', time() - YEAR_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN );
	setcookie( RECOVERY_MODE_COOKIE, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH, COOKIE_DOMAIN );
}