wp_attachment_is_image( int|WP_Post $post = null )

Checks if the attachment is an image.

21 related functions found for: wp_attachment_is_image

Top ↑

Related terms found for this post

wp-parser-related-wordsattach, attachment, attachments, imag, image, images, post-php, post-typ, post-type, wp-attachment, wp-includes
wp-parser-packagePost, WordPress

Top ↑

Terms Used Terms Used

Terms used in the related posts query

  • attach
  • attachment
  • attachments
  • imag
  • image
  • images
  • Post
  • post-php
  • post-typ
  • post-type
  • wp-attachment
  • wp-includes
  • wp-includes/post.php
  • post

Top ↑

Description Description

Top ↑

Parameters Parameters


(int|WP_Post) (Optional) Attachment ID or object. Default is global $post.

Default value: null

Top ↑

Return Return

(bool) Whether the attachment is an image.

Top ↑

Source Source

File: wp-includes/post.php


Top ↑

Changelog Changelog

Version Description
4.2.0 Modified into wrapper for wp_attachment_is() and allowed WP_Post object to be passed.
2.1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.