今天客户的网【wǎng】站【zhàn】刚用到的,记录一下,以后就【jiù】知【zhī】道了【le】。菜单选项【xiàng】的转义用the_title即可解决【jué】。
WordPress 模式使用了 wptexturize函数将纯文本【běn】字符转换【huàn】成格【gé】式化【huà】的 HTML 实体。
标签 <pre>, <code>, <kbd>, <style>, <script>和<tt>中的文本【běn】被忽【hū】略。
对于一【yī】般写单【dān】纯码文字【zì】的人【rén】来【lái】说,这个自动将英文半角符号转换成全角符号【hào】,是很方便【biàn】、智能。
但如果你经常要粘贴一【yī】些代码,而且没【méi】有使用专门【mén】的代码【mǎ】高亮插件【jiàn】,你会【huì】发现【xiàn】,你代【dài】码中的半【bàn】角符号都会被转换【huàn】成全角了!别【bié】人复制后,根本没办法直接使用!
禁止字符【fú】转义的所有代码如下,你可以根【gēn】据自己【jǐ】的需【xū】要,选自【zì】己【jǐ】要的代【dài】码,添加到【dào】主题的 functions.php 文件:
当然,你还可以将上面的代码分别下面的形式:
如【rú】果不想修【xiū】改代码的,直接下载安【ān】装 Quotmarks Replacer 插【chā】件。
相关文件下载地址 城通网盘下载 下载资源版权【quán】归作者所有【yǒu】;本站所有资源均来【lái】源【yuán】于网络【luò】,仅供【gòng】学习使【shǐ】用,请支【zhī】持正版!版权所有:深圳市网商在线科技有限公司