wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



wp_attachment_is_image › WordPress Function

Od2.1.0
Przestarzałyn/a
wp_attachment_is_image ( $post = null )
Parametry:
  • (int|WP_Post) $post Optional. Attachment ID or object. Default is global $post.
    Wymagane: Nie
    Domyślny: null
Powrót:
  • (bool) Whether the attachment is an image.
Zdefiniowane na:
Codex:
Dziennik zmian:
  • 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.


Źródło

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