wp-includes/html-api/class-wp-html-tag-processor.php:5036Checks whether a given tag and its attributes match the search criteria.
bool private function matches(): bool { if ( $this->is_closing_tag && ! $this->stop_on_tag_closers ) { return false; } // Does the tag name match the requested tag name in a case-insensitive manner? if ( isset( $this->sought_tag_name ) ) { $tag_name = $this->get_tag(); if ( strlen( $this->sought_tag_name ) !== strlen( $tag_name ) || 0 !== substr_compare( $tag_name, $this->sought_tag_name, 0, null, true ) ) { return false; } } if ( null !== $this->sought_class_name && ! $this->has_class( $this->sought_class_name ) ) { return false; } return true; }Introduced in 6.2.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/html-api/class-wp-html-tag-processor.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.