Definition:
function get_approved_comments($post_id) {}
Retrieve the approved comments for post $post_id.
Parameters
- int $post_id: The ID of the post
Return values
returns:The approved comments
Source code
function get_approved_comments($post_id) { global $wpdb; return $wpdb->get_results($wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved = '1' ORDER BY comment_date", $post_id)); }
1142
No comments yet... Be the first to leave a reply!