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
#### Removed
#### Fixed
- Fix undefined variable $classNamePrefix for both error views
#### Security
### [1.0.0]

View File

@ -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();

View File

@ -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();

View File

@ -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();