REST API: Remove a duplicate `require_once()`.

In `WP_REST_Attachments_Controller::create_item()`, `wp-admin/includes/image.php` was being `require_once()`-ed... twice. The superflous `require_once()` has been quietly removed.

Props david.binda.
Merges [44206] to trunk.
Fixes #45420.
Built from https://develop.svn.wordpress.org/trunk@44309


git-svn-id: http://core.svn.wordpress.org/trunk@44139 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2018-12-19 03:27:26 +00:00
parent 7da2e20f4d
commit 8880458212
2 changed files with 1 additions and 2 deletions

View File

@ -174,7 +174,6 @@ class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller {
// Include admin function to get access to wp_generate_attachment_metadata().
require_once ABSPATH . 'wp-admin/includes/media.php';
require_once ABSPATH . 'wp-admin/includes/image.php';
wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) );

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.1-alpha-44308';
$wp_version = '5.1-alpha-44309';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.