feat(frontend): replace lazy loading with zibll lazysizes
This commit is contained in:
1 parent
02571eecd6
commit
435ee1daa7
78 files changed
+1515
-909
No files matched your search
@@ -42,7 +42,7 @@ if (!function_exists('aksrt_icon_card')) :
|
||||
if ($icon_img === '' && is_string($args['customize_icon']) && str_contains((string) $args['customize_icon'], '<')) {
|
||||
$custom_html = wp_kses((string) $args['customize_icon'], [
|
||||
'i' => ['class' => true, 'aria-hidden' => true],
|
||||
'img' => ['src' => true, 'alt' => true, 'class' => true, 'width' => true, 'height' => true, 'loading' => true],
|
||||
'img' => ['src' => true, 'data-src' => true, 'alt' => true, 'class' => true, 'width' => true, 'height' => true],
|
||||
'span'=> ['class' => true],
|
||||
]);
|
||||
}
|
||||
@@ -80,7 +80,7 @@ if (!function_exists('aksrt_icon_card')) :
|
||||
if ($custom_html !== '') {
|
||||
$icon_inner = $custom_html;
|
||||
} elseif ($icon_img !== '') {
|
||||
$icon_inner = '<img src="' . esc_url($icon_img) . '" alt="" loading="lazy" />';
|
||||
$icon_inner = '<img' . aksrt_get_lazy_attr('lazy_other', $icon_img, 'img-icon') . ' alt="">';
|
||||
} else {
|
||||
if ($icon_fa !== '' && !str_contains($icon_fa, 'fa-') && !str_contains($icon_fa, ' ')) {
|
||||
$icon_fa = 'fa fa-' . $icon_fa;
|
||||
@@ -181,7 +181,7 @@ if (!function_exists('aksrt_icon_cover_card')) :
|
||||
if ($icon_img === '' && $custom_src !== '' && str_contains($custom_src, '<')) {
|
||||
$custom_html = wp_kses($custom_src, [
|
||||
'i' => ['class' => true, 'aria-hidden' => true],
|
||||
'img' => ['src' => true, 'alt' => true, 'class' => true, 'loading' => true, 'width' => true, 'height' => true],
|
||||
'img' => ['src' => true, 'data-src' => true, 'alt' => true, 'class' => true, 'width' => true, 'height' => true],
|
||||
'span' => ['class' => true],
|
||||
'svg' => ['class' => true, 'viewbox' => true, 'viewBox' => true, 'width' => true, 'height' => true, 'fill' => true, 'xmlns' => true, 'aria-hidden' => true],
|
||||
'path' => ['d' => true, 'fill' => true, 'stroke' => true, 'stroke-width' => true],
|
||||
@@ -235,7 +235,7 @@ if (!function_exists('aksrt_icon_cover_card')) :
|
||||
if ($custom_html !== '') {
|
||||
$icon_inner = $custom_html;
|
||||
} elseif ($icon_img !== '') {
|
||||
$icon_inner = '<img src="' . esc_url($icon_img) . '" alt="" loading="lazy" />';
|
||||
$icon_inner = '<img' . aksrt_get_lazy_attr('lazy_other', $icon_img, 'img-icon') . ' alt="">';
|
||||
} else {
|
||||
// zibll: zib_get_cfs_icon($args['icon'], 'em09') — keep FA class + em09.
|
||||
if ($icon_fa !== '' && !str_contains($icon_fa, 'fa-') && !str_contains($icon_fa, ' ') && !str_starts_with($icon_fa, 'zibsvg-')) {
|
||||
|
||||
Reference in new issue
Block a user