public function get_posts($return_collection = false) { if (isset($this->_query->posts)) { $posts = new PostCollection($this->_query->posts, $this->_posts_class); return $return_collection ? $posts : $posts->get_posts(); } }