TinyMCE: fix 3.x callbacks added with init.setup as they run before the compat3x plugin is loaded. Ideally this will be fixed internally in TinyMCE, see #24067.

Built from https://develop.svn.wordpress.org/trunk@26982


git-svn-id: http://core.svn.wordpress.org/trunk@26859 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2014-01-18 22:20:12 +00:00
parent 5ee0b5641e
commit ec5288d405
1 changed files with 6 additions and 0 deletions

View File

@ -447,6 +447,12 @@ final class _WP_Editors {
$mceInit['toolbar4'] = '';
}
// Fix 3.x callbacks added with init.setup
if ( ! empty( $mceInit['setup'] ) ) {
$func = $mceInit['setup'];
$mceInit['setup'] = "function( editor ) { editor.on( 'PreInit', function(){ ($func).call( this, editor ); }); }";
}
self::$mce_settings[$editor_id] = $mceInit;
} // end if self::$this_tinymce
}