filter_block_content


filter_block_content ( $text, $allowed_html = 'post', $allowed_protocols = array() )

Parameters:
  • (string) text Text that may contain block content.
  • (array[]|string) allowed_html An array of allowed HTML elements and attributes, or a context name such as 'post'.
  • (string[]) allowed_protocols Array of allowed URL protocols.
Returns:
  • (string) The filtered and sanitized content result.
Defined at:

Description

Filters and sanitizes block content to remove non-allowable HTML from parsed block attribute values.

Related Functions

filter_block_kses, register_block_pattern, wp_filter_content_tags, register_block_type, register_block_style

Top Google Results

User discussions

wpseek mobile