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

display event picture (#23)

This commit is contained in:
Daniel Waxweiler
2024-08-04 18:31:29 +02:00
committed by GitHub
parent a543a25a8a
commit 0edad986d3
5 changed files with 84 additions and 3 deletions

View File

@@ -8,8 +8,11 @@ if (!defined('ABSPATH')) {
?>
<div class="<?php echo esc_attr($classNamePrefix); ?>_events-list">
<ul style="list-style-type: none; padding-left: 0;">
<?php foreach($events as $event) { ?>
<li style="margin-top: 10px;">
<?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 } ?>
<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)); ?>