bp_get_blog_latest_post_featured_image( string $size = 'thumbnail' )

Return the featured image of the latest post on the current blog in the loop.


Description Description


Parameters Parameters

$size

(Optional) Image version to return. 'thumbnail', 'medium', 'large', or 'post-thumbnail'. Default: 'thumbnail'.

Default value: 'thumbnail'


Top ↑

Return Return

(string) URL of the image.


Top ↑

Source Source

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

	function bp_get_blog_latest_post_featured_image( $size = 'thumbnail' ) {
		global $blogs_template;

		$retval = '';

		if ( ! empty( $blogs_template->blog->latest_post ) && ! empty( $blogs_template->blog->latest_post->images[$size] ) )
			$retval = $blogs_template->blog->latest_post->images[$size];

		/**
		 * Filters the featured image of the latest post on the current blog in the loop.
		 *
		 * @since 1.7.0
		 *
		 * @param string $retval The featured image of the latest post on the current blog in the loop.
		 */
		return apply_filters( 'bp_get_blog_latest_post_featured_image', $retval );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
1.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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