From 9d5dd84de613d01ff37cd9b7999fe8fd9afd0fda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20J=C3=A4cke?= Date: Thu, 20 May 2021 15:08:36 +0200 Subject: [PATCH] add pdf thumbnail sizes to attachment data array --- includes/api/api-helpers.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/includes/api/api-helpers.php b/includes/api/api-helpers.php index 59314a76..867adb36 100644 --- a/includes/api/api-helpers.php +++ b/includes/api/api-helpers.php @@ -3181,6 +3181,11 @@ function acf_get_attachment( $attachment ) { $sizes_id = $featured_id; } break; + case 'application': + if ( $subtype === 'pdf' ) { + $sizes_id = $attachment->ID; + } + break; } // Load array of image sizes.