Trying to remove the WYSIWYG Editor on all post types except the default pages and posts.
Shouldn’t this work
// Remove WYSIWYG Editor
function remove_wysiwyg( $hook ) {
if ( $hook != 'post-new.php' || $hook != 'post.php' )
add_filter('user_can_richedit', '__return_false');
}
add_action( 'init', 'remove_wysiwyg' );
A bit involved, but this should work:
You should look for the post type in the URL or the type of the post itself, and you can be more specific and run the code for only admin sessions