/** * Return all comments * * @see http://codex.wordpress.org/Function_Reference/get_comments */ public function getComments() { $args_comments = ['post_id' => $this->ID, 'orderby' => 'comment_date_gmt', 'status' => static::STATUS_APPROVE]; $comments = []; foreach (get_comments($args_comments, $this->ID) as $c) { $comments[] = Comment::find($c->comment_ID); } return $comments; }