[wp-trac] [WordPress Trac] #59698: Incorrect docs for `wp_attachment_is()`
WordPress Trac
noreply at wordpress.org
Fri Oct 20 18:41:36 UTC 2023
#59698: Incorrect docs for `wp_attachment_is()`
--------------------------+----------------------------------------
Reporter: joedolson | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.5
Component: Media | Version: 4.2
Severity: normal | Keywords: needs-patch good-first-bug
Focuses: docs |
--------------------------+----------------------------------------
The documentation for `wp_attachment_is()` states that the function
accepts only 'image', 'audio', or 'video' for the `$type` parameter, but
the default case in the switch block is a comparison of the type passed to
the file extension. The function actually accepts those three values or
any file extension.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59698>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list