[wp-trac] [WordPress Trac] #32513: Disabling WYSIWYG tab via the wp_editor_settings filter breaks the editor if it contains a textarea tag
WordPress Trac
noreply at wordpress.org
Thu Jun 4 18:20:10 UTC 2015
#32513: Disabling WYSIWYG tab via the wp_editor_settings filter breaks the editor
if it contains a textarea tag
--------------------------+------------------------------
Reporter: andruxnet | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: 4.2.2
Severity: normal | Resolution:
Keywords: | Focuses: administration
--------------------------+------------------------------
Changes (by andruxnet):
* keywords: reporter-feedback =>
Comment:
Sure, here it is.
{{{
function disable_visual_tab( $settings, $editor_id ) {
global $post;
if ( get_post_type( $post ) === 'form' ) {
if ( $editor_id === 'content' ) {
$settings['tinymce'] = false;
}
}
return $settings;
}
add_filter( 'wp_editor_settings', 'disable_visual_tab', 10, 2 );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32513#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list