fix undefined variable for both error views

This commit is contained in:
Daniel Waxweiler 2024-05-14 10:28:39 +02:00
parent 7bc35a3923
commit fa99821ffc
4 changed files with 4 additions and 3 deletions

View File

@ -4,6 +4,7 @@
#### Deprecated #### Deprecated
#### Removed #### Removed
#### Fixed #### Fixed
- Fix undefined variable $classNamePrefix for both error views
#### Security #### Security
### [1.0.0] ### [1.0.0]

View File

@ -39,6 +39,7 @@ class EventsListBlock {
$url = Settings::getUrl(); $url = Settings::getUrl();
$eventsCount = $block_attributes['eventsCount']; $eventsCount = $block_attributes['eventsCount'];
$groupName = isset($block_attributes['groupName']) ? $block_attributes['groupName'] : ''; $groupName = isset($block_attributes['groupName']) ? $block_attributes['groupName'] : '';
$classNamePrefix = NAME;
ob_start(); ob_start();
try { try {
@ -48,7 +49,6 @@ class EventsListBlock {
$events = GraphQlClient::get_upcoming_events($url, (int) $eventsCount); $events = GraphQlClient::get_upcoming_events($url, (int) $eventsCount);
} }
$classNamePrefix = NAME;
$locale = get_locale(); $locale = get_locale();
$isShortOffsetNameShown = Settings::isShortOffsetNameShown(); $isShortOffsetNameShown = Settings::isShortOffsetNameShown();
$timeZone = wp_timezone_string(); $timeZone = wp_timezone_string();

View File

@ -22,6 +22,7 @@ class EventsListShortcut {
$url = Settings::getUrl(); $url = Settings::getUrl();
$eventsCount = $atts_with_overriden_defaults['events-count']; $eventsCount = $atts_with_overriden_defaults['events-count'];
$groupName = $atts_with_overriden_defaults['group-name']; $groupName = $atts_with_overriden_defaults['group-name'];
$classNamePrefix = NAME;
ob_start(); ob_start();
try { try {
@ -31,7 +32,6 @@ class EventsListShortcut {
$events = GraphQlClient::get_upcoming_events($url, (int) $eventsCount); $events = GraphQlClient::get_upcoming_events($url, (int) $eventsCount);
} }
$classNamePrefix = NAME;
$locale = get_locale(); $locale = get_locale();
$isShortOffsetNameShown = Settings::isShortOffsetNameShown(); $isShortOffsetNameShown = Settings::isShortOffsetNameShown();
$timeZone = wp_timezone_string(); $timeZone = wp_timezone_string();

View File

@ -23,6 +23,7 @@ class EventsListWidget extends \WP_Widget {
$url = Settings::getUrl(); $url = Settings::getUrl();
$eventsCount = $options['eventsCount']; $eventsCount = $options['eventsCount'];
$groupName = isset($options['groupName']) ? $options['groupName'] : ''; $groupName = isset($options['groupName']) ? $options['groupName'] : '';
$classNamePrefix = NAME;
try { try {
if ($groupName) { if ($groupName) {
@ -31,7 +32,6 @@ class EventsListWidget extends \WP_Widget {
$events = GraphQlClient::get_upcoming_events($url, (int) $eventsCount); $events = GraphQlClient::get_upcoming_events($url, (int) $eventsCount);
} }
$classNamePrefix = NAME;
$locale = get_locale(); $locale = get_locale();
$isShortOffsetNameShown = Settings::isShortOffsetNameShown(); $isShortOffsetNameShown = Settings::isShortOffsetNameShown();
$timeZone = wp_timezone_string(); $timeZone = wp_timezone_string();