FEATURE Handlign cite button
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Antoine M 2026-05-05 11:11:50 +02:00
parent 56208a06d8
commit 562be8f9a7

View File

@ -2,11 +2,13 @@
$currentPostType = get_post_type();
$shareUrls = build_share_urls();
$handleCitation = post_type_supports($currentPostType, 'carhop-citations') ?? false;
$citeReference = get_field('cite_reference', get_the_ID());
// write_log($handleCitation);
?>
<div class="socials-buttons">
<?php if ($handleCitation) : ?>
<?php if ($handleCitation && !empty($citeReference)) : ?>
<button class="socials-buttons__button socials-buttons__button--cite" <?php echo empty($citeReference) ? 'disabled' : ''; ?> title="<?php echo empty($citeReference) ? 'Citation non disponible' : 'Copier la citation'; ?>">
<img src="<?php echo get_template_directory_uri(); ?>/resources/img/icons/carhop-citer-article.svg" alt="">
Citer