I have a seperate database with lists of users, brochures and brochure URL's, and timestamps of when a brochure was ordered, but I want my database to update everytime a brochure (PDF) attachment is updated in the admin back end of wordpress.

When a user requests a brochure they receive a reminder after a few days wiuth a link to the PDF they requested. I have most of it figured out I just need to know how this link can constantly link to the latest PDF of the brochure they requested.

Thanks :)

link|improve this question

78% accept rate
feedback

1 Answer

up vote 1 down vote accepted

You can hook into add_attachment and/or edit_attachment actions and carry out an update on your separate database with the appropriate info. In both cases the attachment ID seems to be the only argument but you can easily get_post or get_post_meta if you need anything else.

Cheers!

link|improve this answer
Thanks that is all I need to know :) – JamesG Nov 28 '11 at 10:41
You're welcome :) – kovshenin Nov 28 '11 at 11:50
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.