[wp-trac] [WordPress Trac] #26587: wp.media library argument post__not_in breaks the uploads
WordPress Trac
noreply at wordpress.org
Tue Sep 23 03:37:08 UTC 2014
#26587: wp.media library argument post__not_in breaks the uploads
--------------------------+-----------------------------
Reporter: ciantic | Owner: wonderboymusic
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.1
Component: Media | Version: 3.8
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses: javascript
--------------------------+-----------------------------
Changes (by wonderboymusic):
* owner: => wonderboymusic
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"29759"]:
{{{
#!CommitTicketReference repository="" revision="29759"
Add two properties to `media.model.Attachments.propmap`: `include` and
`exclude`, which are aliases for `post__in` and `post__not_in`.
This allows you to instantiate a library that includes and/or excludes
specific attachments by passing a single ID or an array of IDs.
Example usage:
{{{
wp.media({frame: 'post', library: {include: [414, 415]}}).open()
wp.media({frame: 'post', library: {include: 414}}).open()
wp.media({frame: 'post', library: {exclude: [414, 415]}}).open()
wp.media({frame: 'post', library: {exclude: 414}}).open()
}}}
Fixes #26587.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/26587#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list