mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Deprecate funky_javascript_fix() and it's callback. fixes #12520.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13988 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8681248856
commit
5f134c587e
@ -2459,4 +2459,44 @@ function get_profile( $field, $user = false ) {
|
||||
function get_usernumposts( $userid ) {
|
||||
_deprecated_function( __FUNCTION__, '3.0', 'count_user_posts()' );
|
||||
return count_user_posts( $userid );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback used to change %uXXXX to &#YYY; syntax
|
||||
*
|
||||
* @since 2.8.0
|
||||
* @access private
|
||||
* @deprecated 3.0.0
|
||||
*
|
||||
* @param array $matches Single Match
|
||||
* @return string An HTML entity
|
||||
*/
|
||||
function funky_javascript_callback($matches) {
|
||||
return "&#".base_convert($matches[1],16,10).";";
|
||||
}
|
||||
|
||||
/**
|
||||
* Fixes javascript bugs in browsers.
|
||||
*
|
||||
* Converts unicode characters to HTML numbered entities.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @uses $is_macIE
|
||||
* @uses $is_winIE
|
||||
* @deprecated 3.0.0
|
||||
*
|
||||
* @param string $text Text to be made safe.
|
||||
* @return string Fixed text.
|
||||
*/
|
||||
function funky_javascript_fix($text) {
|
||||
_deprecated_function( __FUNCTION__, '3.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;
|
||||
}
|
||||
|
@ -954,42 +954,6 @@ function convert_chars($content, $deprecated = '') {
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback used to change %uXXXX to &#YYY; syntax
|
||||
*
|
||||
* @since 2.8?
|
||||
*
|
||||
* @param array $matches Single Match
|
||||
* @return string An HTML entity
|
||||
*/
|
||||
function funky_javascript_callback($matches) {
|
||||
return "&#".base_convert($matches[1],16,10).";";
|
||||
}
|
||||
|
||||
/**
|
||||
* Fixes javascript bugs in browsers.
|
||||
*
|
||||
* Converts unicode characters to HTML numbered entities.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @uses $is_macIE
|
||||
* @uses $is_winIE
|
||||
*
|
||||
* @param string $text Text to be made safe.
|
||||
* @return string Fixed text.
|
||||
*/
|
||||
function funky_javascript_fix($text) {
|
||||
// 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Will only balance the tags if forced to and the option is set to balance tags.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user