filter_block_kses_value
filter_block_kses_value ( $value, $allowed_html, $allowed_protocols = array(), $block_context = null )
Parameters:- (string[]|string) value The attribute value to filter.
- (array[]|string) allowed_html An array of allowed HTML elements and attributes, or a context name such as 'post'. See wp_kses_allowed_html() for the list of accepted context names.
- (string[]) allowed_protocols Optional. Array of allowed URL protocols. Defaults to the result of wp_allowed_protocols().
- (array) block_context Optional. The block the attribute belongs to, in parsed block array format.
Returns:- (string[]|string) The filtered and sanitized result.
Defined at:Change Log: - Introduced in WordPress: 5.3.1
- Deprecated in WordPress: —
Description
Filters and sanitizes a parsed block attribute value to remove
non-allowable HTML.