bp_blog_latest_post_has_featured_image( string $thumbnail = 'thumbnail' )

Does the latest blog post have a featured image?


Parameters Parameters

$thumbnail

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

Default value: 'thumbnail'


Top ↑

Return Return

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


Source 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 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 );
}


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.