1
0
mirror of https://github.com/dwaxweiler/connector-mobilizon synced 2025-06-05 21:59:25 +02:00

fix widget, wip on shortcut

This commit is contained in:
Daniel Waxweiler
2023-05-07 19:53:24 +02:00
parent e28cdb7158
commit e1898af935
6 changed files with 31 additions and 16 deletions

View File

@ -24,10 +24,21 @@ class EventsListShortcut {
), $atts
);
$classNamePrefix = NAME;
$url = Settings::getUrl();
$eventsCount = $atts_with_overriden_defaults['events-count'];
$groupName = $atts_with_overriden_defaults['group-name'];
if ($groupName) {
$data = GraphQlClient::get_upcoming_events_by_group_name($url, (int) $eventsCount, $groupName);
} else {
$data = GraphQlClient::get_upcoming_events($url, (int) $eventsCount);
}
$classNamePrefix = NAME;
$locale = get_locale();
$isShortOffsetNameShown = Settings::isShortOffsetNameShown();
$timeZone = wp_timezone_string();
ob_start();
require dirname(__DIR__) . '/view/events-list.php';
$output = ob_get_clean();