post_title); } } if (empty($image_title)) { $image_title = esc_html(get_the_title()); } $image_url = !empty($item["image"]["url"]) ? esc_url($item["image"]["url"]) : esc_url(\Elementor\Utils::get_placeholder_image_src()); if ($type === "image") { $is_lightbox_link = false; if ($item["image_link_to_type"] === "custom" && !empty($item["link"]["url"])) { $link = esc_url($item["link"]["url"]); } elseif ($settings["open_lightbox"] === "yes") { $link = esc_url($image_url); $is_lightbox_link = true; } elseif ($item["image_link_to_type"] === "file") { $link = esc_url(get_attachment_link($item["image"]["id"])); } echo '
'; if (!empty($link)) { echo ''; } echo '
'; $overlay_type = esc_attr($settings['overlay_type']); $animation_class = 'zlfms-overlay-animation-' . esc_attr($settings['overlay_animation']); if ($overlay_type === 'text') { echo '
'; echo esc_html($image_title); echo '
'; } elseif ($overlay_type === 'icon') { echo '
'; $icon = $settings['overlay_icon_choose']; if (!empty($icon['value'])) { echo ''; } echo '
'; } echo '
'; if (!empty($link)) { echo '
'; } echo '
'; // Closing swiper-slide } elseif ($type === "video") { $video_url = $item["video"]["url"]; $video_data = zlfms_parse_video_url($video_url); $embed_url = $video_data ? $video_data['embed_url'] : ''; $video_type = $video_data ? $video_data['video_type'] : ''; echo '
'; if (!empty($embed_url) && $settings["open_lightbox"] === "yes") { echo '
'; } else { echo ''; } echo '
'; if ($settings["show_play_icon"] === "yes") { $play_icon = $settings["play_icon"]; $icon_value = isset($play_icon['value']) ? esc_attr($play_icon['value']) : 'far fa-play-circle'; $icon_library = isset($play_icon['library']) ? esc_attr($play_icon['library']) : 'fa-solid'; echo '
'; } echo '
'; $overlay_type = esc_attr($settings['overlay_type']); $animation_class = 'zlfms-overlay-animation-' . esc_attr($settings['overlay_animation']); if ($overlay_type === 'text') { echo '
'; echo esc_html($image_title); echo '
'; } elseif ($overlay_type === 'icon') { echo '
'; $icon = $settings['overlay_icon_choose']; if (!empty($icon['value'])) { echo ''; } echo '
'; } echo (!empty($embed_url) && $settings["open_lightbox"] === "yes") ? '
' : ''; echo '
'; // Closing swiper-slide for video } } ?>
'true']); ?>
'true']); ?>