From c02959555f8d819ae8fe028ecfc7e36a21a1f3a2 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Thu, 29 Oct 2026 08:21:07 +0400 Subject: [PATCH] Remove redundant after_tag() parse_next_tag() is called in exactly 1 place, and it a few lines earlier `after_tag()` is called. after_tag() does some significant processing, so removing the redundant call has an impact on parsing speed --- src/wp-includes/html-api/class-wp-html-tag-processor.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/wp-includes/html-api/class-wp-html-tag-processor.php b/src/wp-includes/html-api/class-wp-html-tag-processor.php index c39368e9a40c1..7ae805ecbfd96 100644 --- a/src/wp-includes/html-api/class-wp-html-tag-processor.php +++ b/src/wp-includes/html-api/class-wp-html-tag-processor.php @@ -1720,8 +1720,6 @@ private function skip_script_data(): bool { * @phpstan-impure */ private function parse_next_tag(): bool { - $this->after_tag(); - $html = $this->html; $doc_length = strlen( $html ); $was_at = $this->bytes_already_parsed;