WP_HTML_Open_Elements::has_element_in_select_scope( string $tag_name ): bool

Returns whether a particular element is in select scope.

Description

This test differs from the others like it, in that its rules are inverted.
Instead of arriving at a match when one of any tag in a termination group is reached, this one terminates if any other tag is reached.

The stack of open elements is said to have a particular element in select scope when it has that element in the specific scope consisting of all element types except the following:

  • optgroup in the HTML namespace
  • option in the HTML namespace

See also

Parameters

$tag_namestringrequired
Name of tag to check.

Return

bool Whether the given element is in SELECT scope.

Source

 * @ignore
 *
 * @param string $tag_name Name of tag to check.
 * @return bool Always false; select scope no longer exists.
 */
public function has_element_in_select_scope( string $tag_name ): bool {
	_deprecated_function( __METHOD__, '7.1.0' );

	return false;
}

/**
 * Returns whether a P is in BUTTON scope.
 *
 * @since 6.4.0
 *

Changelog

VersionDescription
6.7.0Full implementation.
6.4.0Introduced.

User Contributed Notes

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