函数原型
allowed_tags(): string
函数描述
Displays all of the allowed tags in HTML format with attributes.
是否弃用
未弃用
函数参数
无
函数返回值
string HTML allowed tags entity encoded.
函数位置
File: wp-includes/general-template.php.
函数源码
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 );
}
源码链接
变更日志
| Version | Description |
|---|---|
| 4.4.0 | No longer used in core. |
| 1.0.1 | Introduced. |

