Skip to content

Commit

Permalink
Lib: Limit pre_render_block extension. (#19989)
Browse files Browse the repository at this point in the history
* Lib: Limit `pre_render_block` extension.

* Update lib/compat.php

Co-Authored-By: Andrew Duthie <andrew@andrewduthie.com>

Co-authored-by: Andrew Duthie <andrew@andrewduthie.com>
  • Loading branch information
epiqueras and aduth committed Feb 1, 2020
1 parent 06bd266 commit d362cb1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/compat.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ function gutenberg_safe_style_css_column_flex_basis( $attr ) {
*/
function gutenberg_provide_render_callback_with_block_object( $pre_render, $block ) {
global $post;
if ( 'core/navigation' !== $block['blockName'] ) {
return $pre_render;
}

$source_block = $block;

Expand Down

0 comments on commit d362cb1

Please sign in to comment.