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
898 899 900 901 902 903 904 905 906 907 908 909 910 911 | 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
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.