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:

Description

Check if a post has any of the given formats, or any format.

Related Functions

set_post_format, get_post_format, _post_format_link, _post_format_request, get_post_format_link

Top Google Results

User discussions

wpseek mobile