Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




funky_javascript_fix [ WordPress Function ]

funky_javascript_fix ( $text )
Parameters:
  • (string) $text Text to be made safe.
Uses:
  • $is_macIE
  • $is_winIE
Returns:
  • (string) Fixed text.
Defined at:



Fixes javascript bugs in browsers.

Converts unicode characters to HTML numbered entities.

Source


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

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics