Add new icon to media libary
-
Hello,
I creating a plugin where admin users ca upload and import a .ged file (gedcom). I manage to add the .ged to the allowed mime type’s, open the media browser and show only the .ged files.
what i can’t figure out is how to add the family tree icon to the .ged file. Now it is show as default text file in the media library.
I did multiple searches, but al the times i gat back on how to allow i an extension or plugin’s to manage icons.
This is what mine latest trail is, but not working. In the images dit is a icon named, ged,png.
function mobgen_myme_types($mime_types){ $mime_types['ged'] = 'text/ged'; //Adding ged extension return $mime_types; } add_filter('upload_mimes', 'mobgen_myme_types', 1, 1); apply_filters( 'wp_mime_type_icon', PLUGIN_DIR.'/images/', 'text/ged' );
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
- The topic ‘Add new icon to media libary’ is closed to new replies.