Changeset 12581 for trunk/wp-includes/functions.php
- Timestamp:
- 12/30/2009 07:59:33 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r12580 r12581 2237 2237 */ 2238 2238 function wp_ext2type( $ext ) { 2239 $ext2type = apply_filters( 'ext2type', array(2240 'audio' => array('aac','ac3','aif','aiff','mp1','mp2','mp3','m3a','m4a','m4b','ogg','ram','wav','wma'),2241 'video' => array('asf','avi','divx','dv','mov','mpg','mpeg','mp4','mpv','ogm','qt','rm','vob','wmv', 'm4v'),2242 'document' => array('doc','docx','pages','odt','rtf','pdf'),2243 'spreadsheet' => array( 'xls','xlsx','numbers','ods'),2244 'interactive' => array( 'ppt','pptx','key','odp','swf'),2245 'text' => array('txt'),2246 'archive' => array('tar','bz2','gz','cab','dmg','rar','sea','sit','sqx','zip'),2247 'code' => array('css','html','php','js'),2239 $ext2type = apply_filters( 'ext2type', array( 2240 'audio' => array( 'aac', 'ac3', 'aif', 'aiff', 'm3a', 'm4a', 'm4b', 'mka', 'mp1', 'mp2', 'mp3', 'ogg', 'ram', 'wav', 'wma' ), 2241 'video' => array( 'asf', 'avi', 'divx', 'dv', 'flv', 'mkv', 'mov', 'mpg', 'mpeg', 'mp4', 'mpv', 'ogm', 'qt', 'rm', 'vob', 'wmv', 'm4v' ), 2242 'document' => array( 'doc', 'docx', 'docm', 'dotm', 'odt', 'pages', 'pdf', 'rtf' ), 2243 'spreadsheet' => array( 'numbers', 'ods', 'xls', 'xlsx', 'xlsb', 'xlsm' ), 2244 'interactive' => array( 'key', 'ppt', 'pptx', 'pptm', 'odp', 'swf' ), 2245 'text' => array( 'asc', 'txt' ), 2246 'archive' => array( 'bz2', 'cab', 'dmg', 'gz', 'rar', 'sea', 'sit', 'sqx', 'tar', 'tgz', 'zip' ), 2247 'code' => array( 'css', 'html', 'php', 'js' ), 2248 2248 )); 2249 2249 foreach ( $ext2type as $type => $exts ) 2250 if ( in_array( $ext, $exts) )2250 if ( in_array( $ext, $exts ) ) 2251 2251 return $type; 2252 2252 } … … 2306 2306 'mov|qt' => 'video/quicktime', 2307 2307 'mpeg|mpg|mpe' => 'video/mpeg', 2308 'txt| c|cc|h' => 'text/plain',2308 'txt|asc|c|cc|h' => 'text/plain', 2309 2309 'rtx' => 'text/richtext', 2310 2310 'css' => 'text/css', … … 2317 2317 'mid|midi' => 'audio/midi', 2318 2318 'wma' => 'audio/wma', 2319 'mka' => 'audio/x-matroska', 2320 'mkv' => 'video/x-matroska', 2319 2321 'rtf' => 'application/rtf', 2320 2322 'js' => 'application/javascript', 2321 2323 'pdf' => 'application/pdf', 2322 2324 'doc|docx' => 'application/msword', 2323 'pot|pps|ppt|pptx ' => 'application/vnd.ms-powerpoint',2325 'pot|pps|ppt|pptx|ppam|pptm|sldm|ppsm|potm' => 'application/vnd.ms-powerpoint', 2324 2326 'wri' => 'application/vnd.ms-write', 2325 'xla|xls|xlsx|xlt|xlw ' => 'application/vnd.ms-excel',2327 'xla|xls|xlsx|xlt|xlw|xlam|xlsb|xlsm|xltm' => 'application/vnd.ms-excel', 2326 2328 'mdb' => 'application/vnd.ms-access', 2327 2329 'mpp' => 'application/vnd.ms-project', 2330 'docm|dotm' => 'application/vnd.ms-word', 2331 'pptx|sldx|ppsx|potx' => 'application/vnd.openxmlformats-officedocument.presentationml', 2332 'xlsx|xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml', 2333 'docx|dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml', 2334 'onetoc|onetoc2|onetmp|onepkg' => 'application/onenote', 2328 2335 'swf' => 'application/x-shockwave-flash', 2329 2336 'class' => 'application/java',
Note: See TracChangeset
for help on using the changeset viewer.