[wp-trac] [WordPress Trac] #21390: Upload/Insert media revamp

WordPress Trac wp-trac at lists.automattic.com
Tue Sep 18 21:42:36 UTC 2012


#21390: Upload/Insert media revamp
----------------------------+--------------------------
 Reporter:  nacin           |       Owner:  koopersmith
     Type:  task (blessed)  |      Status:  accepted
 Priority:  high            |   Milestone:  3.5
Component:  Media           |     Version:  trunk
 Severity:  normal          |  Resolution:
 Keywords:                  |
----------------------------+--------------------------

Comment (by koopersmith):

 In [21898]:
 {{{
 #!CommitTicketReference repository="" revision="21898"
 Allow JS Attachments models to be searchable and sortable.

 Moves `wp.media.model.Query` sorting and searching to the parent
 `wp.media.model.Attachments`.

 Query parameters are stored in `attachments.props`, which is a
 `Backbone.Model`, and supports `order` (`'ASC'` or `'DESC'`), `orderby`
 (any `Attachment` model property name), `search` (a search term), and
 `query` (a boolean value that ties the `Attachments` collection to the
 server).

 `wp.media.query( args )` now returns an `Attachments` set that is mapped
 to a `Query` collection instead of the `Query` collection itself. This
 allows you to change the query arguments by updating `attachments.props`
 instead of fetching the mirrored arguments, changing them, and passing
 them to `wp.media.query()` again.

 fixes #21921, see #21390, #21809.
 }}}

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


More information about the wp-trac mailing list