the_modified_author

過濾鉤子
apply_filters( 'the_modified_author', $last_user ? $last_user->display_name : '' )
引數
  • (string) $display_name The author's display name, empty string if unknown.
    Required:
定義位置
相關勾子
the_modified_datethe_modified_timeget_the_modified_dateget_the_modified_timethe_author
相關方法
the_modified_authorget_the_modified_authorthe_modified_datethe_modified_timeget_the_modified_dateget_the_modified_time
引入
2.8.0
棄用
-

the_modified_author – 這是一個WordPress的函式,顯示最後修改文章的使用者的名字。the_modified_author函式生成一個文字字串,包含最後修改文章的使用者的名字,可以用來在文章的頁面或自定義模板中顯示這個資訊。這個資訊對於顯示誰對文章進行了修改,以及跟蹤文章的歷史非常有用。

過濾最後編輯過當前文章的作者的顯示名稱。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
return apply_filters( 'the_modified_author', $last_user ? $last_user->display_name : '' );
return apply_filters( 'the_modified_author', $last_user ? $last_user->display_name : '' );
return apply_filters( 'the_modified_author', $last_user ? $last_user->display_name : '' );

常見問題

FAQs
檢視更多 >