diff --git src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
index 43d057e167..4c399e079e 100644
|
|
class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller { |
519 | 519 | // Get the content-type. |
520 | 520 | $type = array_shift( $headers['content_type'] ); |
521 | 521 | |
| 522 | $time = array_shift( $headers['time'] ); |
| 523 | |
522 | 524 | /** Include admin functions to get access to wp_tempnam() and wp_handle_sideload() */ |
523 | 525 | require_once ABSPATH . 'wp-admin/includes/admin.php'; |
524 | 526 | |
… |
… |
class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller { |
546 | 548 | 'test_form' => false, |
547 | 549 | ); |
548 | 550 | |
549 | | $sideloaded = wp_handle_sideload( $file_data, $overrides ); |
| 551 | $sideloaded = wp_handle_sideload( $file_data, $overrides, $time ); |
550 | 552 | |
551 | 553 | if ( isset( $sideloaded['error'] ) ) { |
552 | 554 | @unlink( $tmpfname ); |