diff --git src/wp-includes/class-wp-editor.php src/wp-includes/class-wp-editor.php
index 9a67a48..50e3b94 100644
|
|
|
final class _WP_Editors { |
| 402 | 402 | 'wpdialogs', |
| 403 | 403 | 'wptextpattern', |
| 404 | 404 | 'wpview', |
| 405 | | 'wpoembed', |
| | 405 | 'wpembed', |
| 406 | 406 | ); |
| 407 | 407 | |
| 408 | 408 | if ( ! self::$has_medialib ) { |
diff --git src/wp-includes/js/tinymce/plugins/wpembed/plugin.js src/wp-includes/js/tinymce/plugins/wpembed/plugin.js
new file mode 100644
index 0000000..b6efbc9
|
-
|
+
|
|
| | 1 | (function ( tinymce ) { |
| | 2 | 'use strict'; |
| | 3 | |
| | 4 | tinymce.PluginManager.add( 'wpembed', function ( editor, url ) { |
| | 5 | editor.on( 'init', function () { |
| | 6 | var scriptId = editor.dom.uniqueId(); |
| | 7 | |
| | 8 | var scriptElm = editor.dom.create( 'script', { |
| | 9 | id: scriptId, |
| | 10 | type: 'text/javascript', |
| | 11 | src: url + '/../../../wp-embed.js' |
| | 12 | } ); |
| | 13 | |
| | 14 | editor.getDoc().getElementsByTagName( 'head' )[ 0 ].appendChild( scriptElm ); |
| | 15 | } ); |
| | 16 | } ); |
| | 17 | })( window.tinymce ); |