unescape_invalid_shortcodes

函数
unescape_invalid_shortcodes ( $content )
参数
  • (string) $content Content to search for placeholders.
    Required:
返回值
  • (string) Content with placeholders removed.
定义位置
相关方法
wp_video_shortcoderemove_all_shortcodesapply_shortcodesimg_caption_shortcodewp_playlist_shortcode
引入
4.2.3
弃用
-

unescape_invalid_shortcodes: 这个函数从一个给定的内容字符串中删除无效的或不安全的短码标签。它需要一个参数,$content,这是要清除的内容。

删除由do_shortcodes_in_html_tags()添加的占位符。

function unescape_invalid_shortcodes( $content ) {
	// Clean up entire string, avoids re-parsing HTML.
	$trans = array(
		'[' => '[',
		']' => ']',
	);

	$content = strtr( $content, $trans );

	return $content;
}

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-14 09:36:28

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: