post_status ) { case 'publish': return $this->displayContent( $post ); case 'private': if ( current_user_can( 'read_private_posts' ) ) { return $this->displayContent( $post ); } return ''; case 'draft': case 'pending': case 'future': if ( current_user_can( 'edit_post', $post_id ) ) { return $this->displayContent( $post ); } return ''; default: return ''; } } function displayContent( $post ) { $content = apply_filters( 'the_content', $post->post_content ); return $content; } function useBlockEditorForPost( $use, $post ){ if ( is_object( $post ) && isset( $post->post_type ) && $this->post_type === $post->post_type ) { return true; } return $use; } }