the_author

過濾鉤子
apply_filters( 'the_author', is_object( $authordata )
引數
  • (string|null) $display_name The author's display name.
    Required:
定義位置
相關勾子
the_author_linkatom_authorthe_categorythe_generatorthe_editor
相關方法
the_authorthe_author_idthe_author_msnthe_author_aimthe_author_icqthe_author_yim
引入
2.9.0
棄用
-

the_author是一個模板標籤,用於顯示一個文章的作者的名字。它可以用來在網站的不同地方顯示作者的名字,例如在文章的後設資料或作者簡介部分。

過濾當前文章作者的顯示名稱。

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

常見問題

FAQs
檢視更多 >