Yoast\WP\SEO\Repositories
Indexable_Hierarchy_Repository::clear_ancestors()
Removes all ancestors for an indexable.
Метод класса: Indexable_Hierarchy_Repository{}
Хуков нет.
Возвращает
true|false
. Whether or not the indexables were successfully deleted.
Использование
$Indexable_Hierarchy_Repository = new Indexable_Hierarchy_Repository(); $Indexable_Hierarchy_Repository->clear_ancestors( $indexable_id );
- $indexable_id(int) (обязательный)
- The indexable id.
Код Indexable_Hierarchy_Repository::clear_ancestors() Indexable Hierarchy Repository::clear ancestors Yoast 24.4
public function clear_ancestors( $indexable_id ) { return $this->query()->where( 'indexable_id', $indexable_id )->delete_many(); }