Yoast\WP\SEO\Builders

Indexable_Hierarchy_Builder::hierarchy_is_built()protectedYoast 1.0

Checks if a hierarchy is built already for the given indexable.

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

Хуков нет.

Возвращает

true|false. True when indexable has a built hierarchy.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->hierarchy_is_built( $indexable );
$indexable(Indexable) (обязательный)
The indexable to check.

Код Indexable_Hierarchy_Builder::hierarchy_is_built() Yoast 22.4

protected function hierarchy_is_built( Indexable $indexable ) {
	if ( \in_array( $indexable->id, $this->saved_ancestors, true ) ) {
		return true;
	}

	$this->saved_ancestors[] = $indexable->id;

	return false;
}