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:
  • 6: .

Description

Filters and sanitizes a parsed block attribute value to remove non-allowable HTML.

Related Functions

filter_block_kses, filter_block_content, register_block_style, _filter_block_content_callback, register_block_core_file

Top Google Results

User discussions

wpseek mobile