


(string) The alt attribute for the element. (string) The title attribute for the element. (string|bool) The CSS id for the element. Note that BP uses the 'avatar' class fairly extensively in its default styling, so if you plan to pass a custom value, consider appending it to 'avatar' (eg 'avatar foo') rather than replacing it altogether. If no value is passed, BP uses the global avatar height for this avatar type. This value is used to build the 'height' attribute for the element. If no value is passed, BP uses the global avatar width for this avatar type. This value is used to build the 'width' attribute for the element. Generally, it'll only be necessary to override the default value if storing avatars in a non-default location. Remember that this string denotes a subdirectory of BP's main avatar directory (usually based on wp_upload_dir()) it's a string like 'group-avatars' rather than the full directory path. If no value is passed, 'avatar_dir' is inferred from 'object': 'user' becomes 'avatars', 'group' becomes 'group-avatars', 'blog' becomes 'blog-avatars'. (string|bool) The name of the subdirectory where the requested avatar should be found. This parameter specifies whether you'd like the 'full' or smaller 'thumb' avatar. (string) When a new avatar is uploaded to BP, 'thumb' and 'full' versions are saved.

BuddyPress natively supports three options: 'user', 'group', 'blog' a plugin may register more. (string) The kind of object for which you're getting an avatar. If no 'item_id' can be determined in this way, the function returns false. If no 'item_id' is present, the function attempts to infer an ID from the 'object' + the current context: if 'object' is 'user' and the current page is a user page, 'item_id' will default to the displayed user ID if 'group' and on a group page, to the current group ID if 'blog', to the current blog's ID. (int|bool) The numeric ID of the item for which you're requesting an avatar (eg, a user ID). This auto-detection is described more below, when discussing specific arguments. All arguments are technically optional some will, if not provided, be auto-detected by bp_core_fetch_avatar(). ( array| string) (Optional) An array of arguments. To disable Gravatar fallbacks locally: add_filter( ‘bp_core_fetch_avatar_no_grav’, ‘_return_true’ ) Parameters $args When a local avatar is not found, Gravatar is queried. This function gives precedence to locally-uploaded avatars. Supports avatars for users, groups, and blogs by default, but can be extended to support custom components as well. Code Reference Functions bp_core_fetch_avatar() bp_core_fetch_avatar( array|string $args = '' )
