WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Купить персональные IPV4 и IPV6 прокси
функция не описана

Requests_Cookie::is_expired() WP 1.0

Check if a cookie is expired.

Checks the age against $this->reference_time to determine if the cookie is expired.

Это метод класса: Requests_Cookie

Хуков нет.


true/false. True if expired, false if time is valid.


$Requests_Cookie = new Requests_Cookie();
$var = $Requests_Cookie->is_expired();

Код Requests Cookie::is expired: wp-includes/Requests/Cookie.php WP 5.2.2

public function is_expired() {
	// RFC6265, s.
	// If a cookie has both the Max-Age and the Expires attribute, the Max-
	// Age attribute has precedence and controls the expiration date of the
	// cookie.
	if (isset($this->attributes['max-age'])) {
		$max_age = $this->attributes['max-age'];
		return $max_age < $this->reference_time;

	if (isset($this->attributes['expires'])) {
		$expires = $this->attributes['expires'];
		return $expires < $this->reference_time;

	return false;