1
0
mirror of https://github.com/dwaxweiler/connector-mobilizon synced 2025-06-05 21:59:25 +02:00
Files
connector-wordpress/source/view/events-list.php
Daniel Waxweiler d79a0cf9a6 add error handling
2023-05-07 21:48:33 +02:00

22 lines
732 B
PHP

<?php
// Exit if this file is called directly.
if (!defined('ABSPATH')) {
exit;
}
?>
<div class="<?php echo esc_attr($classNamePrefix); ?>_events-list-php">
<ul>
<?php foreach($events as $event) { ?>
<li>
<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>
</div>