clean_pre()
最后更新于:2021-11-25 20:34:31
clean_pre( array|string$matches)Accepts matches array from preg_replace_callback in gcautop() or a string.
参数
- $matches
-
(array|string) (Required) The array or string
响应
(string) The pre block without paragraph/line break conversion.
源文件
文件: gc-includes/deprecated.php
function clean_pre($matches) {
_deprecated_function( __FUNCTION__, '3.4.0' );
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;
}