HI,
I'm trying to add a tab to the Media library (like the standard Images, Audio and Video ones), for Google Maps KML files, using the post_mime_types filter.
function modify_post_mime_types( $post_mime_types ) {
$post_mime_types[ 'application/vnd.google-earth.kml+xml' ] = array( 'Google Maps KML', 'Manage KML', 'KML (%s)' );
return $post_mime_types;
}
add_filter( 'post_mime_types', array( &$this, 'modify_post_mime_types' ) );
The function is inside a class, hence the '&$this'.
Unfortunately, this doesn't seem to be working. I can upload KML files (though I had to add a upload_mimes filter to allow uploading of the files), and I can see uploaded KML files in the Media Library, but they don't get a tab at the top.