feat(frontend): replace lazy loading with zibll lazysizes
This commit is contained in:
@@ -342,30 +342,6 @@ if (!function_exists('aksrt_renderer_resolve_images')) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('aksrt_renderer_lazyload_config')) {
|
||||
/**
|
||||
* Small lazyload config subset for post cards.
|
||||
*
|
||||
* @return array<string,mixed>
|
||||
*/
|
||||
function aksrt_renderer_lazyload_config(): array {
|
||||
if (class_exists('\AKSRT\Settings\Settings')) {
|
||||
$lazy = \AKSRT\Settings\Settings::get_lazyload_config();
|
||||
return [
|
||||
'enabled' => !empty($lazy['enabled']) && !empty($lazy['posts_thumb_enabled']),
|
||||
'placeholder_url' => (string) ($lazy['placeholder_url'] ?? ''),
|
||||
'blur' => !empty($lazy['blur']),
|
||||
];
|
||||
}
|
||||
|
||||
return [
|
||||
'enabled' => false,
|
||||
'placeholder_url' => '',
|
||||
'blur' => false,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('aksrt_renderer_thumb_ratio_value')) {
|
||||
/**
|
||||
* Convert ratio tokens like 4:3 to CSS aspect ratio values.
|
||||
|
||||
Reference in New Issue
Block a user