[wp-trac] [WordPress Trac] #25275: Checking if attachment is audio/video

WordPress Trac noreply at wordpress.org
Fri Mar 6 20:25:11 UTC 2015

#25275: Checking if attachment is audio/video
 Reporter:  danielpataki                              |       Owner:
     Type:  enhancement                               |      Status:  new
 Priority:  normal                                    |   Milestone:  4.2
Component:  Media                                     |     Version:  3.6
 Severity:  normal                                    |  Resolution:
 Keywords:  has-patch needs-testing needs-unit-tests  |     Focuses:

Comment (by wonderboymusic):

 In [changeset:"31645"]:
 #!CommitTicketReference repository="" revision="31645"
 Introduce a function, `wp_attachment_is( $type, $post = 0 )`, to collapse
 the logic for determining whether an attachment is an `image`, `audio`, or

 This is admittedly a first pass. There needs to be a generic handler for
 when any other type is passed, but for now it accepts the whitelist.

 See #25275.

Ticket URL: <https://core.trac.wordpress.org/ticket/25275#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list