WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #30788, comment 5


Ignore:
Timestamp:
12/30/2014 05:42:10 PM (5 years ago)
Author:
mdgl
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #30788, comment 5

    initial v1  
    1 Patch uploaded which allows `wp_match_mime_types()` to deal with an array of comma-separated MIME types (effectively a double nesting issue). This appears to fix this problem but the code here is quite convoluted and I would like a second opinion on this solution. It is also unclear to me why the original code added a third regular expression to match the main MIME type pattern un-anchored, so I have removed this.
     1Patch uploaded which allows `wp_match_mime_types()` to deal with an array of comma-separated MIME types (effectively a double nesting issue). This appears to fix the problem but the code here is quite convoluted and I would like a second opinion on the appropriateness of this solution. It is also unclear to me why the original code added a third regular expression to match the main MIME type pattern un-anchored, so I have removed this.
    22
    33Also, because the screen filter selection value may now include a comma, I had to revert to the original solution presented in #30123, namely using `esc_attr()` rather than `sanitize_mime_type()` when preparing links for the filter dropdown. This seems more correct in any case.