WPCF7_HTMLFormatter::has_parent()publicCF7 1.0

Returns true if the parent node is one of HTML elements specified by tag names.

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

Хуков нет.

Возвращает

null. Ничего.

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

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

Код WPCF7_HTMLFormatter::has_parent() CF7 5.7.3

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

	$parent = reset( $this->stacked_elements );

	if ( false === $parent ) {
		return false;
	}

	return in_array( $parent, $tag_names );
}