[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:19:26 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 pbiron):
Replying to [comment:5 pbiron]:
> > Is there a particular reason it'd be helpful to have functions for
these, specifically?
>
> As I said, the reason is consistency...why have
`wp_attachment_is_image()` but not these others?
>
> I'd be fine with deprecating `wp_attachment_is_image()`, but if it's not
going to be deprecated then I think the others should be added.
There are currently 8 uses of `wp_attachment_is_image()` in core...so if
it does get deprecated those uses would need to be changed to
`wp_attachment_is( 'image' )`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41802#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list