Ticket #35725: 35725.patch
File 35725.patch, 1.5 KB (added by , 9 years ago) |
---|
-
src/wp-includes/functions.php
2142 2142 * of file types. 2143 2143 */ 2144 2144 $ext2type = apply_filters( 'ext2type', array( 2145 'image' => array( 'jpg', 'jpeg', 'jpe', 'gif', 'png', 'bmp', 'tif', 'tiff', 'ico' ),2145 'image' => array( 'jpg', 'jpeg', 'jpe', 'gif', 'png', 'bmp', 'tif', 'tiff', 'ico', 'webp' ), 2146 2146 'audio' => array( 'aac', 'ac3', 'aif', 'aiff', 'm3a', 'm4a', 'm4b', 'mka', 'mp1', 'mp2', 'mp3', 'ogg', 'oga', 'ram', 'wav', 'wma' ), 2147 2147 'video' => array( '3g2', '3gp', '3gpp', 'asf', 'avi', 'divx', 'dv', 'flv', 'm4v', 'mkv', 'mov', 'mp4', 'mpeg', 'mpg', 'mpv', 'ogm', 'ogv', 'qt', 'rm', 'vob', 'wmv' ), 2148 2148 'document' => array( 'doc', 'docx', 'docm', 'dotm', 'odt', 'pages', 'pdf', 'xps', 'oxps', 'rtf', 'wp', 'wpd', 'psd', 'xcf' ), … … 2303 2303 'bmp' => 'image/bmp', 2304 2304 'tiff|tif' => 'image/tiff', 2305 2305 'ico' => 'image/x-icon', 2306 'webp' => 'image/webp', 2306 2307 // Video formats. 2307 2308 'asf|asx' => 'video/x-ms-asf', 2308 2309 'wmv' => 'video/x-ms-wmv', … … 2409 2410 function get_allowed_mime_types( $user = null ) { 2410 2411 $t = wp_get_mime_types(); 2411 2412 2412 unset( $t['swf'], $t['exe'] );2413 unset( $t['swf'], $t['exe'], $t['webp'] ); 2413 2414 if ( function_exists( 'current_user_can' ) ) 2414 2415 $unfiltered = $user ? user_can( $user, 'unfiltered_html' ) : current_user_can( 'unfiltered_html' ); 2415 2416