Skip to content

Instantly share code, notes, and snippets.

@om4james
Created April 2, 2014 02:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save om4james/9927208 to your computer and use it in GitHub Desktop.
Save om4james/9927208 to your computer and use it in GitHub Desktop.
Allow the .4w7 file type to be uploaded to the WordPress media library
<?php
/**
* Allow the .4w7 file type to be uploaded to the WordPress media library.
*
* Ref: https://gist.github.com/om4james/9927208
*
* Put this snippet into a child theme's functions.php file
*/
function rasq_myme_types( $mime_types ){
$mime_types['4w7'] = 'application/octet-stream';
return $mime_types;
}
add_filter( 'upload_mimes', 'rasq_myme_types' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment