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
222
223      /**
224       * Allows render_block() to be shortcircuited, by returning a non-null value.
225       *
226       * @since 5.1.0
227       *
228       * @param string $pre_render The pre-rendered content. Default null.
229       * @param array  $block      The block being rendered.
230       */
231      $pre_render = apply_filters( 'pre_render_block', null, $block );
232      if ( ! is_null( $pre_render ) ) {
233           return $pre_render;
234      }
235
236      $source_block = $block;
237
238      /**
239       * Filters the block being rendered in render_block(), before it's processed.
240       *