Custom Icons in Media Manager for Custom Mime Types
-
Hello WordPress friends!
I’ve created a custom mime type through functions.php using this code:
function custom_upload_mimes ( $existing_mimes=array() ) { $existing_mimes['vcf'] = 'application/vcard'; return $existing_mimes; } add_filter('upload_mimes', 'custom_upload_mimes'); function modify_post_mime_types($post_mime_types) { $post_mime_types['application/vcard'] = array(__('Contact Card', 'vcf'), __('Manage Contact Card', 'vcf'), __ngettext_noop('Contact Card (%s)', 'Contact Cards (%s)', 'vcf')); return $post_mime_types; } add_filter('post_mime_types', 'modify_post_mime_types');
I can upload this type of file successfully, and there is a custom section for it in the media manager.
Problem: media manager shows a grey default icon (wp-includes/images/crystal/default.png) for my new files. I would like to use an icon that is indicative of the file type. It seems that this was possible in past versions of WordPress, but I can’t find a way to accomplish it now.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Custom Icons in Media Manager for Custom Mime Types’ is closed to new replies.