diff --git a/src/WidgetContext.php b/src/WidgetContext.php index 62e46da..9282a00 100644 --- a/src/WidgetContext.php +++ b/src/WidgetContext.php @@ -307,10 +307,10 @@ function check_widget_visibility( $widget_id ) { continue; } + $widget_context_args = array(); + // Make sure that context settings for this widget are defined - if ( ! isset( $this->context_options[ $widget_id ][ $context_id ] ) ) { - $widget_context_args = array(); - } else { + if ( ! empty( $this->context_options[ $widget_id ][ $context_id ] ) ) { $widget_context_args = $this->context_options[ $widget_id ][ $context_id ]; }