As part of a massive code cleanup, I am applying the DRY principle to the eCards plugin:
Don’t repeat yourself (DRY, or sometimes do not repeat yourself) is a principle of software development aimed at reducing repetition of software patterns, replacing it with abstractions or using data normalization to avoid redundancy.
The first candidate for this cleanup was the image attachment feature, custom coded as a metabox.
Attaching images like this is/was dangerous as images could get unattached from other posts or pages.
If you like this article, go ahead and follow me on Twitter or buy me a coffee to support my work!