Make WordPress Core


Ignore:
Timestamp:
09/07/2014 10:10:33 AM (10 years ago)
Author:
SergeyBiryukov
Message:
  • Declare $site_mimes before using it in check_upload_mimes().
  • Use the same default value for 'upload_filetypes' as on Network Settings screen.

props rmccue.
fixes #29512 for trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/ms-functions.php

    r28835 r29718  
    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 ) {
Note: See TracChangeset for help on using the changeset viewer.