Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#21594 closed defect (bug) (fixed)

Allow fetching unfiltered allowed mime types list

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


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 3 years ago.
21594-ut.diff (1.8 KB) - added by ryan 3 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 @ryan3 years ago

While in here we can also address #21299.

@ryan3 years ago

@ryan3 years ago

comment:2 @ryan3 years 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.