WordPress template tags comment_ Time is used to output the publishing time of the current comment, which is the same as comment_ The difference between the date() function and the comment() function is that_ Time () only outputs time by default, while comment_ The date() function only outputs dates by default.
comment_time( string $d = '' )
Function parameters
$d
String value, default value: take the date format set by WordPress background
Specifies the format of the comment date
Examples of function usage
<p>Time to comment:<?php comment_time('H:i:s'); ?></p>
Extended reading
comment_ The time() function is located in: WP includes / comment- template.php
Related tags:
- cancel_ comment_ reply_ link()
- comment_ author()
- comment_ author_ email()
- comment_ author_ email_ link()
- comment_ author_ ip()
- comment_ author_ link()
- comment_ author_ rss()
- comment_ author_ url()
- comment_ author_ url_ link()
- comment_ class()
- comment_ date()
- comment_ excerpt()
- comment_ form_ title()
- comment_ form()
- comment_ id()
- comment_ id_ fields()
- comment_ reply_ link()
- comment_ text()
- comment_ text_ rss()
- comment_ type()
- comments_ link()
- comments_ number()
- comments_ open()
- comments_ popup_ link()
- comments_ popup_ script()
- comments_ rss_ link()
- get_ avatar()
- next_ comments_ link()
- paginate_ comments_ links()
- permalink_ comments_ rss()
- previous_ comments_ link()
- wp_ list_ comments()