Skip to content

Instantly share code, notes, and snippets.

@leanneromak
Created December 10, 2015 22:27
Show Gist options
  • Save leanneromak/1ef043a004596c37c042 to your computer and use it in GitHub Desktop.
Save leanneromak/1ef043a004596c37c042 to your computer and use it in GitHub Desktop.
allow .vcf upload to media library (v-cards)
add_filter('upload_mimes', 'custom_upload_mimes');
function custom_upload_mimes ( $existing_mimes=array() ) {
// add your extension to the array
$existing_mimes['vcf'] = 'text/x-vcard';
return $existing_mimes;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment