Codex

Function Reference/wpautop

Contents

Description

Changes double line-breaks in the text into HTML paragraphs (<p>...</p>).

Wordpress uses it to filter the content and the excerpt.

Usage

 <?php wpautop$pee$br ); ?> 

Parameters

pee 
(string) The text to be formatted.
br 
(boolean) Preserve line breaks. When set to true, any line breaks remaining after paragraph conversion are converted to HTML <br />. Line breaks within script and style sections are not affected. Default true.

>> It this is accurate, then why ohhhhh why are so many folk in so many places talking about <br /> being stripped? Docs out of step w/reality ... not a good sign. << --bentrem 05:09, 27 December 2007 (UTC)

References

http://photomatt.net/scripts/autop/

This article is marked as in need of editing. You can help Codex by editing it.