bp_blog_latest_post_has_featured_image( string $thumbnail = 'thumbnail' )

Does the latest blog post have a featured image?

Description

Parameters

$thumbnail

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

Default value: 'thumbnail'

Return

(bool) True if the latest blog post from the current blog has a featured image of the given size.

Source

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

function bp_blog_latest_post_has_featured_image( $thumbnail = 'thumbnail' ) {
	$image  = bp_get_blog_latest_post_featured_image( $thumbnail );

	/**
	 * Filters whether or not the latest blog post has a featured image.
	 *
	 * @since BuddyPress 1.7.0
	 *
	 * @param bool   $value     Whether or not the latest blog post has a featured image.
	 * @param string $thumbnail Image version to return.
	 * @param string $image     Returned value from bp_get_blog_latest_post_featured_image.
	 */
	return apply_filters( 'bp_blog_latest_post_has_featured_image', ! empty( $image ), $thumbnail, $image );
}

Changelog

Changelog
Version Description
BuddyPress 1.7.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.