Skip to content

Commit

Permalink
Merge pull request #30 from VincentVazeille/master
Browse files Browse the repository at this point in the history
add params status comment
  • Loading branch information
juliens committed Dec 30, 2015
2 parents eb8949f + 24e4237 commit ea045a6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

0 comments on commit ea045a6

Please sign in to comment.