wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



wp_attachment_is_image › WordPress Function

Desde2.1.0
Obsoleton/a
wp_attachment_is_image ( $post = null )
Parâmetros:
  • (int|WP_Post) $post Optional. Attachment ID or object. Default is global $post.
    Required: No
    Padrão: null
Retorna:
  • (bool) Whether the attachment is an image.
Definido em:
Codex:
Log de mudanças:
  • 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.


Fonte

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