';
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 '
';
echo '
'; // Closing swiper-slide
} elseif ($type === "video") {
$video_url = esc_url($item["video"]["url"]);
$video_id = "";
$embed_url = "";
$matches = [];
if (preg_match('/(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/', $video_url, $matches)) {
$video_id = $matches[1];
$embed_url = "https://www.youtube.com/embed/" . esc_attr($video_id);
$video_type = "youtube";
} elseif (preg_match('/(?:https?:\/\/)?(?:www\.)?(?:vimeo\.com\/(?:channels\/(?:\w+\/)?|groups\/(?:\w+\/)?videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?))/', $video_url, $matches)) {
$video_id = $matches[2];
$embed_url = "https://player.vimeo.com/video/" . esc_attr($video_id);
$video_type = "vimeo";
}
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 '
'; // Closing swiper-slide for video
}
}
?>