Make WordPress Core

Changeset 34257


Ignore:
Timestamp:
09/17/2015 04:46:00 AM (9 years ago)
Author:
wonderboymusic
Message:

Uploader: Fire 'wp_handle_upload' in wp_upload_bits(). Thusly, the filter in wp_xmlrpc_server::mw_newMediaObject() is redundant.

Props dllh.
Fixes #33539.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-xmlrpc-server.php

    r34135 r34257  
    57385738            'file' => $name,
    57395739            'url'  => $upload[ 'url' ],
    5740             'type' => $type
     5740            'type' => $upload[ 'type' ]
    57415741        );
    57425742
    5743         /** This filter is documented in wp-admin/includes/file.php */
    5744         return apply_filters( 'wp_handle_upload', $struct, 'upload' );
     5743        return $struct;
    57455744    }
    57465745
  • trunk/src/wp-includes/functions.php

    r34129 r34257  
    19941994    $url = $upload['url'] . "/$filename";
    19951995
    1996     return array( 'file' => $new_file, 'url' => $url, 'error' => false );
     1996    /** This filter is documented in wp-admin/includes/file.php */
     1997    return apply_filters( 'wp_handle_upload', array( 'file' => $new_file, 'url' => $url, 'type' => $wp_filetype['type'], 'error' => false ), 'sideload' );
    19971998}
    19981999
Note: See TracChangeset for help on using the changeset viewer.