WordPress.org

Make WordPress Core

Ticket #6864: media-upload.patch

File media-upload.patch, 584 bytes (added by azaozz, 10 years ago)
  • media-upload.js

     
    11// send html to the post editor
    22function send_to_editor(h) {
    3         var win = window.opener ? window.opener : window.dialogArguments;
    4         if ( !win )
    5                 win = top;
     3        var win = window.dialogArguments || opener || parent || top;
     4
    65        tinyMCE = win.tinyMCE;
    76        if ( typeof tinyMCE != 'undefined' && ( ed = tinyMCE.getInstanceById('content') ) && !ed.isHidden() ) {
    87                tinyMCE.selectedInstance.getWin().focus();