[wp-hackers] Front end file handling
Tom Barrett
tcbarrett at gmail.com
Wed Nov 14 10:33:13 UTC 2012
The aim is to let users upload a picture, but without using /wp-admin/.
They update a post they own.
I already have the file in a subdirectory of uploads. The URL to the file
is stored as a piece of post meta.I want to add the image to the media
library, and attach it to the post being edited.
The media sideload functions live in /wp-admin/includes/media.php and are
not loaded on the front end. They in turn need files.php - however, just
including those two files in a hook breaks things (silently on my set up).
So, before I start rummaging around more, I thought I'd ask! How to best
sideload from the front end in the above scenario?
--
http://www.tcbarrett.com | http://gplus.to/tcbarrett |
http://twitter.com/tcbarrett
More information about the wp-hackers
mailing list