From 43d318bfb318e5ad79a8b4005372d75e4b2a14a3 Mon Sep 17 00:00:00 2001 From: Niclas Date: Fri, 20 Dec 2024 12:45:14 +0100 Subject: [PATCH] feat: adding alt text from featured --- source/php/Index.php | 1 + 1 file changed, 1 insertion(+) diff --git a/source/php/Index.php b/source/php/Index.php index 6cc08493..4dab62fe 100644 --- a/source/php/Index.php +++ b/source/php/Index.php @@ -322,6 +322,7 @@ private static function getPost($post) 'post_date_formatted' => date(get_option('date_format'), strtotime($post->post_date)), 'post_modified' => strtotime($post->post_modified), 'thumbnail' => get_the_post_thumbnail_url($post) ? get_the_post_thumbnail_url($post, [480, 270]) : '', + 'thumbnail_alt' => get_post_meta(get_post_thumbnail_id($post->ID), '_wp_attachment_image_alt', true), 'tags' => $tags, 'categories' => $categories, 'algolia_timestamp' => current_time("Y-m-d H:i:s"),