Switch language

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




wp_kses_normalize_entities3 [ WordPress Function ]

wp_kses_normalize_entities3 ( $matches )
Access:
  • private
Parameters:
  • (array) $matches preg_replace_callback() matches array
Returns:
  • (string) Correctly encoded entity
Defined at:



Callback for wp_kses_normalize_entities() for regular expression.

This function helps wp_kses_normalize_entities() to only accept valid Unicode numeric entities in hex form.

Source


<?php
function wp_kses_normalize_entities3($matches) {
    if ( empty(
$matches[1]) )
        return 
'';

    
$hexchars $matches[1];
    return ( ( ! 
valid_unicode(hexdec($hexchars)) ) ? "&amp;#x$hexchars;" '&#x'.ltrim($hexchars,'0').';' );
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



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