Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #32544


Ignore:
Timestamp:
06/01/2015 05:17:54 AM (9 years ago)
Author:
rmccue
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #32544 – Description

    initial v1  
    77An example use case is below, where all supported MIME types for a service are retrieved from its API and then the subset of types that are both supported by the WordPress install and the service are kept.
    88
     9{{{
    910function get_service_mime_types() {
    1011   // the desired function to get un-sanitized MIME types
     
    1718   return $allowed;
    1819}
     20}}}
    1921
    2022As a work-around, I'm currently using the following, but it's flawed -- if a custom MIME type is added conditionally by user type, it won't be included which is not the desired behavior.
    2123
    22 `array_merge(wp_get_mime_types(), get_allowed_mime_types())`
     24{{{
     25array_merge(wp_get_mime_types(), get_allowed_mime_types())
     26}}}