WordPress的 wptexturize 函数,会将文本中的一些字符转译,下面是一些转译对照表。
这样,我们输入的信息就会被转译为其他信息了,如果要将这个转译功能禁用掉,可以在WordPress主题的 functions.php 文件中加入:
remove_filter('the_content', 'wptexturize'); remove_filter('the_excerpt', 'wptexturize'); remove_filter('comment_text', 'wptexturize');
加入之后,在文章、简介和评论里面,字符就不会被 wptexturize 转译了。