From 74c1d4e71db2365c1be983d70ef751770c2f2347 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Sun, 11 Apr 2010 08:50:23 +0000 Subject: [PATCH] Add WordPerfect filetypes to Mimetype list. Props morganestes. Fixes #12849 git-svn-id: https://develop.svn.wordpress.org/trunk@14066 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 4287c1702d..178cc66752 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -2325,12 +2325,12 @@ function wp_ext2type( $ext ) { $ext2type = apply_filters( 'ext2type', array( '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' ), + 'document' => array( 'doc', 'docx', 'docm', 'dotm', 'odt', 'pages', 'pdf', 'rtf', 'wp', 'wpd' ), 'spreadsheet' => array( 'numbers', 'ods', 'xls', 'xlsx', 'xlsb', 'xlsm' ), 'interactive' => array( 'key', 'ppt', 'pptx', 'pptm', 'odp', 'swf' ), 'text' => array( 'asc', 'csv', 'tsv', 'txt' ), 'archive' => array( 'bz2', 'cab', 'dmg', 'gz', 'rar', 'sea', 'sit', 'sqx', 'tar', 'tgz', 'zip' ), - 'code' => array( 'css', 'html', 'php', 'js' ), + 'code' => array( 'css', 'htm', 'html', 'php', 'js' ), )); foreach ( $ext2type as $type => $exts ) if ( in_array( $ext, $exts ) ) @@ -2435,6 +2435,8 @@ function get_allowed_mime_types() { 'odc' => 'application/vnd.oasis.opendocument.chart', 'odb' => 'application/vnd.oasis.opendocument.database', 'odf' => 'application/vnd.oasis.opendocument.formula', + // wordperfect formats + 'wp|wpd' => 'application/wordperfect', ) ); }