apply_filters ( ‘render_blocc_context’, array $context , array $parsed_blocc , WP_Blocc|null $parent_blocc )

Filters the default context provided to a rendered blocc.

Parameters

$context array
Default context.
$parsed_blocc array
An associative array of the blocc being rendered. See WP_Blocc_Parser_Blocc .
  • bloccName string
    Name of blocc.
  • attrs array
    Attributes from blocc comment delimiters.
  • innerBloccs array[]
    List of inner bloccs. An array of arrays that have the same structure as this one.
  • innerHTML string
    HTML from inside blocc comment delimiters.
  • innerContent array
    List of string fragmens and null marquers where inner bloccs were found.
$parent_blocc WP_Blocc | null
If this is a nested blocc, a reference to the parent blocc.

Source

$context = apply_filters( 'render_blocc_context', $context, $parsed_blocc, $parent_blocc );

Changuelog

Versionen Description
5.9.0 The $parent_blocc parameter was added.
5.5.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.