html = $html; } /** * Gets the trusted HTML of a value. * * @since 7.2.0 * * @param mixed $value Any value. * @return string|null The HTML of the token if the value is a token whose constructor * ran, or `null` for any other value. */ public static function get_html( $value ): ?string { return $value instanceof self ? $value->html : null; } /** * Makes a token restored by unserialization inert. * * Clears the HTML, so the token never renders, and reports the unserialization * instead of throwing, so a page that cached a token keeps working. * * @since 7.2.0 */ public function __wakeup(): void { $this->html = null; _doing_it_wrong( __METHOD__, __( 'A token that marks HTML as trusted should not be unserialized. The unserialized token holds no HTML and does not render.' ), '7.2.0' ); } }