The challenge of creating a proper import / export for a plugin

How Plugin Import / Exports should be for plugins

An flexible Import & Export that would handle anything, and even help the end user to move a local website to online, and yes, that means moving assets also, such as images, and possibly videos and MP3 / MP4 Files.

I’m just in phase 2 of 4 phases I’ve prepared for this entire process, and everything is as smooth as possible :), let me know if I should continue with another article about how things are evolving.

Just wanted to share this with you, because I couldn’t find something like this on the internet.

A very flexible way to extract a list of attachment_ids => attachment_url of the images used within certain content areas, or certain meta information.

And the best part ? if it’s not an “attachment” and used from a different link, still hosted on the same website, I still put it up, but I use the md5 of the url as the key value instead of the attachment.

I hope this will help anyone that goes trough a similar situation. JSON Sample after the code.

View Gist

JSON Sample