wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



wp_kses_decode_entities › WordPress Function

Od1.0.0
Przestarzałyn/a
wp_kses_decode_entities ( $content )
Parametry:
  • (string) $content Content to change entities.
    Wymagane: Tak
Powrót:
  • (string) Content after decoded entities.
Zdefiniowane na:
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 allowed URL protocols system anyway.


Źródło

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

	return $content;
}