wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



wp_attachment_is_image › WordPress Function

Depuis2.1.0
Dépréciéen/a
wp_attachment_is_image ( $post = null )
Paramètres:
  • (int|WP_Post) $post Optional. Attachment ID or object. Default is global $post.
    Requis: Non
    Défaut: null
Retourne:
  • (bool) Whether the attachment is an image.
Défini(e) dans:
Codex:
Changelog:
  • 4.2.0

Determines whether an attachment is an image.

For more information on this and similar theme functions, check out the {@link Conditional Tags} article in the Theme Developer Handbook.


Source

function wp_attachment_is_image( $post = null ) {
	return wp_attachment_is( 'image', $post );
}