wpautop – disable tags, keep tags

wpautop can ignore the linkebreaks if you use wpautop( $content, false ); To pass a parameter to wpautop via add_filter, use an anonymous function.

This snippets seems to work for me if I add it to my theme’s functions.php:

remove_filter( 'the_content', 'wpautop' );
$br = false;
add_filter( 'the_content', function( $content ) use ( $br ) { 
    return wpautop( $content, $br ); 
}, 10 );