diff -r 48c4eec2b7e6 -r 8c2e4d02f4ef wp/wp-includes/html-api/class-wp-html-token.php --- a/wp/wp-includes/html-api/class-wp-html-token.php Fri Sep 05 18:40:08 2025 +0200 +++ b/wp/wp-includes/html-api/class-wp-html-token.php Fri Sep 05 18:52:52 2025 +0200 @@ -61,6 +61,24 @@ public $has_self_closing_flag = false; /** + * Indicates if the element is an HTML element or if it's inside foreign content. + * + * @since 6.7.0 + * + * @var string 'html', 'svg', or 'math'. + */ + public $namespace = 'html'; + + /** + * Indicates which kind of integration point the element is, if any. + * + * @since 6.7.0 + * + * @var string|null 'math', 'html', or null if not an integration point. + */ + public $integration_node_type = null; + + /** * Called when token is garbage-collected or otherwise destroyed. * * @var callable|null @@ -72,13 +90,15 @@ * * @since 6.4.0 * - * @param string $bookmark_name Name of bookmark corresponding to location in HTML where token is found. - * @param string $node_name Name of node token represents; if uppercase, an HTML element; if lowercase, a special value like "marker". - * @param bool $has_self_closing_flag Whether the source token contains the self-closing flag, regardless of whether it's valid. - * @param callable $on_destroy Function to call when destroying token, useful for releasing the bookmark. + * @param string|null $bookmark_name Name of bookmark corresponding to location in HTML where token is found, + * or `null` for markers and nodes without a bookmark. + * @param string $node_name Name of node token represents; if uppercase, an HTML element; if lowercase, a special value like "marker". + * @param bool $has_self_closing_flag Whether the source token contains the self-closing flag, regardless of whether it's valid. + * @param callable|null $on_destroy Optional. Function to call when destroying token, useful for releasing the bookmark. */ - public function __construct( $bookmark_name, $node_name, $has_self_closing_flag, $on_destroy = null ) { + public function __construct( ?string $bookmark_name, string $node_name, bool $has_self_closing_flag, ?callable $on_destroy = null ) { $this->bookmark_name = $bookmark_name; + $this->namespace = 'html'; $this->node_name = $node_name; $this->has_self_closing_flag = $has_self_closing_flag; $this->on_destroy = $on_destroy;