funky_javascript_fix() - WordPress 函数参考中文文档

返回介绍

funky_javascript_fix()

发布于 2017-09-10 字数1414 浏览 915 评论 0

Warning: This function has been deprecated.

funky_javascript_fix( string $text )

Fixes JavaScript bugs in browsers.


描述

Converts unicode characters to HTML numbered entities.


参数

$text

(string)
(Required)
Text to be made safe.


返回值

(string) Fixed text.


源代码

File: wp-includes/deprecated.php

function funky_javascript_fix($text) {
	_deprecated_function( __FUNCTION__, '3.0.0' );
	// Fixes for browsers' JavaScript bugs.
	global $is_macIE, $is_winIE;

	if ( $is_winIE || $is_macIE )
		$text =  preg_replace_callback("/\%u([0-9A-F]{4,4})/",
					"funky_javascript_callback",
					$text);

	return $text;
}

更新日志

Version 描述
3.0.0 This function has been deprecated.
1.5.0 Introduced.

相关函数

Uses

  • wp-includes/functions.php:
    _deprecated_function()

User Contributed Notes

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!