Blocks: Reverse the logic when checking the `pre_render_block` result.

We should be returning if the result isn't null, not when it is.

See #45451.


Built from https://develop.svn.wordpress.org/trunk@44555


git-svn-id: http://core.svn.wordpress.org/trunk@44386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Gary Pendergast 2019-01-10 23:31:50 +00:00
parent 92146fe52b
commit 203d686ec9
2 changed files with 2 additions and 2 deletions

View File

@ -184,7 +184,7 @@ function render_block( $block ) {
* @param array $block The block being rendered.
*/
$pre_render = apply_filters( 'pre_render_block', null, $block );
if ( is_null( $pre_render ) ) {
if ( ! is_null( $pre_render ) ) {
return $pre_render;
}

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.1-alpha-44554';
$wp_version = '5.1-alpha-44555';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.