Yoast\WP\SEO\Builders
Indexable_Hierarchy_Builder::save_ancestors() private Yoast 1.0
Saves the ancestors.
{} Это метод класса: Indexable_Hierarchy_Builder{}
Хуков нет.
Возвращает
null.
Использование
// private - только в коде основоного (родительского) класса $result = $this->save_ancestors( $indexable );
- $indexable(Indexable) (обязательный)
- The indexable.
Код Indexable_Hierarchy_Builder::save_ancestors() Indexable Hierarchy Builder::save ancestors Yoast 15.6.2
private function save_ancestors( $indexable ) {
$depth = \count( $indexable->ancestors );
foreach ( $indexable->ancestors as $ancestor ) {
$this->indexable_hierarchy_repository->add_ancestor( $indexable->id, $ancestor->id, $depth-- );
}
}