If you’re using custom metaboxes for all the post’s content, you may want to hide the editor for a cleaner editing experience. But what about the old content that still uses the editor? This code only hides the main editor once it is empty (once the metaboxes are the only sources of content).
/**
* Hide empty editor on posts
*
*/
function ea_hide_empty_editor() {
$screen = get_current_screen();
if( $screen->id !== 'post' )
return;
$hide = true;
if( isset( $_GET['post'] ) && !empty( get_post( $_GET['post'] )->post_content ) ) {
$hide = false;
}
if( $hide ) {
remove_post_type_support( 'post', 'editor' );
}
}
add_action( 'admin_head', 'ea_hide_empty_editor' );