Make WordPress Core

Ticket #35725: 35725.patch

File 35725.patch, 1.5 KB (added by markoheijnen, 9 years ago)
  • src/wp-includes/functions.php

     
    21422142         *                        of file types.
    21432143         */
    21442144        $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' ),
    21462146                'audio'       => array( 'aac', 'ac3',  'aif',  'aiff', 'm3a',  'm4a',   'm4b',  'mka',  'mp1',  'mp2',  'mp3', 'ogg', 'oga', 'ram', 'wav', 'wma' ),
    21472147                'video'       => array( '3g2',  '3gp', '3gpp', 'asf', 'avi',  'divx', 'dv',   'flv',  'm4v',   'mkv',  'mov',  'mp4',  'mpeg', 'mpg', 'mpv', 'ogm', 'ogv', 'qt',  'rm', 'vob', 'wmv' ),
    21482148                'document'    => array( 'doc', 'docx', 'docm', 'dotm', 'odt',  'pages', 'pdf',  'xps',  'oxps', 'rtf',  'wp', 'wpd', 'psd', 'xcf' ),
     
    23032303        'bmp' => 'image/bmp',
    23042304        'tiff|tif' => 'image/tiff',
    23052305        'ico' => 'image/x-icon',
     2306        'webp' => 'image/webp',
    23062307        // Video formats.
    23072308        'asf|asx' => 'video/x-ms-asf',
    23082309        'wmv' => 'video/x-ms-wmv',
     
    24092410function get_allowed_mime_types( $user = null ) {
    24102411        $t = wp_get_mime_types();
    24112412
    2412         unset( $t['swf'], $t['exe'] );
     2413        unset( $t['swf'], $t['exe'], $t['webp'] );
    24132414        if ( function_exists( 'current_user_can' ) )
    24142415                $unfiltered = $user ? user_can( $user, 'unfiltered_html' ) : current_user_can( 'unfiltered_html' );
    24152416