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

WordPress Trac noreply at wordpress.org
Fri Oct 19 18:52:34 UTC 2018


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

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"43773" 43773]:
 {{{
 #!CommitTicketReference repository="" revision="43773"
 REST API: Limit the scope of wp-admin files required in
 WP_REST_Attachments_Controller methods.

 Narrow the scope of the included wp-admin files loaded for
 `wp_generate_attachment_metadata()`, `wp_handle_upload()`, `wp_tempnam()`,
 and `wp_handle_sideload()`. Requires only `wp-admin/includes/file.php` and
 `wp-admin/includes/image.php` instead of `wp-admin/includes/admin.php`.

 Props ocean90, lonelyvegan, soulseekah, pratikthink.
 Merges [43589], [43604] to the 5.0 branch.
 Fixes #43757.
 }}}

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


More information about the wp-trac mailing list