Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: pre_render_block

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
2103       *     @type array    $attrs        Attributes from block comment delimiters.
2104       *     @type array[]  $innerBlocks  List of inner blocks. An array of arrays that
2105       *                                  have the same structure as this one.
2106       *     @type string   $innerHTML    HTML from inside block comment delimiters.
2107       *     @type array    $innerContent List of string fragments and null markers where
2108       *                                  inner blocks were found.
2109       * }
2110       * @param WP_Block|null $parent_block If this is a nested block, a reference to the parent block.
2111       */
2112      $pre_render = apply_filters( 'pre_render_block', null, $parsed_block, $parent_block );
2113      if ( ! is_null( $pre_render ) ) {
2114           return $pre_render;
2115      }
2116
2117      $source_block = $parsed_block;
2118
2119      /**
2120       * Filters the block being rendered in render_block(), before it's processed.
2121       *