Skip to content

Commit

Permalink
fix: correct thumbnail id check (#775)
Browse files Browse the repository at this point in the history
  • Loading branch information
NiclasNorin authored Nov 23, 2023
1 parent 01b9f6c commit f097fc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/Admin/Acf/ImageAltTextValidation.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function checkAttachedImagesAltTexts ($valid, $value, $field, $name) {
}

private function postHasFeaturedImage($field, $post) {
return !empty($field['key']) && $field['key'] == 'field_654a2a58ca4e9' && !empty($post) && !empty($post['_thumbnail_id']);
return !empty($field['key']) && $field['key'] == 'field_654a2a58ca4e9' && !empty($post) && !empty($post['_thumbnail_id']) && $post['_thumbnail_id'] !== '-1';
}

private function imageFieldHasValue($field, $value) {
Expand Down

0 comments on commit f097fc8

Please sign in to comment.