Yoast\WP\SEO\Repositories

SEO_Links_Repository::find_all_by_post_id()publicYoast 1.0

Finds all SEO Links by post ID.

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

Хуков нет.

Возвращает

SEO_Links[]. The SEO Links.

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

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

Код SEO_Links_Repository::find_all_by_post_id() Yoast 22.4

public function find_all_by_post_id( $post_id ) {
	return $this->query()
		->where( 'post_id', $post_id )
		->find_many();
}