Gravatar Wordpress



Gravatar is a part of the WordPress.com network. If you have registered for an account on WordPress.com, you will also have a Gravatar account, and can log in to Gravatar at any time using your WordPress.com credentials. If you don't yet have a WordPress.com account, you'll. Gravatar 'APIs' require no authentication, and are all based around simple HTTP GET requests. Use the links below to find out more about constructing request.

  1. Gravatar Wordpress Disable
  2. Gravatar Wordpress Plugin
  3. Gravatar Wordpress

If you have a Gravatar account, it’s actually also a WordPress.com account. You can use those details to log into WordPress.com, then grant access to Gravatar. If you already have a WordPress.com account, then you can use that to log into Gravatar.com now. Integrated into WordPress, Gravatars are an avatar or gravatar is an icon, or representation, of a user in a shared virtual reality, such as a forum, chat, website, or any other form of online community in which the user (s) wish to have something to distinguish themselves from other users.

Retrieve the avatar <img> tag for a user, email address, MD5 hash, comment, or post.

Contents

  • Related

Parameters Parameters

$id_or_email

Gravatar Wordpress Disable

(mixed)(Required)The Gravatar to retrieve. Accepts a user_id, gravatar md5 hash, user email, WP_User object, WP_Post object, or WP_Comment object.

$size

(int)(Optional) Height and width of the avatar image file in pixels.

Default value: 96

$default

(string)(Optional) URL for the default image or a default type. Accepts '404' (return a 404 instead of a default image), 'retro' (8bit), 'monsterid' (monster), 'wavatar' (cartoon face), 'indenticon' (the 'quilt'), 'mystery', 'mm', or 'mysteryman' (The Oyster Man), 'blank' (transparent GIF), or 'gravatar_default' (the Gravatar logo). Default is the value of the 'avatar_default' option, with a fallback of 'mystery'.

Default value: '

$alt

(string)(Optional) Alternative text to use in img tag.

Default value: '

$args

(array)(Optional)Extra arguments to retrieve the avatar.

  • 'height'
    (int) Display height of the avatar in pixels. Defaults to $size.
  • 'width'
    (int) Display width of the avatar in pixels. Defaults to $size.
  • 'force_default'
    (bool) Whether to always show the default image, never the Gravatar. Default false.
  • 'rating'
    (string) What rating to display avatars up to. Accepts 'G', 'PG', 'R', 'X', and are judged in that order. Default is the value of the 'avatar_rating' option.
  • 'scheme'
    (string) URL scheme to use. See set_url_scheme() for accepted values.
  • 'class'
    (array|string) Array or string of additional classes to add to the img element.
  • 'force_display'
    (bool) Whether to always show the avatar
    • ignores the show_avatars option. Default false.
  • 'loading'
    (string) Value for the loading attribute.
  • 'extra_attr'
    (string) HTML attributes to insert in the IMG element. Is not sanitized. Default empty.

Default value: null

Gravatar

Return Return

(string|false)<img> tag for the user's avatar. False on failure.

Source Source

Gravatar Wordpress Plugin

File: wp-includes/pluggable.php

View on Trac

Gravatar Wordpress

Related Related

Uses Uses

Uses
UsesDescription
wp-includes/media.php:wp_lazy_loading_enabled()

Determines whether to add the loading attribute to the specified tag in the specified context.

wp-includes/link-template.php:get_avatar_url()

Retrieves the avatar URL.

wp-includes/link-template.php:get_avatar_data()

Retrieves default data about the avatar.

wp-includes/pluggable.php:pre_get_avatar

Allows the HTML for a user’s avatar to be returned early.

wp-includes/formatting.php:esc_attr()

Escaping for HTML attributes.

wp-includes/formatting.php:esc_url()

Checks and cleans a URL.

wp-includes/pluggable.php:get_avatar

Filters the HTML for a user’s avatar.

wp-includes/functions.php:wp_parse_args()

Merges user defined arguments into defaults array.

wp-includes/plugin.php:apply_filters()

Calls the callback functions that have been added to a filter hook.

wp-includes/option.php:get_option()

Retrieves an option value based on an option name.

wp-includes/comment.php:get_comment()

Retrieves comment data given a comment ID or comment object.

wp-includes/load.php:is_wp_error()

Checks whether the given variable is a WordPress Error.

Change wordpress gravatarShow 7 more usesHide more uses