From fc3f3869bfd1ba4147d6714bcb509124610a215a Mon Sep 17 00:00:00 2001 From: Markus Johansson <130464595+MFMarkus@users.noreply.github.com> Date: Wed, 23 Oct 2024 10:17:55 +0200 Subject: [PATCH] Added alt text to wp_postmeta for attachments when enabling thumbnails (#43) --- lib.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib.php b/lib.php index 32fb95e..39cef78 100644 --- a/lib.php +++ b/lib.php @@ -549,6 +549,7 @@ function mfn_upsert_thumbnails($post_id, $attachments) } add_post_meta($attachment_id, MFN_POST_TYPE . "_attachment_url", $a->url); add_post_meta($attachment_id, MFN_POST_TYPE . "_attachment_proxied_url", $a->proxied_url); + add_post_meta($attachment_id, '_wp_attachment_image_alt', $file_title); } if ($thumbnail_attachment_id === 0) { $thumbnail_attachment_id = $attachment_id;