diff --git a/wp-includes/class-wp-editor.php b/wp-includes/class-wp-editor.php index e62762363d..2b2b343886 100644 --- a/wp-includes/class-wp-editor.php +++ b/wp-includes/class-wp-editor.php @@ -733,6 +733,15 @@ final class _WP_Editors { add_thickbox(); wp_enqueue_script('media-upload'); } + + /** + * Fires when scripts and styles are enqueued for the editor + * + * @since 3.9.0 + * + * @param array An array containing boolean values whether TinyMCE and Quicktags are being loaded. + */ + do_action( 'wp_enqueue_editor', array( 'tinymce' => self::$has_tinymce, 'quicktags' => self::$has_quicktags ) ); } public static function wp_mce_translation() { diff --git a/wp-includes/js/tinymce/plugins/wpdialogs/plugin.js b/wp-includes/js/tinymce/plugins/wpdialogs/plugin.js index fef6aa079d..cd805f04b0 100644 --- a/wp-includes/js/tinymce/plugins/wpdialogs/plugin.js +++ b/wp-includes/js/tinymce/plugins/wpdialogs/plugin.js @@ -30,9 +30,9 @@ tinymce.WPWindowManager = tinymce.InlineWindowManager = function( editor ) { } if ( typeof jQuery === 'undefined' || ! jQuery.wp || ! jQuery.wp.wpdialog ) { - // wpdialod.js is not loaded + // wpdialog.js is not loaded if ( window.console && window.console.error ) { - window.console.error('wpdialog.js is not loaded. Please set it as dependency for your script when calling wp_enqueue_script().'); + 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; diff --git a/wp-includes/js/tinymce/plugins/wpdialogs/plugin.min.js b/wp-includes/js/tinymce/plugins/wpdialogs/plugin.min.js index 2670cbb5b3..f7e42105bb 100644 --- a/wp-includes/js/tinymce/plugins/wpdialogs/plugin.min.js +++ b/wp-includes/js/tinymce/plugins/wpdialogs/plugin.min.js @@ -1 +1 @@ -tinymce.WPWindowManager=tinymce.InlineWindowManager=function(a){return this.wp?this:(this.wp={},this.parent=a.windowManager,this.editor=a,tinymce.extend(this,this.parent),this.open=function(b,c){var d,e=this,f=this.wp;if(!b.wpDialog)return this.parent.open.apply(this,arguments);if(b.id){if("undefined"==typeof jQuery||!jQuery.wp||!jQuery.wp.wpdialog)return void(window.console&&window.console.error&&window.console.error("wpdialog.js is not loaded. Please set it as dependency for your script when calling wp_enqueue_script()."));f.$element=d=jQuery("#"+b.id),d.length&&(window.console&&window.console.log&&window.console.log("tinymce.WPWindowManager is deprecated. Use the default editor.windowManager to open dialogs with inline HTML."),f.features=b,f.params=c,a.nodeChanged(),d.data("wpdialog")||d.wpdialog({title:b.title,width:b.width,height:b.height,modal:!0,dialogClass:"wp-dialog",zIndex:3e5}),d.wpdialog("open"),d.on("wpdialogclose",function(){e.wp.$element&&(e.wp={})}))}},void(this.close=function(){return this.wp.features&&this.wp.features.wpDialog?void this.wp.$element.wpdialog("close"):this.parent.close.apply(this,arguments)}))},tinymce.PluginManager.add("wpdialogs",function(a){a.on("init",function(){a.windowManager=new tinymce.WPWindowManager(a)})}); \ No newline at end of file +tinymce.WPWindowManager=tinymce.InlineWindowManager=function(a){return this.wp?this:(this.wp={},this.parent=a.windowManager,this.editor=a,tinymce.extend(this,this.parent),this.open=function(b,c){var d,e=this,f=this.wp;if(!b.wpDialog)return this.parent.open.apply(this,arguments);if(b.id){if("undefined"==typeof jQuery||!jQuery.wp||!jQuery.wp.wpdialog)return void(window.console&&window.console.error&&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."));f.$element=d=jQuery("#"+b.id),d.length&&(window.console&&window.console.log&&window.console.log("tinymce.WPWindowManager is deprecated. Use the default editor.windowManager to open dialogs with inline HTML."),f.features=b,f.params=c,a.nodeChanged(),d.data("wpdialog")||d.wpdialog({title:b.title,width:b.width,height:b.height,modal:!0,dialogClass:"wp-dialog",zIndex:3e5}),d.wpdialog("open"),d.on("wpdialogclose",function(){e.wp.$element&&(e.wp={})}))}},void(this.close=function(){return this.wp.features&&this.wp.features.wpDialog?void this.wp.$element.wpdialog("close"):this.parent.close.apply(this,arguments)}))},tinymce.PluginManager.add("wpdialogs",function(a){a.on("init",function(){a.windowManager=new tinymce.WPWindowManager(a)})}); \ No newline at end of file diff --git a/wp-includes/js/tinymce/wp-tinymce.js.gz b/wp-includes/js/tinymce/wp-tinymce.js.gz index 592167dc5c..28fbbb5a64 100644 Binary files a/wp-includes/js/tinymce/wp-tinymce.js.gz and b/wp-includes/js/tinymce/wp-tinymce.js.gz differ