[wp-hackers] hooking into the media uploader

ssokm at ofir.dk ssokm at ofir.dk
Fri Aug 10 08:34:39 UTC 2012


Hello wp-hackers,

I am working on a solution where I would like to synchronize my 
wordpress media-library with a medialibrary on a external server, 
without using a cron job.

What I am looking for is some kind of hook that I can hook into and a 
my script that copies the media item to a new server. Same goes for 
deleting and editing.

I think i could use "add_attachment, delete_attachment and 
edit_attachment", but i cant seem to get the current attachment item.

Have any of you worked with those hooks, or something similar, that 
could elaborate on how to work with it? Or maybe im thinking this all 
wrong and you have a better idea? :)

Thanks in advance

Steffen Mortensen




More information about the wp-hackers mailing list