has_post_format
has_post_format ( $format = array(), $post = null )
Parameters:- (string|string[]) format Optional. The format or formats to check. Default empty array.
- (WP_Post|int|null) post Optional. The post to check. Defaults to the current post 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.