diff --git a/sources/sf2/Generic/WordpressBundle/Repository/WordpressCommentRepository.php b/sources/sf2/Generic/WordpressBundle/Repository/WordpressCommentRepository.php index cce028a..95b4e5b 100644 --- a/sources/sf2/Generic/WordpressBundle/Repository/WordpressCommentRepository.php +++ b/sources/sf2/Generic/WordpressBundle/Repository/WordpressCommentRepository.php @@ -15,10 +15,10 @@ public function __construct($wordpress_loader) $this->wordpress_loader->load(); } - public function findByPostId($post_id) + public function findByPostId($post_id, $status = 'approve') { $query = new \WP_Comment_Query; - return $query->query(array('post_id' => $post_id)); + return $query->query(array('post_id' => $post_id, 'status' => $status)); } }