wpseek.com
WordPress开发者和主题制作者的搜索引擎



allowed_tags › WordPress Function

Since1.0.1
已弃用n/a
allowed_tags ( 没有参数 )
返回:
  • (string) HTML allowed tags entity encoded.
定义在:
文档:
Change Log:
  • 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.


源码

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