[wp-trac] [WordPress Trac] #41802: add wp_attachment_is_audio() and wp_attachment_is_video()

WordPress Trac noreply at wordpress.org
Thu Aug 16 21:01:24 UTC 2018


#41802: add wp_attachment_is_audio() and wp_attachment_is_video()
-------------------------+------------------------------
 Reporter:  pbiron       |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Media        |     Version:  4.9
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:
-------------------------+------------------------------

Comment (by mikeschroder):

 I personally prefer the generic nature of `wp_attachment_is()` (it looks
 like this was an intentional move) to having a separate function each of
 many eventual file types.

 Is there a particular reason it'd be helpful to have functions for these,
 specifically?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/41802#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list