FEATURE Handling numerotation
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Antoine M 2026-02-17 14:53:48 +01:00
parent 7bf1f60ac5
commit 07ce23752a

View File

@ -3,9 +3,10 @@ $current_post_id = $args['current_post_id'] ?? get_the_ID();
$current_post_type = $args['current_post_type'] ?? null;
$type = null;
$current_post_type_supports_type = is_object_in_taxonomy($current_post_type, 'type');
$hasNumerotation = hasPostTypeNumerotation($current_post_type);
if ($current_post_type_supports_type) {
$type = get_the_terms($current_post_id, taxonomy: 'type') ?? null;
$type = get_the_terms($current_post_id, 'type') ?? null;
// $current_post_type === 'analyses-etudes' && is_array($type) && !empty($type) && isset($type[0]->name
} else {
$current_post_type_obj = get_post_type_object($current_post_type);
@ -17,12 +18,13 @@ if ($current_post_type_supports_type) {
<div class="content-meta">
<?php if ($type) : ?>
<span class="content-meta__type content-meta__type--revue"><?php echo $type ?></span>
<span class="content-meta__type content-meta__type--<?php echo $current_post_type ?>"><?php echo $type ?></span>
<?php endif; ?>
<?php if ($hasNumerotation) : ?>
<p class="content-meta__revue-issue content-meta__revue-issue--green">
<span class="revue-issue-number revue-meta__label sr-only">Numéro</span>
28
</p>
<?php endif; ?>
</div>