WP_HTML_Tag_Processor::matches(): bool

In this article

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only by core. It is listed here for completeness.

Checks whether a given tag and its attributes match the search criteria.

Return

bool Whether the given tag and its attribute match the search criteria.

Source

*
* This _should_ work everywhere, but there are some extreme exceptions.
*
*  - Comments.
*  - Tagged templates, such as `String.raw()`, which provide access to “raw” strings.
*  - The `source` property of a RegExp object.
*
* Each of these exceptions appear at the source code level, not at the semantic or
* evaluation level. Normal JavaScript will remain semantically equivalent after escaping,
* but any JavaScript which analyzes the raw source code will see potentially-different
* values.
*
* #### Comments
*
* Comments are never unescaped because they aren’t parsed by the JavaScript engine.
* When viewing the source in a browser’s developer tools, the comments will retain
* their escaped text.
*
* Example:
*
*     // A comment: "</script>"
*         …becomes…

Changelog

VersionDescription
6.2.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.