Hi @swedish-boy
Previous post: https://wordpress.org/support/topic/no-way-of-disabling-the-tinymce-editor-added-to-description-on-term-php-screen/
There aren’t filter for this (also, you can’t get instance of object WPSEO_Taxonomy). If you set taxonomy as private, then Yoast SEO doesn’t show metabox/description editor. From other side, there are bug related to it – https://wordpress.org/support/topic/error-in-taxonomy-with-set-public-is-false/
It could be feature request, so you can create a new feature request at https://github.com/Yoast/wordpress-seo/issues/new.
I just found filter into WP core:
https://developer.wordpress.org/reference/hooks/wp_editor_settings/
So, it’s possible to “customize” wp editor. I mean, it’s possible to remove html. Something like this:
function my_taxonomy_editor_settings( $settings, $editor_id ) {
if ( $editor_id == 'description' ) {
$settings[ 'tinymce' ] = false;
$settings[ 'wpautop' ] = false;
$settings[ 'media_buttons' ] = false;
$settings[ 'quicktags' ] = false;
$settings[ 'default_editor' ] = '';
}
return $settings;
}
add_filter( 'wp_editor_settings', 'my_taxonomy_editor_settings', 10, 2 );
I didn’t test this and I don’t know for side effects. Maybe, you need to add additional condition as:
WPSEO_Taxonomy::is_term_edit( $GLOBALS['pagenow'] )
or something similar based on $pagenow
I hope that helps.
Sasa
Thank you for your answers. The later is actually a solution I for some reason didn’t think of. It of course is possible to disable tinyMCE completely with wp-hooks for a specific section. 🙂
But this topic is still not resolved!!!