carhop__carhop-theme__DEV/template-parts/cards/communique-presse-card.php
Antoine M ed7cb381b5
All checks were successful
continuous-integration/drone/push Build is passing
TEST FIX
2026-02-17 16:50:40 +01:00

26 lines
1.1 KiB
PHP

<?php
$communique_id = $args['communique_id'];
$communique_file = get_field('file', $communique_id);
$communique_file_url = $communique_file['url'];
$communique_file_size = size_format($communique_file['filesize']);
$communique_file_type = $communique_file['subtype'];
?>
<div class="communique-card">
<?php get_template_part('template-parts/components/content-meta', null, array(
'current_post_type' => 'communique-presse',
'current_post_id' => $communique_id
)); ?>
<h3><?php echo get_the_title($communique_id); ?></h3>
<div class="communique-card__file-infos">
<time datetime="<?php echo get_the_date('Y-m-d', $communique_id); ?>"><?php echo get_the_date('d F Y', $communique_id); ?></time>
<?php if ($communique_file) : ?>
<span>|</span>
<span class="communique-card__file-type"><?php echo $communique_file_type; ?></span>
<span class="communique-card__file-size">(<?php echo $communique_file_size; ?>)</span>
<?php endif; ?>
</div>
<!-- <a href="<?php echo get_permalink($communique_id); ?>" class="button">Voir le communiqué</a> -->
</div>