clean_pre
函数
clean_pre ( $matches )
- 参数
-
-
(array|string)
$matches
The array or string- Required: 是
-
(array|string)
- 返回值
-
- (string) The pre block without paragraph/line break conversion.
- 定义位置
-
-
wp-includes/deprecated.php
, line 2968
-
wp-includes/deprecated.php
- 引入
- 1.2.0
- 弃用
- 3.4.0
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.
function clean_pre($matches) { _deprecated_function( __FUNCTION__, '3.4.0' ); if ( is_array($matches) ) $text = $matches[1] . $matches[2] . "
“;
else
$text = $matches;
$text = str_replace(array(‘
‘, ‘
‘, ‘
‘), array(”, ”, ”), $text);
$text = str_replace(‘
‘, “n”, $text);
$text = str_replace(‘
‘, ”, $text);
return $text;
}
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。