wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



funky_javascript_fix › WordPress Function

Desde1.5.0
Obsoleto3.0.0
funky_javascript_fix ( $text )
Parâmetros:
  • (string) $text Text to be made safe.
    Required: Yes
Retorna:
  • (string) Fixed text.
Definido em:
Codex:

Fixes JavaScript bugs in browsers.

Converts unicode characters to HTML numbered entities.


Fonte

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