apply_filters( 'the_time', get_the_time( $format )
引數
  • (string) $get_the_time The formatted time.
    Required:
  • (string) $format Format to use for retrieving the time the post was written. Accepts 'G', 'U', or PHP date format.
    Required:
定義位置
相關勾子
the_titleget_the_timethe_datethe_sitesthe_title_rss
相關方法
the_timethe_titleget_the_timetouch_timethe_datethe_meta
引入
0.71
棄用
-

the_time – 這是一個WordPress模板標籤,它以格式化的方式顯示一個文章、頁面或自定義文章型別的日期和時間。它需要一個可選的格式引數,用來格式化顯示的日期和時間。預設情況下,格式是由WordPress管理區的”日期格式”設定決定的。

篩選出一個文章的顯示時間。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
echo apply_filters( 'the_time', get_the_time( $format ), $format );
echo apply_filters( 'the_time', get_the_time( $format ), $format );
echo apply_filters( 'the_time', get_the_time( $format ), $format );

常見問題

FAQs
檢視更多 >