Opened 9 months ago

Closed 9 months ago

Last modified 9 months ago

#21594 closed defect (bug) (fixed)

Allow fetching unfiltered allowed mime types list

Reported by: ryan Owned by: ryan
Priority: normal Milestone: 3.5
Component: General Version: 3.4.1
Severity: normal Keywords:
Cc:

Description

In #11668, do_enclose() gained mime type checking. It uses get_allowed_mime_types(). However, multisite installs greatly restrict the mime list when they run check_upload_mimes() on the upload_mimes filter. do_enclose() needs access to the full list. Introducing get_mime_types() and making get_allowed_mime_types() a wrapper could accommodate this.

Attachments (2)

21594.diff (8.8 KB) - added by ryan 9 months ago.
21594-ut.diff (1.8 KB) - added by ryan 9 months ago.

Download all attachments as: .zip

Change History (5)

While in here we can also address #21299.

ryan9 months ago

ryan9 months ago

  • Owner set to ryan
  • Resolution set to fixed
  • Status changed from new to closed

In [21541]:

Introduce wp_get_mime_types() for fetching the complete list of mime types. Remove the static caching of the types so that filters other than the first filter work. Use wp_get_mime_types() in do_enclose(). fixes #21299 #21594

Note: See TracTickets for help on using tickets.