From 8c930a7935e1737ed2f79899492e2fd53a7dce7d Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 22 Jun 2026 23:35:55 +0200 Subject: [PATCH 1/2] Discourage WP_HTML_Processor::step() public usage --- src/wp-includes/html-api/class-wp-html-processor.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/html-api/class-wp-html-processor.php b/src/wp-includes/html-api/class-wp-html-processor.php index 967d616129647..e36fe590cbae7 100644 --- a/src/wp-includes/html-api/class-wp-html-processor.php +++ b/src/wp-includes/html-api/class-wp-html-processor.php @@ -997,7 +997,9 @@ public function expects_closer( ?WP_HTML_Token $node = null ): ?bool { } /** - * Steps through the HTML document and stop at the next tag, if any. + * For internal usage. Use {@see WP_HTML_Processor::next_tag()} or {@see WP_HTML_Processor::next_token()}. + * + * Steps through the HTML document and stop at the next node, if any. * * @since 6.4.0 * From d5559e1866de4acf76ccdc608322f11bfb95ee8e Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Thu, 25 Jun 2026 14:13:37 +0200 Subject: [PATCH 2/2] HTML API: Mark WP_HTML_Processor::step() private. --- src/wp-includes/html-api/class-wp-html-processor.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wp-includes/html-api/class-wp-html-processor.php b/src/wp-includes/html-api/class-wp-html-processor.php index b22318363b177..7f511cdb1906e 100644 --- a/src/wp-includes/html-api/class-wp-html-processor.php +++ b/src/wp-includes/html-api/class-wp-html-processor.php @@ -1003,6 +1003,8 @@ public function expects_closer( ?WP_HTML_Token $node = null ): ?bool { * * @since 6.4.0 * + * @access private + * * @throws Exception When unable to allocate a bookmark for the next token in the input HTML document. * * @see self::PROCESS_NEXT_NODE