diff --git a/src/wp-includes/js/tinymce/plugins/wordpress/plugin.js b/src/wp-includes/js/tinymce/plugins/wordpress/plugin.js index 37d611a26d..08e3cf78c9 100644 --- a/src/wp-includes/js/tinymce/plugins/wordpress/plugin.js +++ b/src/wp-includes/js/tinymce/plugins/wordpress/plugin.js @@ -682,7 +682,6 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) { mceIframe = document.getElementById( editor.id + '_ifr' ), mceToolbar, mceStatusbar, - namesAdded, wpStatusbar; if ( container ) { @@ -700,7 +699,7 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) { buttonGroup; each( buttons, function( item ) { - var itemName, ui, name; + var itemName; function bindSelectorChanged() { var selection = editor.selection; @@ -768,19 +767,6 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) { buttonGroup = null; } else { - // Add the new WP* types to the factory - if ( ! namesAdded ) { - ui = tinymce.ui; - - for ( name in ui ) { - if ( name.toLowerCase().indexOf( 'wp' ) === 0 ) { - Factory.add( name, ui[name] ); - } - } - - namesAdded = true; - } - if ( ! buttonGroup ) { buttonGroup = { type: 'buttongroup', diff --git a/src/wp-includes/js/tinymce/plugins/wplink/plugin.js b/src/wp-includes/js/tinymce/plugins/wplink/plugin.js index 96357f2e9e..2aa1080b47 100644 --- a/src/wp-includes/js/tinymce/plugins/wplink/plugin.js +++ b/src/wp-includes/js/tinymce/plugins/wplink/plugin.js @@ -1,5 +1,5 @@ ( function( tinymce ) { - tinymce.ui.WPLinkPreview = tinymce.ui.Control.extend( { + tinymce.ui.Factory.add( 'WPLinkPreview', tinymce.ui.Control.extend( { url: '#', renderHtml: function() { return ( @@ -50,9 +50,9 @@ tinymce.$( this.getEl().firstChild ).attr( 'href', this.url ).text( url ); } } - } ); + } ) ); - tinymce.ui.WPLinkInput = tinymce.ui.Control.extend( { + tinymce.ui.Factory.add( 'WPLinkInput', tinymce.ui.Control.extend( { renderHtml: function() { return ( '