wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



allowed_tags › WordPress Function

Seit1.0.1
Veraltetn/v
allowed_tags ( Keine Parameter )
Gibt zurück:
  • (string) HTML allowed tags entity encoded.
Definiert in:
Codex:
Changelog:
  • 4.4.0

Displays all of the allowed tags in HTML format with attributes.

This is useful for displaying in the comment area, which elements and attributes are supported. As well as any plugins which want to display it.


Quellcode

function allowed_tags() {
	global $allowedtags;
	$allowed = '';
	foreach ( (array) $allowedtags as $tag => $attributes ) {
		$allowed .= '<' . $tag;
		if ( 0 < count( $attributes ) ) {
			foreach ( $attributes as $attribute => $limits ) {
				$allowed .= ' ' . $attribute . '=""';
			}
		}
		$allowed .= '> ';
	}
	return htmlentities( $allowed );
}