Make WordPress Core

Ticket #29512: 29512.2.diff

File 29512.2.diff, 625 bytes (added by rmccue, 12 years ago)

Default upload_filetypes to the same as the admin

  • wp-includes/ms-functions.php

    diff --git wp-includes/ms-functions.php wp-includes/ms-functions.php
    index 6d7a2fb..3fc6646 100644
    function recurse_dirsize( $directory ) {  
    17451745 * @return array
    17461746 */
    17471747function check_upload_mimes( $mimes ) {
    1748         $site_exts = explode( ' ', get_site_option( 'upload_filetypes' ) );
     1748        $site_exts = explode( ' ', get_site_option( 'upload_filetypes', 'jpg jpeg png gif' ) );
     1749        $site_mimes = array();
    17491750        foreach ( $site_exts as $ext ) {
    17501751                foreach ( $mimes as $ext_pattern => $mime ) {
    17511752                        if ( $ext != '' && strpos( $ext_pattern, $ext ) !== false )