From f32dbfe62c2e83156a32a159068c304225d72775 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sun, 11 May 2014 07:19:13 +0000 Subject: [PATCH] Add `xps` and `oxps` extensions to list of supported document types. More: http://en.wikipedia.org/wiki/Open_XML_Paper_Specification Fixes #15697. Built from https://develop.svn.wordpress.org/trunk@28372 git-svn-id: http://core.svn.wordpress.org/trunk@28200 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index dd7df98472..0390eac793 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -1921,7 +1921,7 @@ function wp_ext2type( $ext ) { 'image' => array( 'jpg', 'jpeg', 'jpe', 'gif', 'png', 'bmp', 'tif', 'tiff', 'ico' ), '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', 'wp', 'wpd' ), + 'document' => array( 'doc', 'docx', 'docm', 'dotm', 'odt', 'pages', 'pdf', 'xps', 'oxps', 'rtf', 'wp', 'wpd' ), 'spreadsheet' => array( 'numbers', 'ods', 'xls', 'xlsx', 'xlsm', 'xlsb' ), 'interactive' => array( 'swf', 'key', 'ppt', 'pptx', 'pptm', 'pps', 'ppsx', 'ppsm', 'sldx', 'sldm', 'odp' ), 'text' => array( 'asc', 'csv', 'tsv', 'txt' ), @@ -2147,6 +2147,8 @@ function wp_get_mime_types() { 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide', 'sldm' => 'application/vnd.ms-powerpoint.slide.macroEnabled.12', 'onetoc|onetoc2|onetmp|onepkg' => 'application/onenote', + 'oxps' => 'application/oxps', + 'xps' => 'application/vnd.ms-xpsdocument', // OpenOffice formats 'odt' => 'application/vnd.oasis.opendocument.text', 'odp' => 'application/vnd.oasis.opendocument.presentation',