[wp-trac] [WordPress Trac] #15471: Associate Attachments with Multiple Parents
WordPress Trac
wp-trac at lists.automattic.com
Thu Nov 18 18:14:24 UTC 2010
#15471: Associate Attachments with Multiple Parents
--------------------------+-------------------------------------------------
Reporter: filosofo | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Media | Version:
Severity: normal | Keywords: needs-patch
--------------------------+-------------------------------------------------
There's no logical reason attachments couldn't be associated with multiple
posts, and it would make a number of things easier and avoid needless
duplication.
I suggest we do this by setting the attachment parent(s) in postmeta, with
(possibly) multiple keys named `_parent`, like so:
{{{
+---------+---------+-------------------+------------+
| meta_id | post_id | meta_key | meta_value |
+---------+---------+-------------------+------------+
| 1 | 123 | _parent | 456 |
| 2 | 123 | _parent | 789 |
+---------+---------+-------------------+------------+
}}}
Here, 123 is the attachment object's ID, and 456 and 789 are the IDs of
its associated post objects.
Thoughts?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15471>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list