comment_time

函式
comment_time ( $format = '' )
引數
  • (string) $format Optional. PHP time format. Defaults to the 'time_format' option.
    Required:
    Default: (empty)
定義位置
相關方法
get_comment_timecomment_typecomment_datecomment_textcomment_id
引入
0.71
棄用
-

comment_time是WordPress的一個函式,用來顯示一個評論釋出的時間。它需要一個引數,即顯示時間的格式。預設的格式是’g:i a’,它以12小時的格式顯示時間(例如,下午2:30)。

顯示當前評論的評論時間。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function comment_time( $format = '' ) {
echo get_comment_time( $format );
}
function comment_time( $format = '' ) { echo get_comment_time( $format ); }
function comment_time( $format = '' ) {
	echo get_comment_time( $format );
}

常見問題

FAQs
檢視更多 >