[wp-trac] Re: [WordPress Trac] #10052: Missing mime types
WordPress Trac
wp-trac at lists.automattic.com
Sat Jun 13 12:03:59 GMT 2009
#10052: Missing mime types
-------------------------------+--------------------------------------------
Reporter: Denis-de-Bernardy | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 2.9
Component: Media | Version: 2.8
Severity: minor | Keywords: needs-patch
-------------------------------+--------------------------------------------
Changes (by Denis-de-Bernardy):
* keywords: has-patch commit => needs-patch
Comment:
FWIW, I use the following two filters in a media-related plugin of mine:
{{{
/**
* upload_mimes()
*
* @param array $mines
* @return array $mines
**/
function upload_mimes($mimes) {
if ( !isset($mimes['flv|f4b|f4p|f4v']) )
$mimes['flv|f4b|f4p|f4v'] = 'video/x-flv';
if ( !isset($mimes['aac']) )
$mimes['aac'] = 'audio/aac';
if ( !isset($mimes['3gp|3g2']) )
$mimes['3gp|3g2'] = 'video/3gpp';
return $mimes;
} # upload_mimes()
/**
* ext2type()
*
* @param array $types
* @return array $types
**/
function ext2type($types) {
$types['video'] = array_merge($types['video'],
array('flv', 'f4b', 'f4p', 'f4v', '3pg', '3g2'));
return $types;
} # ext2type()
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/10052#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list