comment_type()
Displays the name of the comment type. The names can be arbitrary.
Comments in WordPress are divided into types: regular comment, Trackback, or Pingback.
If you do not need to display data, use the function get_comment_type().
Uses: get_comment_type()
No Hooks.
Returns
null.
Usage
<?php comment_type($comment, $trackback, $pingback); ?>
- $comment(string)
- The name that will be displayed on the screen if it is a regular comment.
Default: 'Comment' - $trackback(string)
- The name that will be displayed on the screen if it is a trackback.
Default: 'Trackback' - $pingback(string)
- The name that will be displayed on the screen if it is a ping.
Default: 'pingback'
Examples
#1 A simple example of how use the function
<p><?php comment_type(); ?> to the posts: <?php the_title(); ?> </p>
Changelog
| Since 0.71 | Introduced. |