get_approved_comments


get_approved_comments ( $post_id, $args = array() )

Parameters:
  • (int) $post_id The ID of the post.
  • (array) $args Optional. See WP_Comment_Query::__construct() for information on accepted arguments.
Returns:
  • (int|array) $comments The approved comments, or number of comments if `$count` argument is true.
Defined at:
Change Log:
  • 4: .

Description

Retrieve the approved comments for post $post_id.

Related Functions

get_comments, have_comments, get_pending_comments_num, get_page_of_comment, get_comment

Top Google Results

User discussions

wpseek mobile