comment_exists

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!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: