百度 | 神马 | 搜狗 | 技术文档 | 学习资料分享 - 记录帝国CMS及运维技术的点点滴滴
你的位置:首页 > 实用IT技术 » 正文

【Wordpress相关】WordPress 常用函数 / wptexturize

发布时间:2020-09-17

WordPress 常用函数 / wptexturize,

简介

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

用法

<?php wptexturize( $text ); ?>

参数

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

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script>

返回值

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

修改记录

Since: 0.71

源文件

wp-includes/formatting.php

Top