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



wp_kses_normalize_entities2 ›

Desde1.0.0
Obsoleton/a
wp_kses_normalize_entities2 ( $matches )
Acesso:
  • private
Parâmetros:
  • (array) $matches preg_replace_callback() matches array
    Required: Yes
Retorna:
  • (string) Correctly encoded entity
Definido em:
Codex:

Callback for wp_kses_normalize_entities() regular expression.

This function helps wp_kses_normalize_entities() to only accept 16-bit values and nothing more for &#number; entities.



Fonte

function wp_kses_normalize_entities2($matches) {
	if ( empty($matches[1]) )
		return '';

	$i = $matches[1];
	if (valid_unicode($i)) {
		$i = str_pad(ltrim($i,'0'), 3, '0', STR_PAD_LEFT);
		$i = "&#$i;";
	} else {
		$i = "&#$i;";
	}

	return $i;
}