WordPress.org

Make WordPress Core

Ticket #30608: media-manager-iframe-cleanup.diff

File media-manager-iframe-cleanup.diff, 714 bytes (added by mcsf, 6 years ago)
  • wp-includes/js/media-views.js

    diff --git a/wp-includes/js/media-views.js b/wp-includes/js/media-views.js
    index 8465281..af3fe01 100644
    a b  
    23952395                        }, this );
    23962396
    23972397                        this.on( 'content:create:iframe', this.iframeContent, this );
     2398                        this.on( 'content:deactivate:iframe', this.iframeContentCleanup, this );
    23982399                        this.on( 'menu:render:default', this.iframeMenu, this );
    23992400                        this.on( 'open', this.hijackThickbox, this );
    24002401                        this.on( 'close', this.restoreThickbox, this );
     
    24112412                        });
    24122413                },
    24132414
     2415                iframeContentCleanup: function( content ) {
     2416                        this.$el.removeClass('hide-toolbar');
     2417                },
     2418
    24142419                iframeMenu: function( view ) {
    24152420                        var views = {};
    24162421