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



wp_kses_decode_entities ›

Desde1.0.0
Obsoleton/a
wp_kses_decode_entities ( $string )
Parâmetros:
  • (string) $string Content to change entities.
    Required: Yes
Retorna:
  • (string) Content after decoded entities.
Definido em:
Codex:

Converts all numeric HTML entities to their named counterparts.

This function decodes numeric HTML entities (A and A). It doesn't do anything with named entities like ä, but we don't need them in the URL protocol whitelisting system anyway.



Fonte

function wp_kses_decode_entities( $string ) {
	$string = preg_replace_callback( '/&#([0-9]+);/', '_wp_kses_decode_entities_chr', $string );
	$string = preg_replace_callback( '/&#[Xx]([0-9A-Fa-f]+);/', '_wp_kses_decode_entities_chr_hexdec', $string );

	return $string;
}