wpautop


wpautop ( $text, $br = true )

Parameters:
  • (string) text The text which has to be formatted.
  • (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.
Returns:
  • (string) Text which has been converted into correct paragraph tags.
Defined at:

Description

Replaces double line breaks with paragraph elements.A group of regex replaces used to identify text formatted with newlines and replace double line breaks with HTML paragraph tags. The remaining line breaks after conversion become `
` tags, unless `$br` is set to '0' or 'false'.

Related Functions

wp_autosave, wp_date, wp_salt, wp_list_authors, wp_generator

Top Google Results

User discussions

wpseek mobile