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.

git-svn-id: https://develop.svn.wordpress.org/trunk@26982 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2014-01-18 22:19:07 +00:00
parent f2d4a6aa36
commit ae49162491
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
}