If I want to keep an xml file updated with all the images that a user has attched to a page, I shouldn’t write create and generate an xml-file everytime someone visits that page (because it would cause too much overhead) – should I create and fill the file when the user attaches new content to the page in the admin console instead?
Share
First, you will need to create directory under wp-content. Lets called it wp-content/xmlimages/
Now, copy this code and paste it to wp-content/plugins/cr-attachmentpost2xml.php:
WARNING: Don’t except something special here, as it’s just a quick & dirty code. Hope it work the way to want and if you do use this code, don’t forget to check for any security hole it might introduce.