TinyMCE: fix initializing TinyMCE when the default editor in getUserSetting() is overridden from PHP by using the 'wp_default_editor' filter. See #24067.
git-svn-id: https://develop.svn.wordpress.org/trunk@27004 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
db64b3d951
commit
5aa4902c7d
|
@ -796,7 +796,7 @@ final class _WP_Editors {
|
|||
?>
|
||||
|
||||
( function() {
|
||||
var init, edId, qtId, firstInit,
|
||||
var init, edId, qtId, firstInit, override,
|
||||
loadMCE = typeof getUserSetting !== 'undefined' ? getUserSetting( 'editor' ) === 'tinymce' : true;
|
||||
|
||||
if ( typeof quicktags !== 'undefined' ) {
|
||||
|
@ -813,7 +813,10 @@ final class _WP_Editors {
|
|||
init = firstInit = tinyMCEPreInit.mceInit[edId];
|
||||
}
|
||||
|
||||
if ( ( loadMCE || ! tinyMCEPreInit.qtInit.hasOwnProperty( edId ) ) && ! init.wp_skip_init ) {
|
||||
override = tinymce.DOM.hasClass( tinymce.DOM.select( '#wp-' + edId + '-wrap' )[0], 'tmce-active' );
|
||||
override = override || ! tinyMCEPreInit.qtInit.hasOwnProperty( edId );
|
||||
|
||||
if ( ( loadMCE || override ) && ! init.wp_skip_init ) {
|
||||
try { tinymce.init( init ); } catch(e){}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue