Changeset 43773
- Timestamp:
- 10/19/2018 06:52:31 PM (6 years ago)
- Location:
- branches/5.0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0
- Property svn:mergeinfo changed
/trunk merged: 43589,43604
- Property svn:mergeinfo changed
-
branches/5.0/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
r43737 r43773 122 122 $type = $file['type']; 123 123 $file = $file['file']; 124 125 // Include image functions to get access to wp_read_image_metadata(). 126 require_once ABSPATH . 'wp-admin/includes/image.php'; 124 127 125 128 // use image exif/iptc data for title and caption defaults if possible … … 170 173 do_action( 'rest_insert_attachment', $attachment, $request, true ); 171 174 172 // Include admin function sto get access to wp_generate_attachment_metadata().173 require_once ABSPATH . 'wp-admin/includes/ admin.php';175 // Include admin function to get access to wp_generate_attachment_metadata(). 176 require_once ABSPATH . 'wp-admin/includes/image.php'; 174 177 175 178 wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) ); … … 558 561 $type = array_shift( $headers['content_type'] ); 559 562 560 /** Include admin functions to get access to wp_tempnam() and wp_handle_sideload() */561 require_once ABSPATH . 'wp-admin/includes/ admin.php';563 /** Include admin functions to get access to wp_tempnam() and wp_handle_sideload(). */ 564 require_once ABSPATH . 'wp-admin/includes/file.php'; 562 565 563 566 // Save the file. … … 758 761 } 759 762 760 /** Include admin function s to get access to wp_handle_upload()*/761 require_once ABSPATH . 'wp-admin/includes/ admin.php';763 /** Include admin function to get access to wp_handle_upload(). */ 764 require_once ABSPATH . 'wp-admin/includes/file.php'; 762 765 763 766 $file = wp_handle_upload( $files['file'], $overrides );
Note: See TracChangeset
for help on using the changeset viewer.