]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/js/tinymce/plugins/wpview/plugin.js
WordPress 4.3.1
[autoinstalls/wordpress.git] / wp-includes / js / tinymce / plugins / wpview / plugin.js
index 44481941ae1eec55e35f2a88bbea2a6b314cde1b..9db30087e9928b4181f5297fb45005840e224f8c 100644 (file)
@@ -713,10 +713,12 @@ tinymce.PluginManager.add( 'wpview', function( editor ) {
        } );
 
        editor.once( 'preinit', function() {
-               toolbar = editor.wp._createToolbar( [
-                       'wp_view_edit',
-                       'wp_view_remove'
-               ] );
+               if ( editor.wp && editor.wp._createToolbar ) {
+                       toolbar = editor.wp._createToolbar( [
+                               'wp_view_edit',
+                               'wp_view_remove'
+                       ] );
+               }
        } );
 
        editor.on( 'wptoolbar', function( event ) {