Switch language
wpseek on Twitter


A WordPress-centric search engine for devs and theme authors




get_comment_type [ ]

get_comment_type ( $comment_ID = 0 )
Parameters:
  • (int) $comment_ID ID of the comment for which to get the type. Default current comment.
Returns:
  • (string) The comment type.
Defined at:
Codex



Retrieve the comment type of the current comment.

Source

function get_comment_type( $comment_ID = 0 ) {
	$comment = get_comment( $comment_ID );
	if ( '' == $comment->comment_type )
		$comment->comment_type = 'comment';

	/**
	 * Filter the returned comment type.
	 *
	 * @since 1.5.0
	 *
	 * @param string $comment_type The type of comment, such as 'comment', 'pingback', or 'trackback'.
	 */
	return apply_filters( 'get_comment_type', $comment->comment_type );
}

Top Google Search Results

More ...

User Note(s)