[wp-trac] [WordPress Trac] #23711: file include wrapper for media_sideload_image

WordPress Trac noreply at wordpress.org
Fri Mar 8 14:50:00 UTC 2013


#23711: file include wrapper for media_sideload_image
------------------------------------------------+--------------------------
 Reporter:  norcross                            |       Owner:
     Type:  enhancement                         |      Status:  new
 Priority:  normal                              |   Milestone:  Awaiting
Component:  Media                               |  Review
 Severity:  normal                              |     Version:  3.5
 Keywords:  has-patch dev-feedback 2nd-opinion  |  Resolution:
------------------------------------------------+--------------------------
Changes (by SergeyBiryukov):

 * version:  trunk => 3.5


Comment:

 [attachment:media.php.diff] wouldn't work, you can't `require()` a file by
 its URL like that. `ABSPATH` should be used instead.

 If we want to make it easier to use `media_sideload_image()` on front-end
 though, I guess it's better to move it to `wp-includes`, and either make
 the function itself require the necessary files, or move it along with the
 functions it depends on.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23711#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list