Add file upload support for MS Office 2007+ filetypes (docx pptx xlsx), props misterbisson, fixes #8194
git-svn-id: http://svn.automattic.com/wordpress/trunk@9662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
de4a0edb94
commit
706f9a2c9c
|
@ -1995,9 +1995,9 @@ function wp_ext2type( $ext ) {
|
|||
$ext2type = apply_filters('ext2type', array(
|
||||
'audio' => array('aac','ac3','aif','aiff','mp1','mp2','mp3','m3a','m4a','m4b','ogg','ram','wav','wma'),
|
||||
'video' => array('asf','avi','divx','dv','mov','mpg','mpeg','mp4','mpv','ogm','qt','rm','vob','wmv'),
|
||||
'document' => array('doc','pages','odt','rtf','pdf'),
|
||||
'spreadsheet' => array('xls','numbers','ods'),
|
||||
'interactive' => array('ppt','key','odp','swf'),
|
||||
'document' => array('doc','docx','pages','odt','rtf','pdf'),
|
||||
'spreadsheet' => array('xls','xlsx','numbers','ods'),
|
||||
'interactive' => array('ppt','pptx','key','odp','swf'),
|
||||
'text' => array('txt'),
|
||||
'archive' => array('tar','bz2','gz','cab','dmg','rar','sea','sit','sqx','zip'),
|
||||
'code' => array('css','html','php','js'),
|
||||
|
@ -2044,10 +2044,10 @@ function wp_check_filetype( $filename, $mimes = null ) {
|
|||
'rtf' => 'application/rtf',
|
||||
'js' => 'application/javascript',
|
||||
'pdf' => 'application/pdf',
|
||||
'doc' => 'application/msword',
|
||||
'pot|pps|ppt' => 'application/vnd.ms-powerpoint',
|
||||
'doc|docx' => 'application/msword',
|
||||
'pot|pps|ppt|pptx' => 'application/vnd.ms-powerpoint',
|
||||
'wri' => 'application/vnd.ms-write',
|
||||
'xla|xls|xlt|xlw' => 'application/vnd.ms-excel',
|
||||
'xla|xls|xlsx|xlt|xlw' => 'application/vnd.ms-excel',
|
||||
'mdb' => 'application/vnd.ms-access',
|
||||
'mpp' => 'application/vnd.ms-project',
|
||||
'swf' => 'application/x-shockwave-flash',
|
||||
|
|
Loading…
Reference in New Issue