WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/clean pre

Description

Accepts matches array from preg_replace_callback in wpautop() or a string.

Ensures that the contents of a <pre>...</pre> HTML block are not converted into paragraphs or line-breaks.

Usage

<?php clean_pre$matches ?>

Parameters

$matches
(array|string) (required) The array or string
Default: None

Return Values

(string) 
The pre block without paragraph/line-break conversion.

Examples

Notes

  • Note: If $matches is an array the array values are concatenated into a string.

Change Log

Since: 1.2.0

Source File

clean_pre() is located in wp-includes/formatting.php.

Related

See also index of Function Reference and index of Template Tags.