Commit d1276166 authored by Olivier van Helden's avatar Olivier van Helden
Browse files

replace line breaks with spaces

parent 604e288e
......@@ -24,7 +24,7 @@ add_action( 'load-edit.php', function()
{
$post = get_post();
if( is_a( $post, '\WP_Post' ) && ! $post->post_title && $post->post_content )
$title = wp_trim_words( strip_shortcodes( strip_tags( $post->post_content ) ), 10 );
$title = wp_trim_words( strip_shortcodes( strip_tags( wpautop ( preg_replace('/\n|<br>|<p>/i', ' ', $post->post_content ), false ) ) ), 10 );
return $title;
} );
} );
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment