clean_pre [ WordPress Function ]
clean_pre ( $matches )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Accepts matches array from preg_replace_callback in wpautop() or a string.
Ensures that the contents of a <
>...<
HTML block are not converted into paragraphs or line-breaks.
Source
<?php
function clean_pre($matches) {
_deprecated_function( __FUNCTION__, '3.4' );
if ( is_array($matches) )
$text = $matches[1] . $matches[2] . "</pre>";
else
$text = $matches;
$text = str_replace(array('<br />', '<br/>', '<br>'), array('', '', ''), $text);
$text = str_replace('<p>', "\n", $text);
$text = str_replace('</p>', '', $text);
return $text;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Function Reference/clean pre « WordPress Codex
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 ...
codex.wordpress.org - clean_pre() WordPress function reference, arguments and source at ...
Accepts matches array from preg_replace_callback in wpautop() or a string.
queryposts.com - Wordpress: Disable Auto Paragraphing, wpautop() and clean_pre ...
Feb 6, 2011 ... Even though Geshi was working great with HTML characters, WordPress's wpautop() and clean_pre() were changing my php code which ...
emrahgunduz.com - clean_pre (WordPress Function) - WPSeek.com
WordPress lookup for clean_pre, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers and theme authors.
wpseek.com