From b9c5e6e4cd7b07493c5fc8081dbdb60173fa019c Mon Sep 17 00:00:00 2001 From: Utkarsh Patel Date: Fri, 4 Feb 2022 15:08:59 +0530 Subject: [PATCH] Fix context for card --- theme/inc/blocks/class-blocks.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/theme/inc/blocks/class-blocks.php b/theme/inc/blocks/class-blocks.php index 2c19b27a8..bbc714dd0 100644 --- a/theme/inc/blocks/class-blocks.php +++ b/theme/inc/blocks/class-blocks.php @@ -124,7 +124,7 @@ public static function render( $attributes, $content, $block ) { } // Remove this once server side context is available via gutenberg. - if ( ! empty( $block->block_type->uses_context ) && empty( $block->context ) ) { + if ( ! empty( $block->block_type->uses_context ) && ! empty( $_GET['materialParamContext'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended foreach ( $block->block_type->uses_context as $context ) { if ( empty( $_GET['materialParamContext'][ $context ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended continue;