get_query_args([ 'post_type' => $query['postType'] ?? 'post', 'posts_per_page' => $query['postsPerPage'] ?? 6, 'orderby' => $query['orderby'] ?? 'date', 'order' => $query['order'] ?? 'desc', 'category_ids' => $query['categoryIds'] ?? [], ]); return $this->ensure_minimum_posts(get_posts($args)); } /** * Pad a custom item list to the minimum needed for a seamless loop. * * @param array $items * @return array */ public function pad_items(array $items) { return $this->ensure_minimum_posts($items); } /** * Resolve the public URL for a post, honoring custom URLs. * * @param \WP_Post $post * @return string */ public function url($post) { return $this->get_post_url($post); } }