From 71044010f816a8749a0e3afd6f92b00e8d22ed41 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Sat, 15 Dec 2018 11:17:31 +0000 Subject: [PATCH] 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. See #45420. Built from https://develop.svn.wordpress.org/branches/5.0@44206 git-svn-id: http://core.svn.wordpress.org/branches/5.0@44036 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../rest-api/endpoints/class-wp-rest-attachments-controller.php | 1 - wp-includes/version.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php index 31cb070b94..2bcf08bdfc 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php @@ -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 ) ); diff --git a/wp-includes/version.php b/wp-includes/version.php index d35c83de37..645c7fb3a0 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0.2-alpha-44205'; +$wp_version = '5.0.2-alpha-44206'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.