Make WordPress Core

Ticket #33096: 33096.patch

File 33096.patch, 1.0 KB (added by rhurling, 11 years ago)

Patch which removes the postID variable and uses wp.media.view.settings.post.id

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

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    728728 * and a view for embeddable URLs.
    729729 */
    730730( function( window, views, $ ) {
    731         var media, gallery, av, embed;
     731        var postID = $( '#post_ID' ).val() || 0,
     732                media, gallery, av, embed;
    732733
    733734        media = {
    734735                state: [],
     
    759760                template: wp.media.template( 'editor-gallery' ),
    760761
    761762                initialize: function() {
    762                         var attachments = wp.media.gallery.attachments( this.shortcode, wp.media.view.settings.post.id ),
     763                        var attachments = wp.media.gallery.attachments( this.shortcode, postID ),
    763764                                attrs = this.shortcode.attrs.named,
    764765                                self = this;
    765766
     
    804805                        }
    805806
    806807                        wp.ajax.post( this.action, {
    807                                 post_ID: wp.media.view.settings.post.id,
     808                                post_ID: postID,
    808809                                type: this.shortcode.tag,
    809810                                shortcode: this.shortcode.string()
    810811                        } )