Skip to content

Instantly share code, notes, and snippets.

@JeffMatsonPagely
Created September 20, 2019 12:46
Show Gist options
  • Save JeffMatsonPagely/352c041dda4d15206b50e30f892385cf to your computer and use it in GitHub Desktop.
Save JeffMatsonPagely/352c041dda4d15206b50e30f892385cf to your computer and use it in GitHub Desktop.
Allow VCard File Uploads in WordPress
<?php
add_filter( 'upload_mimes', 'allow_vcard_uploads' );
function allow_vcard_uploads( $mime_types ) {
$mime_types['vcf'] = 'text/x-vcard';
$mime_types['vcard'] = 'text/x-vcard';
return $mime_types;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment