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

comment_excerpt

Definition:
function comment_excerpt( $comment_ID = 0 ) {}

Display the excerpt of the current comment.

Parameters

  • int $comment_ID: The ID of the comment for which to print the excerpt. Optional.

Defined filters

  • comment_excerpt
    apply_filters('comment_excerpt', get_comment_excerpt($comment_ID)

Source code

function comment_excerpt( $comment_ID = 0 ) {

	echo apply_filters('comment_excerpt', get_comment_excerpt($comment_ID) );

}

681

comment_date

Definition:
function comment_date( $d = '', $comment_ID = 0 ) {}

Display the comment date of the current comment.

Parameters

  • string $d: The format of the date (defaults to user’s config)
  • int $comment_ID: The ID of the comment for which to print the date. Optional.

Source code

function comment_date( $d = '', $comment_ID = 0 ) {

	echo get_comment_date( $d, $comment_ID );

}

679

comment_class

Definition:
function comment_class( $class = '', $comment_id = null, $post_id = null, $echo = true ) {}

Generates semantic classes for each comment element

Parameters

  • string|array $class: One or more classes to add to the class list
  • int $comment_id: An optional comment ID
  • int $post_id: An optional post ID
  • bool $echo: Whether comment_class should echo or return

Source code

function comment_class( $class = '', $comment_id = null, $post_id = null, $echo = true ) {

	// Separates classes with a single space, collates classes for comment DIV

	$class = 'class="' . join( ' ', get_comment_class( $class, $comment_id, $post_id ) ) . '"';

	if ( $echo)

		echo $class;

	else

		return $class;

}

677

comment_author_url_link

Definition:
function comment_author_url_link( $linktext = '', $before = '', $after = '' ) {}

Displays the HTML link of the url of the author of the current comment.

Parameters

  • string $linktext: The text to display instead of the comment author’s email address
  • string $before: The text or HTML to display before the email link.
  • string $after: The text or HTML to display after the email link.

Source code

function comment_author_url_link( $linktext = '', $before = '', $after = '' ) {

	echo get_comment_author_url_link( $linktext, $before, $after );

}

675