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.



git-svn-id: https://develop.svn.wordpress.org/trunk@44555 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast
2019-01-10 23:31:01 +00:00
parent d32cead515
commit 1eaf7453f9

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;
}