Docs: Improve inline comments for `require_once()` calls in `WP_REST_Attachments_Controller`.

See #49449, #48303.
Built from https://develop.svn.wordpress.org/trunk@47295


git-svn-id: http://core.svn.wordpress.org/trunk@47095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-02-17 03:13:05 +00:00
parent 5875ad981b
commit 445e2859ab
2 changed files with 5 additions and 5 deletions

View File

@ -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 ) ) {

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.4-beta1-47294';
$wp_version = '5.4-beta1-47295';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.