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



get_avatar_url ›

Since4.2.0
已弃用n/a
get_avatar_url ( $id_or_email, $args = null )
参数: (2)
  • (mixed) $id_or_email The Gravatar to retrieve a URL for. Accepts a user_id, gravatar md5 hash, user email, WP_User object, WP_Post object, or WP_Comment object.
    Required: Yes
  • (array) $args { Optional. Arguments to return instead of the default arguments.
    Required: No
    默认: null
返回:
  • (false|string) The URL of the avatar we found, or false if we couldn't find an avatar.
定义在:
文档:

Retrieves the avatar URL.



源码

function get_avatar_url( $id_or_email, $args = null ) {
	$args = get_avatar_data( $id_or_email, $args );
	return $args['url'];
}