[wp-trac] [WordPress Trac] #22642: Media: API to add back the description field in the new media popup

WordPress Trac noreply at wordpress.org
Thu Nov 29 21:36:15 UTC 2012


#22642: Media: API to add back the description field in the new media popup
-------------------------+------------------
 Reporter:  batmoo       |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  3.5
Component:  Media        |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+------------------
Changes (by nacin):

 * keywords:   => has-patch
 * milestone:  Awaiting Review => 3.5


Comment:

 On why the unset() calls are there: get_attachment_fields_to_edit()
 returns all of those fields: align, caption, size choices, etc. But
 because it returns all of those fields, it is very slow. (In particular,
 image_downsize() is slow. See #22598 for how we work around that.) So
 instead, we just apply the raw filter.

 I kept the unset() calls because it is possible that a plugin could be re-
 defining some of those fields in a bad way (rather than just appending to
 the array), and we wouldn't want that, as we already handle those fields
 in newer, better ways.

 The exception is Description (post_content). We don't handle it, but it
 was something get_attachment_fields_to_edit() previously returned. Stop
 unsetting it, and now a plugin can add it back with just a few lines of
 code.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/22642#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list