Changeset 43589 for trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
- Timestamp:
- 08/29/2018 03:22:14 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
r43529 r43589 170 170 do_action( 'rest_insert_attachment', $attachment, $request, true ); 171 171 172 // Include admin function sto get access to wp_generate_attachment_metadata().173 require_once ABSPATH . 'wp-admin/includes/ admin.php';172 // Include admin function to get access to wp_generate_attachment_metadata(). 173 require_once ABSPATH . 'wp-admin/includes/image.php'; 174 174 175 175 wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) ); … … 537 537 $type = array_shift( $headers['content_type'] ); 538 538 539 /** Include admin functions to get access to wp_tempnam() and wp_handle_sideload() */540 require_once ABSPATH . 'wp-admin/includes/ admin.php';539 /** Include admin functions to get access to wp_tempnam() and wp_handle_sideload(). */ 540 require_once ABSPATH . 'wp-admin/includes/file.php'; 541 541 542 542 // Save the file. … … 737 737 } 738 738 739 /** Include admin function s to get access to wp_handle_upload()*/740 require_once ABSPATH . 'wp-admin/includes/ admin.php';739 /** Include admin function to get access to wp_handle_upload(). */ 740 require_once ABSPATH . 'wp-admin/includes/file.php'; 741 741 742 742 $file = wp_handle_upload( $files['file'], $overrides );
Note: See TracChangeset
for help on using the changeset viewer.