Yoast\WP\SEO\Bulk_Editor\Application\Posts
Posts_Repository::get_posts
Returns a page of posts for the given query.
Reads from the indexable table when indexables are active, and falls back to post meta otherwise.
Метод класса: Posts_Repository{}
Хуков нет.
Возвращает
Posts_Page. The posts together with the totals for pagination.
Использование
$Posts_Repository = new Posts_Repository(); $Posts_Repository->get_posts( $query ): Posts_Page;
- $query(Posts_Query) (обязательный)
- The query describing the page to get.
Код Posts_Repository::get_posts() Posts Repository::get posts Yoast 28.3
public function get_posts( Posts_Query $query ): Posts_Page {
if ( $this->indexable_helper->should_index_indexables() ) {
return $this->indexable_posts_collector->get_posts( $query );
}
return $this->post_meta_posts_collector->get_posts( $query );
}