Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[WordPress] Adding support for additional MIME types
<?php
add_filter( 'upload_mimes', 'amce_add_skp_support' );
/**
* Introduces functionality that allows us to upload SKP files which are not
* supported by the enc_type="multipart/form-data" attribute.
*
* @param array $mimes The current array of MIME types that are supported.
* @return array $mimees The updated array of supported MIME types.
*/
function amce_add_skp_support( $mimes ) {
$mimes = array_merge(
$mimes,
array(
'skp' => 'application/octet-stream',
)
);
return $mimes;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.