WPCF7_HTMLFormatter::is_inside()publicCF7 1.0

Returns true if it is currently inside one of HTML elements specified by tag names.

Метод класса: WPCF7_HTMLFormatter{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$WPCF7_HTMLFormatter = new WPCF7_HTMLFormatter();
$WPCF7_HTMLFormatter->is_inside( $tag_names );
$tag_names(строка|массив) (обязательный)
A tag name or an array of tag names.

Код WPCF7_HTMLFormatter::is_inside() CF7 5.9.3

public function is_inside( $tag_names ) {
	$tag_names = (array) $tag_names;

	foreach ( $this->stacked_elements as $element ) {
		if ( in_array( $element, $tag_names ) ) {
			return true;
		}
	}

	return false;
}