WordPress 常用函数 / wptexturize

将纯文本字符转换成格式化的 HTML 实体。
<PRE>,<CODE>,<kbd>,<STYLE>,<script>和<tt>中的文本被忽略。

<?php wptexturize( $text ); ?>

$text
(string) (required) 将被格式化的文本
Default: None

(string)
被替换成HTML数字实体字符的文本。

开启和关闭引号将在 WordPress 翻译文件中被定义,下面是 wptexturize 做的转换。


扫码关注公众号,回复「PP5679」获取文章密码。

Since: 0.71

wp-includes/formatting.php