1
0
mirror of https://github.com/dwaxweiler/connector-mobilizon synced 2025-02-22 06:27:39 +01:00
connector-wordpress/source/view/events-list.php

27 lines
1.1 KiB
PHP
Raw Normal View History

2021-01-08 14:08:40 +01:00
<?php
2024-04-05 23:26:11 +02:00
namespace MobilizonConnector;
2021-01-08 14:08:40 +01:00
// Exit if this file is called directly.
if (!defined('ABSPATH')) {
exit;
}
?>
2024-04-05 23:26:11 +02:00
<div class="<?php echo esc_attr($classNamePrefix); ?>_events-list">
<ul style="list-style-type: none; padding-left: 0;">
2024-08-04 18:31:29 +02:00
<?php foreach ($events as $event) { ?>
<li style="line-height: 150%; margin-top: 20px;">
<?php if (isset($event['picture'])) { ?>
<img alt="<?php echo esc_attr($event['picture']['alt']); ?>" src="<?php echo esc_attr($event['picture']['base64']); ?>" style="display: block; max-width: 100%;">
<?php } ?>
2024-04-05 23:26:11 +02:00
<a href="<?php echo esc_attr($event['url']); ?>"><?php echo esc_html_e($event['title']); ?></a>
<br>
<?php echo esc_html_e(Formatter::format_date($locale, $timeZone, $event['beginsOn'], $event['endsOn'], $isShortOffsetNameShown)); ?>
<?php if (isset($event['physicalAddress'])) { ?>
<br>
<?php echo esc_html_e(Formatter::format_location($event['physicalAddress']['description'], $event['physicalAddress']['locality'])) ?>
<?php } ?>
</li>
<?php } ?>
</ul>
2022-06-03 23:48:19 +02:00
</div>