1

allowed_tags()関数の仕組みと、それが wordpress.org ページに記載されていない理由を知る必要があります。この機能は非推奨ですか、それとも何ですか? また、ユーザーがコメントで使用できるタグを表示するために使用することをお勧めしますか?...

4

1 に答える 1

1
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);
}
于 2013-09-20T17:16:30.017 に答える