get_the_author_{$field}

過濾鉤子
apply_filters( "get_the_author_{$field}", $value, $user_id, $original_user_id )
引數
  • (string) $value The value of the metadata.
    Required:
  • (int) $user_id The user ID for the value.
    Required:
  • (int|false) $original_user_id The original user ID, as passed to the function.
    Required:
定義位置
相關勾子
the_author_fieldget_terms_fieldsthe_author_linkget_the_timeget_the_guid
相關方法
get_the_author_idget_the_author_emailget_the_author_yimget_the_author_icqget_the_author_aimget_the_author_url
引入
4.3.0
棄用
-

get_the_author_{$field}: 該函式為當前文章的作者檢索指定欄位的值。引數$field可以是使用者資料的任何欄位,如user_nicename、user_email、user_url等。

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

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

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
return apply_filters( "get_the_author_{$field}", $value, $user_id, $original_user_id );
return apply_filters( "get_the_author_{$field}", $value, $user_id, $original_user_id );
return apply_filters( "get_the_author_{$field}", $value, $user_id, $original_user_id );

常見問題

FAQs
檢視更多 >