Make WordPress Core

Ticket #33096: 33096.1.patch

File 33096.1.patch, 988 bytes (added by rhurling, 11 years ago)

Refreshed patch, since the first didn't seemed to work

  • src/wp-includes/js/mce-view.js

     
    728728 * and a view for embeddable URLs.
    729729 */
    730730( function( window, views, $ ) {
    731         var postID = $( '#post_ID' ).val() || 0,
    732                 media, gallery, av, embed;
     731        var media, gallery, av, embed;
    733732
    734733        media = {
    735734                state: [],
     
    760759                template: wp.media.template( 'editor-gallery' ),
    761760
    762761                initialize: function() {
    763                         var attachments = wp.media.gallery.attachments( this.shortcode, postID ),
     762                        var attachments = wp.media.gallery.attachments( this.shortcode, wp.media.view.settings.post.id ),
    764763                                attrs = this.shortcode.attrs.named,
    765764                                self = this;
    766765
     
    805804                        }
    806805
    807806                        wp.ajax.post( this.action, {
    808                                 post_ID: postID,
     807                                post_ID: wp.media.view.settings.post.id,
    809808                                type: this.shortcode.tag,
    810809                                shortcode: this.shortcode.string()
    811810                        } )