wpseek.com
WordPress开发者和主题制作者的搜索引擎



the_author_meta › WordPress Function

Since2.8.0
已弃用n/a
the_author_meta ( $field = '', $user_id = false )
参数: (2)
  • (string) $field Selects the field of the users record. See get_the_author_meta() for the list of possible fields.
    Required: No
    默认: (empty)
  • (int|false) $user_id Optional. User ID. Defaults to the current post author.
    Required: No
    默认: false
查看:
定义在:
文档:

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 );
}