diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php index 91b21587b1..59cb3ed182 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php @@ -185,7 +185,7 @@ class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller { header( 'X-WP-Upload-Attachment-ID: ' . $attachment_id ); } - // Include admin function to get access to wp_generate_attachment_metadata(). + // Include media functions to get access to wp_generate_attachment_metadata(). require_once ABSPATH . 'wp-admin/includes/media.php'; // Post-process the upload (create image sub-sizes, make PDF thumbnalis, etc.) and insert attachment meta. @@ -717,7 +717,7 @@ class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller { // Get the content-type. $type = array_shift( $headers['content_type'] ); - /** Include admin functions to get access to wp_tempnam() and wp_handle_sideload(). */ + // Include filesystem functions to get access to wp_tempnam() and wp_handle_sideload(). require_once ABSPATH . 'wp-admin/includes/file.php'; // Save the file. @@ -915,7 +915,7 @@ class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller { return $size_check; } - /** Include admin function to get access to wp_handle_upload(). */ + // Include filesystem functions to get access to wp_handle_upload(). require_once ABSPATH . 'wp-admin/includes/file.php'; $file = wp_handle_upload( $files['file'], $overrides ); @@ -997,7 +997,7 @@ class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller { ); } - // Include admin function to get access to upload_is_user_over_quota(). + // Include multisite admin functions to get access to upload_is_user_over_quota(). require_once ABSPATH . 'wp-admin/includes/ms.php'; if ( upload_is_user_over_quota( false ) ) {