Support Ogg audio and video file extensions. Fixes #11519 props niallkennedy

git-svn-id: http://svn.automattic.com/wordpress/trunk@13349 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-02-23 23:26:30 +00:00
parent f9edbbfc00
commit 1a6f4adb67
1 changed files with 4 additions and 3 deletions

View File

@ -2307,8 +2307,8 @@ function wp_upload_bits( $name, $deprecated, $bits, $time = null ) {
*/
function wp_ext2type( $ext ) {
$ext2type = apply_filters( 'ext2type', array(
'audio' => array( 'aac', 'ac3', 'aif', 'aiff', 'm3a', 'm4a', 'm4b', 'mka', 'mp1', 'mp2', 'mp3', 'ogg', 'ram', 'wav', 'wma' ),
'video' => array( 'asf', 'avi', 'divx', 'dv', 'flv', 'm4v', 'mkv', 'mov', 'mp4', 'mpeg', 'mpg', 'mpv', 'ogm', 'qt', 'rm', 'vob', 'wmv' ),
'audio' => array( 'aac', 'ac3', 'aif', 'aiff', 'm3a', 'm4a', 'm4b', 'mka', 'mp1', 'mp2', 'mp3', 'ogg', 'oga', 'ram', 'wav', 'wma' ),
'video' => array( 'asf', 'avi', 'divx', 'dv', 'flv', 'm4v', 'mkv', 'mov', 'mp4', 'mpeg', 'mpg', 'mpv', 'ogm', 'ogv', 'qt', 'rm', 'vob', 'wmv' ),
'document' => array( 'doc', 'docx', 'docm', 'dotm', 'odt', 'pages', 'pdf', 'rtf' ),
'spreadsheet' => array( 'numbers', 'ods', 'xls', 'xlsx', 'xlsb', 'xlsm' ),
'interactive' => array( 'key', 'ppt', 'pptx', 'pptm', 'odp', 'swf' ),
@ -2383,7 +2383,8 @@ function get_allowed_mime_types() {
'mp4|m4v' => 'video/mp4',
'ra|ram' => 'audio/x-realaudio',
'wav' => 'audio/wav',
'ogg' => 'audio/ogg',
'ogg|oga' => 'audio/ogg',
'ogv' => 'video/ogg',
'mid|midi' => 'audio/midi',
'wma' => 'audio/wma',
'mka' => 'audio/x-matroska',