[wp-trac] [WordPress Trac] #43757: `WP_REST_Attachments_Controller` includes entire admin includes for a few utility functions

WordPress Trac noreply at wordpress.org
Thu Aug 30 10:49:02 UTC 2018


#43757: `WP_REST_Attachments_Controller` includes entire admin includes for a few
utility functions
-------------------------+-----------------------------
 Reporter:  lonelyvegan  |       Owner:  SergeyBiryukov
     Type:  enhancement  |      Status:  reopened
 Priority:  normal       |   Milestone:  5.0
Component:  REST API     |     Version:  trunk
 Severity:  minor        |  Resolution:
 Keywords:  needs-patch  |     Focuses:
-------------------------+-----------------------------
Changes (by ocean90):

 * keywords:  has-patch needs-testing => needs-patch
 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 The change is causing a fatal error by `create_item()` due to the
 undefined function `wp_read_image_metadata()`.

 This happens because `upload_from_data()` and `upload_from_file()` are now
 only loading `wp-admin/includes/file.php`.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/43757#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list