diff --git a/source/changelog.txt b/source/changelog.txt index 8c35d3a..5010b98 100644 --- a/source/changelog.txt +++ b/source/changelog.txt @@ -4,6 +4,7 @@ #### Deprecated #### Removed #### Fixed +- Fix undefined variable $classNamePrefix for both error views #### Security ### [1.0.0] diff --git a/source/includes/EventsListBlock.php b/source/includes/EventsListBlock.php index 478b599..5810587 100644 --- a/source/includes/EventsListBlock.php +++ b/source/includes/EventsListBlock.php @@ -39,6 +39,7 @@ class EventsListBlock { $url = Settings::getUrl(); $eventsCount = $block_attributes['eventsCount']; $groupName = isset($block_attributes['groupName']) ? $block_attributes['groupName'] : ''; + $classNamePrefix = NAME; ob_start(); try { @@ -48,7 +49,6 @@ class EventsListBlock { $events = GraphQlClient::get_upcoming_events($url, (int) $eventsCount); } - $classNamePrefix = NAME; $locale = get_locale(); $isShortOffsetNameShown = Settings::isShortOffsetNameShown(); $timeZone = wp_timezone_string(); diff --git a/source/includes/EventsListShortcut.php b/source/includes/EventsListShortcut.php index ce1e529..0a2024d 100644 --- a/source/includes/EventsListShortcut.php +++ b/source/includes/EventsListShortcut.php @@ -22,6 +22,7 @@ class EventsListShortcut { $url = Settings::getUrl(); $eventsCount = $atts_with_overriden_defaults['events-count']; $groupName = $atts_with_overriden_defaults['group-name']; + $classNamePrefix = NAME; ob_start(); try { @@ -31,7 +32,6 @@ class EventsListShortcut { $events = GraphQlClient::get_upcoming_events($url, (int) $eventsCount); } - $classNamePrefix = NAME; $locale = get_locale(); $isShortOffsetNameShown = Settings::isShortOffsetNameShown(); $timeZone = wp_timezone_string(); diff --git a/source/includes/EventsListWidget.php b/source/includes/EventsListWidget.php index 5503cff..68876ab 100644 --- a/source/includes/EventsListWidget.php +++ b/source/includes/EventsListWidget.php @@ -23,6 +23,7 @@ class EventsListWidget extends \WP_Widget { $url = Settings::getUrl(); $eventsCount = $options['eventsCount']; $groupName = isset($options['groupName']) ? $options['groupName'] : ''; + $classNamePrefix = NAME; try { if ($groupName) { @@ -31,7 +32,6 @@ class EventsListWidget extends \WP_Widget { $events = GraphQlClient::get_upcoming_events($url, (int) $eventsCount); } - $classNamePrefix = NAME; $locale = get_locale(); $isShortOffsetNameShown = Settings::isShortOffsetNameShown(); $timeZone = wp_timezone_string();