删除do_shortcodes_in_html_tags()添加的占位符。
原型
unescape_invalid_shortcodes( string $content )
参数
$content
(string)
(Required)
用于搜索占位符的内容。
返回值
(string)
已删除占位符的内容。
源文件
路径:wp-includes/shortcodes.php
<?php
...
function unescape_invalid_shortcodes( $content ) {
// Clean up entire string, avoids re-parsing HTML.
$trans = array( '[' => '[', ']' => ']' );
$content = strtr( $content, $trans );
return $content;
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/unescape_invalid_shortcodes/