From 3c3e8615f31c76e4077844b9b8bd2154cf1bb7a2 Mon Sep 17 00:00:00 2001 From: Nonimart Date: Mon, 23 Mar 2026 15:28:28 +0100 Subject: [PATCH] FEATURE ADapting api to use reusable post-card component --- includes/api.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/includes/api.php b/includes/api.php index 1475c28..b9d59c7 100644 --- a/includes/api.php +++ b/includes/api.php @@ -219,12 +219,19 @@ function build_revues($request) if ($revues->have_posts()) : while ($revues->have_posts()) : $revues->the_post(); - get_template_part('template-parts/revues/card-revue', null, array( - 'date' => get_the_date(), - 'image' => get_the_post_thumbnail_url(), - 'link' => get_the_permalink(), + // get_template_part('template-parts/revues/card-revue', null, array( + // 'date' => get_the_date(), + // 'image' => get_the_post_thumbnail_url(), + // 'link' => get_the_permalink(), + // 'ID' => get_the_ID(), + // 'ThumbnailFocalPosition' => safe_get_thumbnail_focal_point_css(), + // )); + + + get_template_part('template-parts/components/cards/post-card', null, array( 'ID' => get_the_ID(), - 'ThumbnailFocalPosition' => safe_get_thumbnail_focal_point_css(), + 'showTags' => false, + 'has_thumbnail_overlay' => true, )); endwhile; else :