WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/get comment type

This page is marked as incomplete. You can help Codex by expanding it.

Description

Retrieve the comment type of the current comment.

Use comment_type() to display the value.

Usage

<?php get_comment_type$comment_ID ); ?>

Parameters

$comment_ID
(integer) (optional) The ID of the comment for which to get the type.
Default: 0 (the current comment)

Return Values

(string) 
The type of comment, such as 'comment', 'pingback', or 'trackback'.

Examples

Notes

Change Log

Since: 1.5.0

Source File

get_comment_type() is located in wp-includes/comment-template.php

Related