Advertisements

allowed_tags

Display 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.

Return values

returns:HTML allowed tags entity encoded.

Source code

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);

}

525

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: