fix(frontend): align post thumbnail display with reference
This commit is contained in:
1 parent
542daca457
commit
4cdde50695
11 files changed
+201
-104
No files matched your search
@@ -143,7 +143,7 @@ if (!function_exists('aksrt_renderer_excerpt_markup')) {
|
||||
|
||||
if (!function_exists('aksrt_renderer_curated_images')) {
|
||||
/** @return string[] */
|
||||
function aksrt_renderer_curated_images(int $post_id, string $size, int $limit = 8): array {
|
||||
function aksrt_renderer_curated_images(int $post_id, string $size): array {
|
||||
$raw = class_exists('\AKSRT\Core\PostMetaBox')
|
||||
? (string) \AKSRT\Core\PostMetaBox::get_meta_value($post_id, 'featured_slide', '')
|
||||
: '';
|
||||
@@ -154,7 +154,7 @@ if (!function_exists('aksrt_renderer_curated_images')) {
|
||||
$images[] = $image;
|
||||
}
|
||||
}
|
||||
return array_slice($images, 0, $limit);
|
||||
return $images;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,7 +179,8 @@ if (!function_exists('aksrt_renderer_sized_image')) {
|
||||
return esc_url_raw($sized);
|
||||
}
|
||||
}
|
||||
return esc_url_raw($image);
|
||||
// A missing attachment is not a relative image URL. Let the next configured source resolve it.
|
||||
return ctype_digit($image) ? '' : esc_url_raw($image);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user