Core Function
View Source on Trac ↗ wpautop()
wpautop( mixed $text, mixed $br = true ) Replaces double line breaks with paragraph elements.
Parameters 2 required
| Name / Type | Description |
|---|---|
| $text string | The text which has to be formatted. Required |
| bool | $br Optional. If set, this will convert all remaining line breaks after paragraphing. Line breaks within `<script>`, `<style>`, and `<svg>` tags are not affected. Default true. Required |
Return Value
(string)
Text which has been converted into correct paragraph tags.
Function Information
Since Version
0.71
Source File
wp-includes/formatting.php
Advertisement