mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-29 12:37:57 +01:00
a908d2d4b1
See https://core.trac.wordpress.org/ticket/34272#comment:7 for full list of renamed functions and hooks. Props swissspidy. Fixes #34272. Built from https://develop.svn.wordpress.org/trunk@35235 git-svn-id: http://core.svn.wordpress.org/trunk@35201 1a063a9b-81f0-0310-95a4-ce76da25c4cd
18 lines
445 B
JavaScript
18 lines
445 B
JavaScript
(function ( tinymce ) {
|
|
'use strict';
|
|
|
|
tinymce.PluginManager.add( 'wpoembed', function ( editor, url ) {
|
|
editor.on( 'init', function () {
|
|
var scriptId = editor.dom.uniqueId();
|
|
|
|
var scriptElm = editor.dom.create( 'script', {
|
|
id: scriptId,
|
|
type: 'text/javascript',
|
|
src: url + '/../../../wp-embed.js'
|
|
} );
|
|
|
|
editor.getDoc().getElementsByTagName( 'head' )[ 0 ].appendChild( scriptElm );
|
|
} );
|
|
} );
|
|
})( window.tinymce );
|