Yoast\WP\SEO\Repositories
SEO_Links_Repository::delete_all_by_post_id_where_indexable_id_null()
Clears all SEO Links by post ID where the indexable id is null.
Метод класса: 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_where_indexable_id_null( $post_id );
- $post_id(int) (обязательный)
- The post ID.
Код SEO_Links_Repository::delete_all_by_post_id_where_indexable_id_null() SEO Links Repository::delete all by post id where indexable id null Yoast 24.9
public function delete_all_by_post_id_where_indexable_id_null( $post_id ) { return $this->query() ->where( 'post_id', $post_id ) ->where_null( 'indexable_id' ) ->delete_many(); }