Changes double line-breaks in the text into HTML paragraphs (<p>...</p>).
<?php wpautop( $foo, $br ); ?>
<?php $some_long_text = // Start Text Some long text that has many lines and paragraphs in it. // end text echo wpautop( $some_long_text ); ?>
This should echo the string with <p> tags around the paragraphs, like this:
<p>Some long text<br/> that has many lines</p> <p>and paragraphs in it.</p>
Some people choose to disable the wpautop filter from within their theme's functions.php:
remove_filter( 'the_content', 'wpautop' ); remove_filter( 'the_excerpt', 'wpautop' );
There's also a plugin available to enable/disable the filter on a post-by-post basis.
wpautop() is located in