Yoast\WP\SEO\Repositories
Indexable_Hierarchy_Repository::clear_ancestors() public Yoast 1.0
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(число) (обязательный)
- The indexable id.
Код Indexable_Hierarchy_Repository::clear_ancestors() Indexable Hierarchy Repository::clear ancestors Yoast 16.1.1
public function clear_ancestors( $indexable_id ) {
return $this->query()->where( 'indexable_id', $indexable_id )->delete_many();
}