From 82905a1f33bb02bdf5842b7871e39be488dc5203 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 26 Feb 2008 19:57:00 +0000 Subject: [PATCH] fix overuse of default mime icon and re-shuffle mp4/m4a file type matches. Props andy. see #5911 git-svn-id: https://develop.svn.wordpress.org/trunk@7045 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 4 ++-- wp-includes/post.php | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 48f53f825b..b6bd681fd6 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -1188,12 +1188,12 @@ function wp_check_filetype( $filename, $mimes = null ) { 'asf|asx|wax|wmv|wmx' => 'video/asf', 'avi' => 'video/avi', 'mov|qt' => 'video/quicktime', - 'mpeg|mpg|mpe' => 'video/mpeg', + 'mpeg|mpg|mpe|mp4' => 'video/mpeg', 'txt|c|cc|h' => 'text/plain', 'rtx' => 'text/richtext', 'css' => 'text/css', 'htm|html' => 'text/html', - 'mp3|mp4' => 'audio/mpeg', + 'mp3|m4a' => 'audio/mpeg', 'ra|ram' => 'audio/x-realaudio', 'wav' => 'audio/wav', 'ogg' => 'audio/ogg', diff --git a/wp-includes/post.php b/wp-includes/post.php index a98bae3ecd..edfb412ab7 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -2390,9 +2390,8 @@ function wp_mime_type_icon( $mime = 0 ) { $post_mimes[] = str_replace('/', '_', $mime); } - $post_mimes[] = 'default'; - $matches = wp_match_mime_types(array_keys($types), $post_mimes); + $matches['default'] = array('default'); foreach ( $matches as $match => $wilds ) { if ( isset($types[$wilds[0]])) {