Make WordPress Core

Changeset 43604


Ignore:
Timestamp:
08/31/2018 11:45:17 PM (8 years ago)
Author:
rachelbaker
Message:

REST API: Load missing required file for multisite users in WP_REST_Attachments_Controller::create_item().

Requires wp-admin/includes/image.php to make wp_read_image_metadata() function available. Fixes error introduced in [43589].

Props ocean90, soulseekah.
Fixes #43757.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php

    r43603 r43604  
    122122                $type = $file['type'];
    123123                $file = $file['file'];
     124
     125                // Include image functions to get access to wp_read_image_metadata().
     126                require_once ABSPATH . 'wp-admin/includes/image.php';
    124127
    125128                // use image exif/iptc data for title and caption defaults if possible
Note: See TracChangeset for help on using the changeset viewer.