get_comment_time

過濾鉤子
apply_filters( 'get_comment_time', $date, $format, $gmt, $translate, $comment )
引數
  • (string|int) $date The comment time, formatted as a date string or Unix timestamp.
    Required:
  • (string) $format PHP date format.
    Required:
  • (bool) $gmt Whether the GMT date is in use.
    Required:
  • (bool) $translate Whether the time is translated.
    Required:
  • (WP_Comment) $comment The comment object.
    Required:
定義位置
相關勾子
get_comment_textget_comment_typeget_comment_dateget_comment_idget_comment_link
相關方法
get_comment_timeget_comment_metaget_comment_dateget_comment_textget_comment_typeget_comment_id
引入
1.5.0
棄用
-

get_comment_time 函式返回評論的建立或最後修改的時間。它需要兩個引數:一個時間的格式字串和一個評論物件。它返回給定評論的指定格式的時間。

過濾返回的註釋時間。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
return apply_filters( 'get_comment_time', $date, $format, $gmt, $translate, $comment );
return apply_filters( 'get_comment_time', $date, $format, $gmt, $translate, $comment );
return apply_filters( 'get_comment_time', $date, $format, $gmt, $translate, $comment );

常見問題

FAQs
檢視更多 >