Yoast\WP\SEO\Repositories

SEO_Links_Repository::delete_all_by_indexable_id()publicYoast 1.0

Clears all SEO Links by indexable ID.

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

Хуков нет.

Возвращает

true|false. Whether or not the delete was succesfull.

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

$SEO_Links_Repository = new SEO_Links_Repository();
$SEO_Links_Repository->delete_all_by_indexable_id( $indexable_id );
$indexable_id(int) (обязательный)
The indexable ID.

Код SEO_Links_Repository::delete_all_by_indexable_id() Yoast 22.4

public function delete_all_by_indexable_id( $indexable_id ) {
	return $this->query()
		->where( 'indexable_id', $indexable_id )
		->delete_many();
}