diff --git a/wp-includes/functions.php b/wp-includes/functions.php index f762203f7..a0b0bbf8b 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -2432,7 +2432,7 @@ function wp_ext2type( $ext ) { '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' ), + 'archive' => array( 'bz2', 'cab', 'dmg', 'gz', 'rar', 'sea', 'sit', 'sqx', 'tar', 'tgz', 'zip', '7z' ), 'code' => array( 'css', 'htm', 'html', 'php', 'js' ), )); foreach ( $ext2type as $type => $exts ) @@ -2598,6 +2598,8 @@ function get_allowed_mime_types() { 'tar' => 'application/x-tar', 'zip' => 'application/zip', 'gz|gzip' => 'application/x-gzip', + 'rar' => 'application/rar', + '7z' => 'application/x-7z-compressed', 'exe' => 'application/x-msdownload', // openoffice formats 'odt' => 'application/vnd.oasis.opendocument.text',