WordPress函数:the_author_meta 显示作者属性

江河/ 2023年05月01日/ WordPress/ 浏览 709

函数原型:


the_author_meta( string $field = '', int|false $user_id = false )


从用户的DB对象输出字段。默认为当前文章的作者。


the_author_meta 内部调用的函数 get_the_author_meta ,可以参考 get_the_author_meta 的简介


函数源码:


function the_author_meta( $field = '', $user_id = false ) {
	$author_meta = get_the_author_meta( $field, $user_id );

	echo apply_filters( "the_author_{$field}", $author_meta, $user_id );
}


包含钩子:


apply_filters( "the_author_{$field}", string $author_meta, int|false $user_id )


发表评论

暂无评论,抢个沙发...

客服 工单