Make WordPress Core

Ticket #40153: 40153.diff

File 40153.diff, 703 bytes (added by realloc, 8 years ago)
  • src/wp-admin/includes/file.php

     
    500500        if ( ! $tmpfname )
    501501                return new WP_Error('http_no_file', __('Could not create Temporary file.'));
    502502
    503         $response = wp_safe_remote_get( $url, array( 'timeout' => $timeout, 'stream' => true, 'filename' => $tmpfname ) );
     503        $args = apply_filters( 'download_url_args', array( 'timeout' => $timeout, 'stream' => true, 'filename' => $tmpfname ) );
    504504
     505        $response = wp_safe_remote_get( $url, $args);
    505506        if ( is_wp_error( $response ) ) {
    506507                unlink( $tmpfname );
    507508                return $response;