函数
the_author_meta ( $field = '', $user_id = false )
- 参数
-
-
(string)
$field
Selects the field of the users record. See get_the_author_meta() for the list of possible fields.- Required: 否
- Default: (empty)
-
(int|false)
$user_id
Optional. User ID.- Required: 否
- Default: false
-
(string)
- 相关
-
- get_the_author_meta()
- 定义位置
-
-
wp-includes/author-template.php
, line 203
-
wp-includes/author-template.php
- 引入
- 2.8.0
- 弃用
- –
Outputs the field from the user’s DB object. Defaults to current post’s author.
function the_author_meta( $field = '', $user_id = false ) { $author_meta = get_the_author_meta( $field, $user_id ); /** * Filters the value of the requested user metadata. * * The filter name is dynamic and depends on the $field parameter of the function. * * @since 2.8.0 * * @param string $author_meta The value of the metadata. * @param int|false $user_id The user ID. */ echo apply_filters( "the_author_{$field}", $author_meta, $user_id ); }
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。