has_post_format
has_post_format ( $format = array(), $post = null )
Parameters:- (string|array) $format Optional. The format or formats to check.
- (object|int|null) $post Optional. The post to check. If not supplied, defaults to the current post if used in the loop.
Returns:- (bool) True if the post has any of the given formats (or any format, if no format specified), false otherwise.
Defined at: - Introduced in WordPress: 3.1.0
- Deprecated in WordPress: —
Description
Check if a post has any of the given formats, or any format.