Yoast\WP\SEO\Repositories
SEO_Links_Repository::delete_all_by_post_id() public Yoast 1.0
Clears all SEO Links by post 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_post_id( $post_id );
- $post_id(число) (обязательный)
- The post ID.
Код SEO_Links_Repository::delete_all_by_post_id() SEO Links Repository::delete all by post id Yoast 16.1.1
public function delete_all_by_post_id( $post_id ) {
return $this->query()
->where( 'post_id', $post_id )
->delete_many();
}