convert_chars()
最后更新于:2021-11-25 21:51:21
convert_chars( string$content, string$deprecated=”)Converts lone & characters into &
(a.k.a. &
)
参数
- $content
-
(string) (Required) String of characters to be converted.
- $deprecated
-
(string) (Optional) Not used.
Default value: ”
响应
(string) Converted string.
源文件
文件: gc-includes/formatting.php
function convert_chars( $content, $deprecated = '' ) {
if ( ! empty( $deprecated ) ) {
_deprecated_argument( __FUNCTION__, '0.71' );
}
if ( strpos( $content, '&' ) !== false ) {
$content = preg_replace( '/&([^#])(?![a-z1-4]{1,8};)/i', '&$1', $content );
}
return $content;
}