From 4481a693161fa140c35cf42685e5a78551df480f Mon Sep 17 00:00:00 2001 From: Antoine M Date: Mon, 8 Jun 2026 09:43:39 +0200 Subject: [PATCH] FEATURE Cancelling link on post card for fonds-archives (unecessary) --- includes/utilities.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/includes/utilities.php b/includes/utilities.php index 9bf8d31..8d830a7 100644 --- a/includes/utilities.php +++ b/includes/utilities.php @@ -531,6 +531,12 @@ function carhop_get_post_card_link_according_to_post_datas($post_id, $card_args $target = '_blank'; $text = 'Voir la notice'; break; + case 'fonds-archives': + $link = ''; + $target = '_self'; + $text = null; + $is_external = false; + break; default: $link = get_permalink($post_id) ?: ''; break; @@ -541,6 +547,6 @@ function carhop_get_post_card_link_according_to_post_datas($post_id, $card_args 'target' => $target, 'text' => $text, 'is_external' => $is_external, - 'has_valid_link' => ($link !== ''), + 'has_valid_link' => ! empty($link), ); }