the_author_{$field}

過濾鉤子
apply_filters( "the_author_{$field}", $author_meta, $user_id )
引數
  • (string) $author_meta The value of the metadata.
    Required:
  • (int|false) $user_id The user ID.
    Required:
定義位置
相關勾子
get_the_author_fieldthe_author_linkthe_authorthe_author_posts_linkauthor_email
相關方法
the_author_idthe_author_emailthe_author_aimthe_author_urlthe_author_yimthe_author_icq
引入
2.8.0
棄用
-

the_author_{$field}是一個模板標籤,允許你從作者的個人資料中顯示一個特定的欄位,其中$field是你想顯示的欄位的名稱。例如,the_author_email將顯示作者的電子郵件地址。

過濾所請求的使用者後設資料的值。

過濾器的名稱是動態的,取決於該函式的$field引數。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
echo apply_filters( "the_author_{$field}", $author_meta, $user_id );
echo apply_filters( "the_author_{$field}", $author_meta, $user_id );
echo apply_filters( "the_author_{$field}", $author_meta, $user_id );

常見問題

FAQs
檢視更多 >