Skip to content

Instantly share code, notes, and snippets.

@sjaved87
Created January 31, 2017 06:18
Show Gist options
  • Save sjaved87/c55a2f6c86b8c690a8a99bb8628bc793 to your computer and use it in GitHub Desktop.
Save sjaved87/c55a2f6c86b8c690a8a99bb8628bc793 to your computer and use it in GitHub Desktop.
Allow zip and gzip files in WordPress Media Library
<?php
function sjaved_zip_gzip_mime_types ( $mimes ) {
$existing_mimes['zip'] = 'application/zip';
$existing_mimes['gz'] = 'application/x-gzip';
return $mimes;
}
add_filter('upload_mimes', 'sjaved_zip_gzip_mime_types');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment