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:
parent
f2d4a6aa36
commit
ae49162491
@ -447,6 +447,12 @@ final class _WP_Editors {
|
|||||||
$mceInit['toolbar4'] = '';
|
$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;
|
self::$mce_settings[$editor_id] = $mceInit;
|
||||||
} // end if self::$this_tinymce
|
} // end if self::$this_tinymce
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user