fix(frontend): remove residual post thumbnail lazy path
This commit is contained in:
1 parent
435ee1daa7
commit
fb11a7ed0c
8 files changed
+27
-15
No files matched your search
@@ -39,7 +39,6 @@ if (!function_exists('aksrt_renderer_defaults')) {
|
||||
'show_thumb' => true,
|
||||
'thumb_ratio' => '4:3',
|
||||
'thumb_fit' => 'cover',
|
||||
'thumb_lazy' => true,
|
||||
'thumb_if_has' => false,
|
||||
'target_blank' => false,
|
||||
'title_html' => '',
|
||||
@@ -328,9 +327,13 @@ if (!function_exists('aksrt_renderer_resolve_images')) {
|
||||
}
|
||||
|
||||
$thumb_settings = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::get_post_thumb_settings() : [];
|
||||
$allow_fallback = !empty($thumb_settings['rand_thumb']) || !empty($cfg['thumb_if_has']);
|
||||
if ($primary === '' && $allow_fallback) {
|
||||
$primary = aksrt_renderer_random_fallback_image($post_id);
|
||||
$fallback = sanitize_key((string) ($thumb_settings['fallback'] ?? 'placeholder'));
|
||||
if ($primary === '' && empty($cfg['thumb_if_has'])) {
|
||||
if ($fallback === 'random') {
|
||||
$primary = aksrt_renderer_random_fallback_image($post_id);
|
||||
} elseif ($fallback === 'placeholder') {
|
||||
$primary = aksrt_get_lazy_thumb();
|
||||
}
|
||||
}
|
||||
|
||||
return [
|
||||
|
||||
Reference in new issue
Block a user