Ticket #43757: 43757.4.diff
File 43757.4.diff, 721 bytes (added by , 6 years ago) |
---|
-
src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
173 173 do_action( 'rest_insert_attachment', $attachment, $request, true ); 174 174 175 175 // Include admin function to get access to wp_generate_attachment_metadata(). 176 require_once ABSPATH . 'wp-admin/includes/media.php'; 176 177 require_once ABSPATH . 'wp-admin/includes/image.php'; 177 178 178 179 wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) );