Opened 3 years ago

Closed 16 months ago

Last modified 16 months ago

#15471 closed feature request (duplicate)

Associate Attachments with Multiple Parents

Reported by: filosofo Owned by:
Priority: normal Milestone:
Component: Media Version:
Severity: normal Keywords:
Cc: mikeschinkel@…, ciobi, deryk@…, dartanjan

Description

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?

Change History (11)

If you tell me this is slated for the media rework in the next version of WP, the power button will fall off your laptop.

comment:2 follow-up: ↓ 10   nacin3 years ago

  • Type changed from defect (bug) to feature request

This ticket sounds familiar.

I searched but couldn't find anything exactly the same.

There is a plugin -- http://wordpress.org/extend/plugins/attachments/ -- that does something like this already. I support adding similar functionality to core.

This would be handled nicely by a posts2posts table. See #14513

  • Cc mikeschinkel@… added
  • Cc ciobi added
  • Cc deryk@… added
  • Cc dartanjan added

I also support adding this feature to WP core.

Traditional bloggers often don't see use case for this, but for anyone who's tried making a rich media site or a newspaper/magazine site, its more obvious.

comment:10 in reply to: ↑ 2   solarissmoke16 months ago

  • Keywords needs-patch removed
  • Resolution set to duplicate
  • Status changed from new to closed

Replying to nacin:

This ticket sounds familiar.

#10657

  • Milestone Future Release deleted
Note: See TracTickets for help on using tickets.