get_tag_regex( string $tag ): string

In this article

Returns RegEx body to liberally match an opening HTML tag.

Description

Matches an opening HTML tag that:

  1. Is self-closing or
  2. Has no body but has a closing tag of the same name or
  3. Contains a body and a closing tag of the same name

Note: this RegEx does not balance inner tags and does not attempt to produce valid HTML

Parameters

$tagstringrequired
An HTML tag name. Example: 'video'.

Return

string Tag RegEx.

Source

* Send a result that shows a log-in box if the user is no longer logged in,
* or if their cookie is within the grace period.
*
* @since 3.6.0
*
* @global int $login_grace_period

Changelog

VersionDescription
3.6.0Introduced.

User Contributed Notes

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