window.console.error('wpdialog.js is not loaded. Please set "wpdialogs" as dependency for your script when calling wp_enqueue_script(). You may also want to enqueue the "wp-jquery-ui-dialog" stylesheet.');
}
return;
}
wp.$element = $element = jQuery( '#' + args.id );
if ( ! $element.length ) {
return;
}
if ( window.console && window.console.log ) {
window.console.log('tinymce.WPWindowManager is deprecated. Use the default editor.windowManager to open dialogs with inline HTML.');
}
wp.features = args;
wp.params = params;
// Store selection. Takes a snapshot in the FocusManager of the selection before focus is moved to the dialog.
editor.nodeChanged();
// Create the dialog if necessary
if ( ! $element.data('wpdialog') ) {
$element.wpdialog({
title: args.title,
width: args.width,
height: args.height,
modal: true,
dialogClass: 'wp-dialog',
zIndex: 300000
});
}
$element.wpdialog('open');
$element.on( 'wpdialogclose', function() {
if ( self.wp.$element ) {
self.wp = {};
}
});
};
this.close = function() {
if ( ! this.wp.features || ! this.wp.features.wpDialog ) {