/** * Does the latest blog post have a featured image? * * @since BuddyPress (1.7.0) * * @param string $thumbnail Image version to return. 'thumbnail', 'medium', 'large', * or 'post-thumbnail'. Default: 'thumbnail'. * * @return bool True if the latest blog post from the current blog has a * featured image of the given size. */ 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); }
/** * Does the latest blog post have a featured image? * * @since BuddyPress (1.7.0) * * @param string $size Image version to return. 'thumbnail', 'medium', 'large', * or 'post-thumbnail'. Default: 'thumbnail'. * @return bool True if the latest blog post from the current blog has a * featured image of the given size. */ function bp_blog_latest_post_has_featured_image($thumbnail = 'thumbnail') { $image = bp_get_blog_latest_post_featured_image($thumbnail); return apply_filters('bp_blog_latest_post_has_featured_image', !empty($image), $thumbnail, $image); }