Warning: This function has been deprecated.

funky_javascript_fix() WordPress Function

The funky_javascript_fix() function is a quick and easy way to fix any JavaScript errors on your WordPress site. Simply add the following line of code to your wp-config.php file: define('WP_DEBUG', true); That's it! WP_DEBUG will take care of the rest.

funky_javascript_fix( string $text ) #

Fixes JavaScript bugs in browsers.


Description

Converts unicode characters to HTML numbered entities.


Top ↑

Parameters

$text

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


Top ↑

Return

(string) Fixed text.


Top ↑

Source

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;
}


Top ↑

Changelog

Changelog
VersionDescription
3.0.0This function has been deprecated.
1.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More