WordPress.org

Make WordPress Core

Changeset 22267


Ignore:
Timestamp:
10/22/2012 05:40:06 PM (8 years ago)
Author:
koopersmith
Message:

Correctly assign post_parent to attachments uploaded in the new media modal. fixes #22085, see #21390.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/media-views.js

    r22247 r22267  
    673673
    674674        maybeInitUploader: function() {
    675             var workspace = this;
     675            var workspace = this,
     676                params = {},
     677                $id;
    676678
    677679            // If the uploader already exists or the body isn't in the DOM, bail.
     
    679681                return;
    680682
     683            $id = $('#post_ID');
     684            if ( $id.length )
     685                params.post_id = $id.val();
     686
    681687            this.uploader = new wp.Uploader( _.extend({
    682688                container: this.$el,
    683689                dropzone:  this.$el,
    684                 browser:   this.$('.upload-attachments a')
     690                browser:   this.$('.upload-attachments a'),
     691                params:    params
    685692            }, this.options.uploader ) );
    686693        },
Note: See TracChangeset for help on using the changeset viewer.