WP_Theme::__wakeup()publicWP 1.0

Perform reinitialization tasks.

Prevents a callback from being injected during unserialization of an object.

Метод класса: WP_Theme{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$WP_Theme = new WP_Theme();
$WP_Theme->__wakeup();

Код WP_Theme::__wakeup() WP 6.6.2

public function __wakeup() {
	if ( $this->parent && ! $this->parent instanceof self ) {
		throw new UnexpectedValueException();
	}
	if ( $this->headers && ! is_array( $this->headers ) ) {
		throw new UnexpectedValueException();
	}
	foreach ( $this->headers as $value ) {
		if ( ! is_string( $value ) ) {
			throw new UnexpectedValueException();
		}
	}
	$this->headers_sanitized = array();
}