Skip to content

Commit 433f3a4

Browse files
authored
fix(thumbnail): Fix @thumbnail always passing thumbnail when second argument is false.
1 parent a6b05e6 commit 433f3a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Directives/WordPress.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@
179179

180180
if (! empty($expression->get(1))) {
181181
if ($expression->get(1) === 'false') {
182-
return "<?= get_the_post_thumbnail_url({$expression->get(0)}, 'thumbnail'); ?>";
182+
return "<?= get_the_post_thumbnail_url(get_the_ID(), {$expression->get(0)}); ?>";
183183
}
184184

185185
return "<?= get_the_post_thumbnail({$expression->get(0)}, is_numeric({$expression->get(1)}) ? [{$expression->get(1)}, {$expression->get(1)}] : {$expression->get(1)}); ?>"; // phpcs:ignore

0 commit comments

Comments
 (0)