Definition:
function comment_exists($comment_author, $comment_date) {}
Parameters
- string $comment_author: Author of the comment
- string $comment_date: Date of the comment
Return values
returns:Comment ID on success.
Source code
function comment_exists($comment_author, $comment_date) { global $wpdb; $comment_author = stripslashes($comment_author); $comment_date = stripslashes($comment_date); return $wpdb->get_var( $wpdb->prepare("SELECT comment_post_ID FROM $wpdb->comments WHERE comment_author = %s AND comment_date = %s", $comment_author, $comment_date) ); }
683
No comments yet... Be the first to leave a reply!