Skip to content

Commit

Permalink
Fix context for card
Browse files Browse the repository at this point in the history
  • Loading branch information
PatelUtkarsh committed Feb 4, 2022
1 parent fbe3c43 commit b9c5e6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion theme/inc/blocks/class-blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b9c5e6e

Please sign in to comment.