From afe04dd9e6f10cce1e4ee4bf11da471c764ec0f2 Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Thu, 16 Jun 2022 18:26:12 +0200 Subject: [PATCH] Wrong PHP function :facepalm: --- block-hydration-experiments.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block-hydration-experiments.php b/block-hydration-experiments.php index c5ce0992..4ee9f5af 100644 --- a/block-hydration-experiments.php +++ b/block-hydration-experiments.php @@ -41,7 +41,7 @@ function bhe_block_wrapper( $block_content, $block, $instance ) { "source" => $definition['source'] ); } else { - if ( in_array ( $attr, $block['attrs'], true ) ) { + if ( array_key_exists ( $attr, $block['attrs'] ) ) { $attributes[ $attr ] = $block['attrs'][$attr]; } else if ( isset( $definition['default'] ) ) { $attributes[ $attr ] = $definition['default'];