[wp-trac] [WordPress Trac] #26587: wp.media library argument post__not_in breaks the uploads

WordPress Trac noreply at wordpress.org
Thu Sep 11 20:34:38 UTC 2014


#26587: wp.media library argument post__not_in breaks the uploads
--------------------------+-------------------------
 Reporter:  ciantic       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.1
Component:  Media         |     Version:  3.8
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  javascript
--------------------------+-------------------------
Changes (by wonderboymusic):

 * keywords:  needs-patch => has-patch
 * milestone:  Future Release => 4.1


Comment:

 [attachment:26587.diff] allows you to pass `include` and `exclude` to
 `Query.get()`, which are aliases for `post__in` and `post__not_in`.

 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()
 }}}

 All of the parsed props are aliases, `include` and `exclude` are in line
 with what we do elsewhere.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/26587#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list