Changeset 21527 for trunk/wp-includes/functions.php
- Timestamp:
- 08/15/2012 04:48:36 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r21485 r21527 1643 1643 function wp_ext2type( $ext ) { 1644 1644 $ext2type = apply_filters( 'ext2type', array( 1645 'audio' => array( 'aac', 'ac3', 'aif', 'aiff', 'm3a', 'm4a', 'm4b', 'mka', 'mp1','mp2', 'mp3', 'ogg', 'oga', 'ram', 'wav', 'wma' ),1646 'video' => array( 'asf', 'avi', 'divx', 'dv', 'flv', 'm4v', 'mkv', 'mov', 'mp4','mpeg', 'mpg', 'mpv', 'ogm', 'ogv', 'qt', 'rm', 'vob', 'wmv' ),1647 'document' => array( 'doc', 'docx', 'docm', 'dotm', 'odt', 'pages', 'pdf', 'rtf', 'wp','wpd' ),1648 'spreadsheet' => array( 'numbers', 'ods', 'xls', 'xlsx', 'xls b', 'xlsm' ),1649 'interactive' => array( ' key', 'ppt', 'pptx', 'pptm', 'odp', 'swf' ),1645 'audio' => array( 'aac', 'ac3', 'aif', 'aiff', 'm3a', 'm4a', 'm4b', 'mka', 'mp1', 'mp2', 'mp3', 'ogg', 'oga', 'ram', 'wav', 'wma' ), 1646 'video' => array( 'asf', 'avi', 'divx', 'dv', 'flv', 'm4v', 'mkv', 'mov', 'mp4', 'mpeg', 'mpg', 'mpv', 'ogm', 'ogv', 'qt', 'rm', 'vob', 'wmv' ), 1647 'document' => array( 'doc', 'docx', 'docm', 'dotm', 'odt', 'pages', 'pdf', 'rtf', 'wp', 'wpd' ), 1648 'spreadsheet' => array( 'numbers', 'ods', 'xls', 'xlsx', 'xlsm', 'xlsb' ), 1649 'interactive' => array( 'swf', 'key', 'ppt', 'pptx', 'pptm', 'pps', 'ppsx', 'ppsm', 'sldx', 'sldm', 'odp' ), 1650 1650 'text' => array( 'asc', 'csv', 'tsv', 'txt' ), 1651 'archive' => array( 'bz2', 'cab', 'dmg', 'gz', 'rar', 'sea', 'sit', 'sqx', 'tar','tgz', 'zip', '7z' ),1651 'archive' => array( 'bz2', 'cab', 'dmg', 'gz', 'rar', 'sea', 'sit', 'sqx', 'tar', 'tgz', 'zip', '7z' ), 1652 1652 'code' => array( 'css', 'htm', 'html', 'php', 'js' ), 1653 1653 )); … … 1768 1768 // Accepted MIME types are set here as PCRE unless provided. 1769 1769 $mimes = apply_filters( 'upload_mimes', array( 1770 // Image formats 1770 1771 'jpg|jpeg|jpe' => 'image/jpeg', 1771 1772 'gif' => 'image/gif', … … 1774 1775 'tif|tiff' => 'image/tiff', 1775 1776 'ico' => 'image/x-icon', 1777 // Video formats 1776 1778 'asf|asx|wax|wmv|wmx' => 'video/asf', 1777 1779 'avi' => 'video/avi', … … 1780 1782 'mov|qt' => 'video/quicktime', 1781 1783 'mpeg|mpg|mpe' => 'video/mpeg', 1784 'mp4|m4v' => 'video/mp4', 1785 'ogv' => 'video/ogg', 1786 'mkv' => 'video/x-matroska', 1787 // Text formats 1782 1788 'txt|asc|c|cc|h' => 'text/plain', 1783 1789 'csv' => 'text/csv', … … 1787 1793 'css' => 'text/css', 1788 1794 'htm|html' => 'text/html', 1795 // Audio formats 1789 1796 'mp3|m4a|m4b' => 'audio/mpeg', 1790 'mp4|m4v' => 'video/mp4',1791 1797 'ra|ram' => 'audio/x-realaudio', 1792 1798 'wav' => 'audio/wav', 1793 1799 'ogg|oga' => 'audio/ogg', 1794 'ogv' => 'video/ogg',1795 1800 'mid|midi' => 'audio/midi', 1796 1801 'wma' => 'audio/wma', 1797 1802 'mka' => 'audio/x-matroska', 1798 'mkv' => 'video/x-matroska',1803 // Misc application formats 1799 1804 'rtf' => 'application/rtf', 1800 1805 'js' => 'application/javascript', 1801 1806 'pdf' => 'application/pdf', 1802 'doc|docx' => 'application/msword',1803 'pot|pps|ppt|pptx|ppam|pptm|sldm|ppsm|potm' => 'application/vnd.ms-powerpoint',1804 'wri' => 'application/vnd.ms-write',1805 'xla|xls|xlsx|xlt|xlw|xlam|xlsb|xlsm|xltm' => 'application/vnd.ms-excel',1806 'mdb' => 'application/vnd.ms-access',1807 'mpp' => 'application/vnd.ms-project',1808 'docm|dotm' => 'application/vnd.ms-word',1809 'pptx|sldx|ppsx|potx' => 'application/vnd.openxmlformats-officedocument.presentationml',1810 'xlsx|xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml',1811 'docx|dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml',1812 'onetoc|onetoc2|onetmp|onepkg' => 'application/onenote',1813 1807 'swf' => 'application/x-shockwave-flash', 1814 1808 'class' => 'application/java', … … 1819 1813 '7z' => 'application/x-7z-compressed', 1820 1814 'exe' => 'application/x-msdownload', 1821 // openoffice formats 1815 // MS Office formats 1816 'doc' => 'application/msword', 1817 'pot|pps|ppt' => 'application/vnd.ms-powerpoint', 1818 'wri' => 'application/vnd.ms-write', 1819 'xla|xls|xlt|xlw' => 'application/vnd.ms-excel', 1820 'mdb' => 'application/vnd.ms-access', 1821 'mpp' => 'application/vnd.ms-project', 1822 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 1823 'docm' => 'application/vnd.ms-word.document.macroEnabled.12', 1824 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', 1825 'dotm' => 'application/vnd.ms-word.template.macroEnabled.12', 1826 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 1827 'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12', 1828 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12', 1829 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', 1830 'xltm' => 'application/vnd.ms-excel.template.macroEnabled.12', 1831 'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12', 1832 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 1833 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12', 1834 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', 1835 'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12', 1836 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template', 1837 'potm' => 'application/vnd.ms-powerpoint.template.macroEnabled.12', 1838 'ppam' => 'application/vnd.ms-powerpoint.addin.macroEnabled.12', 1839 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide', 1840 'sldm' => 'application/vnd.ms-powerpoint.slide.macroEnabled.12', 1841 'onetoc|onetoc2|onetmp|onepkg' => 'application/onenote', 1842 // OpenOffice formats 1822 1843 'odt' => 'application/vnd.oasis.opendocument.text', 1823 1844 'odp' => 'application/vnd.oasis.opendocument.presentation', … … 1827 1848 'odb' => 'application/vnd.oasis.opendocument.database', 1828 1849 'odf' => 'application/vnd.oasis.opendocument.formula', 1829 // wordperfect formats1850 // WordPerfect formats 1830 1851 'wp|wpd' => 'application/wordperfect', 1831 1852 ) );
Note: See TracChangeset
for help on using the changeset viewer.