From b438ba9257f67f27fc7c1bf3b6ee17bf3dcf750b Mon Sep 17 00:00:00 2001 From: vnmedeiros Date: Thu, 8 Jul 2021 15:59:41 -0300 Subject: [PATCH] fix: get thumbnail on exposers json --- src/classes/exposers/class-tainacan-json-flat.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/classes/exposers/class-tainacan-json-flat.php b/src/classes/exposers/class-tainacan-json-flat.php index 1f8aa18cb..1d9f500fa 100644 --- a/src/classes/exposers/class-tainacan-json-flat.php +++ b/src/classes/exposers/class-tainacan-json-flat.php @@ -63,7 +63,7 @@ class JSON_flat extends Exposer { 'id' => $item['id'], 'data' => $item_data, 'url' => $item['url'], - 'thumbnail' => isset($item['thumbnail']) ? $item['thumbnail'] : false, + 'thumbnail' => isset($item['_thumbnail_id']) ? wp_get_attachment_image_src($item['_thumbnail_id'], 'full') : false, 'creation_date' => isset($item['creation_date']) ? $item['creation_date'] : '', 'modification_date' => isset($item['modification_date']) ? $item['modification_date'] : '' ];