bp_get_the_thread_message_sender_avatar_thumb( array|string $args = '' )

Get the avatar for the current message sender.


Parameters Parameters

$args

(array|string) (Optional) Array of arguments. See bp_core_fetch_avatar() for more complete details. All arguments are optional.

  • 'type'
    (string) Avatar type. Default: 'thumb'.
  • 'width'
    (int) Avatar width. Default: default for your $type.
  • 'height'
    (int) Avatar height. Default: default for your $type.

Default value: ''


Top ↑

Return Return

(string) <img> tag containing the avatar.


Source Source

File: bp-messages/bp-messages-template.php

	function bp_get_the_thread_message_sender_avatar_thumb( $args = '' ) {
		global $thread_template;

		$r = bp_parse_args( $args, array(
			'type'   => 'thumb',
			'width'  => false,
			'height' => false,
		) );

		/**
		 * Filters the avatar for the current message sender.
		 *
		 * @since 1.1.0
		 * @since 2.6.0 Added the `$r` parameter.
		 *
		 * @param string $value <img> tag containing the avatar value.
		 * @param array  $r     Array of parsed arguments.
		 */
		return apply_filters( 'bp_get_the_thread_message_sender_avatar_thumb', bp_core_fetch_avatar( array(
			'item_id' => $thread_template->message->sender_id,
			'type'    => $r['type'],
			'width'   => $r['width'],
			'height'  => $r['height'],
			'alt'     => bp_core_get_user_displayname( $thread_template->message->sender_id )
		) ), $r );
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.