[wp-trac] [WordPress Trac] #59698: Incorrect docs for `wp_attachment_is()`
WordPress Trac
noreply at wordpress.org
Fri Nov 17 15:45:42 UTC 2023
#59698: Incorrect docs for `wp_attachment_is()`
--------------------------------------+-------------------------
Reporter: joedolson | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.5
Component: Media | Version: 4.2
Severity: normal | Resolution: worksforme
Keywords: good-first-bug has-patch | Focuses: docs
--------------------------------------+-------------------------
Changes (by matiasrecondo77):
* status: new => closed
* resolution: => worksforme
Comment:
Replying to [ticket:59698 joedolson]:
> 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.
@joedolson i checked your pull request and in my opinion the correction is
valid.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59698#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list