wp_kses_allowed_html WordPress Filter Hook

The wp_kses_allowed_html hook is used to filter the allowed HTML elements and attributes that are allowed by the kses security filtering system. This hook can be used to add or remove allowed HTML elements and attributes.

apply_filters( 'wp_kses_allowed_html', array[] $html, string $context ) #

Filters the HTML tags that are allowed for a given context.


Description

HTML tags and attribute names are case-insensitive in HTML but must be added to the KSES allow list in lowercase. An item added to the allow list in upper or mixed case will not recognized as permitted by KSES.


Top ↑

Parameters

$html

(array[])Allowed HTML tags.

$context

(string)Context name.


Top ↑

Source

File: wp-includes/kses.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.