the_modified_time

過濾鉤子
apply_filters( 'the_modified_time', get_the_modified_time( $format )
引數
  • (string|false) $get_the_modified_time The formatted time or false if no post is found.
    Required:
  • (string) $format Format to use for retrieving the time the post was modified. Accepts 'G', 'U', or PHP date format.
    Required:
定義位置
相關勾子
get_the_modified_timethe_modified_dateget_the_modified_datethe_modified_authorget_post_modified_time
相關方法
the_modified_timeget_the_modified_timethe_modified_dateget_the_modified_datethe_modified_authorget_post_modified_time
引入
2.0.0
棄用
-

the_modified_time – 這是一個WordPress函式,顯示一個文章最後被修改的時間。the_modified_time函式生成一個文字字串,包含一個文章最後被修改的時間,可以用來在文章的頁面或自定義模板中顯示這個資訊。這個資訊對於顯示文章的修改時間,以及跟蹤文章的歷史是很有用的。

過濾文章最後修改的本地化時間,用於顯示。

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

常見問題

FAQs
檢視更多 >