: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
$social_icons .= '</div></div>';
public static function ep_get_elementor_widget_settings($page_settings = '', $id = '', $widgetType = '')
$data = json_decode($page_settings, true);
// Search for the element with the given ID
foreach ($data as $section) {
foreach ($section['elements'] as $column) {
foreach ($column['elements'] as $el) {
if ($el['id'] == $id && $el['elType'] == 'widget' && $el['widgetType'] == $widgetType) {
// Output the element code
public static function ep_get_popup_icon()
$svg = '<div class="ep-doc-popup-icon" ><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" xml:space="preserve"><path fill="#fff" d="M5 3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-6l-2-2v8H5V5h8l-2-2H5zm9 0 2.7 2.7-7.5 7.5 1.7 1.7 7.5-7.5L21 10V3h-7z"/><path style="fill:none" d="M0 0h24v24H0z"/></svg></div>';
public static function ep_get_download_icon()
$svg = '<div class="ep-doc-download-icon" ><svg width="25" height="25" viewBox="0 0 0.6 0.6" xmlns="http://www.w3.org/2000/svg"><path fill="#fff" fill-rule="evenodd" d="M.525.4A.025.025 0 0 1 .55.422v.053A.075.075 0 0 1 .479.55H.125A.075.075 0 0 1 .05.479V.425A.025.025 0 0 1 .1.422v.053A.025.025 0 0 0 .122.5h.353A.025.025 0 0 0 .5.478V.425A.025.025 0 0 1 .525.4ZM.3.05a.025.025 0 0 1 .025.025v.24L.357.283A.025.025 0 0 1 .39.281l.002.002a.025.025 0 0 1 .002.033L.392.318.317.393.316.394.314.395.311.397.308.398.305.399.301.4H.295L.292.399.289.398.287.397.285.395A.025.025 0 0 1 .283.393L.208.318A.025.025 0 0 1 .241.281l.002.002.032.032v-.24A.025.025 0 0 1 .3.05Z"/></svg></div>';
public static function ep_get_print_icon()
$svg = '<div class="ep-doc-print-icon" ><svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 24 24">
<path d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z" fill="#fff"/>
public static function ep_get_fullscreen_icon()
$svg = '<div class="ep-doc-fullscreen-icon"><svg width="25" height="25" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="m3 15 .117.007a1 1 0 0 1 .876.876L4 16v4h4l.117.007a1 1 0 0 1 0 1.986L8 22H3l-.117-.007a1 1 0 0 1-.876-.876L2 21v-5l.007-.117a1 1 0 0 1 .876-.876L3 15Zm18 0a1 1 0 0 1 .993.883L22 16v5a1 1 0 0 1-.883.993L21 22h-5a1 1 0 0 1-.117-1.993L16 20h4v-4a1 1 0 0 1 .883-.993L21 15ZM8 2a1 1 0 0 1 .117 1.993L8 4H4v4a1 1 0 0 1-.883.993L3 9a1 1 0 0 1-.993-.883L2 8V3a1 1 0 0 1 .883-.993L3 2h5Zm13 0 .117.007a1 1 0 0 1 .876.876L22 3v5l-.007.117a1 1 0 0 1-.876.876L21 9l-.117-.007a1 1 0 0 1-.876-.876L20 8V4h-4l-.117-.007a1 1 0 0 1 0-1.986L16 2h5Z" fill="#fff"/>
public static function ep_get_minimize_icon()
$svg = '<div class="ep-doc-minimize-icon" style="display:none"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" style="enable-background:new 0 0 385.331 385.331" xml:space="preserve" width="20" height="20"><path fill="#fff" d="M13.751 8.131h5.62c0.355 0 0.619 -0.28 0.619 -0.634 0 -0.355 -0.265 -0.615 -0.619 -0.614h-4.995V1.878c0 -0.355 -0.27 -0.624 -0.624 -0.624s-0.624 0.27 -0.624 0.624v5.62c0 0.002 0.001 0.003 0.001 0.004 0 0.002 -0.001 0.003 -0.001 0.005 0 0.348 0.276 0.625 0.624 0.624zM6.244 1.259c-0.354 0 -0.614 0.265 -0.614 0.619v4.995H0.624c-0.355 0 -0.624 0.27 -0.624 0.624 0 0.355 0.27 0.624 0.624 0.624h5.62c0.002 0 0.003 -0.001 0.004 -0.001 0.002 0 0.003 0.001 0.005 0.001 0.348 0 0.624 -0.276 0.624 -0.624V1.878c0 -0.354 -0.28 -0.619 -0.634 -0.619zm0.005 10.61H0.629c-0.355 0.001 -0.619 0.28 -0.619 0.634 0 0.355 0.265 0.615 0.619 0.614h4.995v5.005c0 0.355 0.27 0.624 0.624 0.624 0.355 0 0.624 -0.27 0.624 -0.624V12.502c0 -0.002 -0.001 -0.003 -0.001 -0.004 0 -0.002 0.001 -0.003 0.001 -0.005 0 -0.348 -0.276 -0.624 -0.624 -0.624zm13.127 0H13.756c-0.002 0 -0.003 0.001 -0.004 0.001 -0.002 0 -0.003 -0.001 -0.005 -0.001 -0.348 0 -0.624 0.276 -0.624 0.624v5.62c0 0.355 0.28 0.619 0.634 0.619 0.354 0.001 0.614 -0.265 0.614 -0.619v-4.995H19.376c0.355 0 0.624 -0.27 0.624 -0.624s-0.27 -0.624 -0.624 -0.625z"/><g/><g/><g/><g/><g/><g/></svg></div>';
public static function ep_get_draw_icon()
$svg = '<div class="ep-doc-draw-icon"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="m15 7.5 2.5 2.5m-10 10L19.25 8.25c0.69 -0.69 0.69 -1.81 0 -2.5v0c-0.69 -0.69 -1.81 -0.69 -2.5 0L5 17.5V20h2.5Zm0 0h8.379C17.05 20 18 19.05 18 17.879v0c0 -0.563 -0.224 -1.103 -0.621 -1.5L17 16M4.5 5c2 -2 5.5 -1 5.5 1 0 2.5 -6 2.5 -6 5 0 0.876 0.533 1.526 1.226 2" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg></div>';
public static function get_insta_video_icon()
$svg = '<svg class="insta-video-icon" aria-label="Clip" class="x1lliihq x1n2onr6" color="#FFF" fill="#FFF" height="20" viewBox="1.111 1.111 24.444 24.447" width="20">
<path d="m14.248 1.111 3.304 5.558h-6.2L8.408 1.146c.229-.014.466-.024.713-.03l.379-.005Zm2.586 0h.331c3.4 0 4.964.838 6.267 2.097a6.674 6.674 0 0 1 1.773 3.133l.078.328H20.14l-3.307-5.558ZM6.093 1.53l2.74 5.139H1.382a6.678 6.678 0 0 1 4.38-5.033ZM16.91 15.79l-5.05-2.916a1.01 1.01 0 0 0-1.507.742l-.009.133v5.831a1.011 1.011 0 0 0 1.394.933l.121-.059 5.05-2.916a1.01 1.01 0 0 0 .111-1.674l-.111-.076-5.05-2.916ZM1.132 8.891h24.404l.017.4.003.21v7.666c0 3.401-.839 4.966-2.098 6.267-1.279 1.238-2.778 2.062-5.922 2.121l-.371.003H9.501c-3.4 0-4.963-.839-6.267-2.099-1.238-1.278-2.06-2.776-2.12-5.922l-.003-.37V9.501l.003-.21Z" fill-rule="evenodd" /></svg>';
public static function get_insta_image_carousel_icon()
$svg = '<svg aria-label="Carousel" class="x1lliihq x1n2onr6" color="#FFF" fill="#FFF" height="25" viewBox="0 0 43.636 43.636" width="25">
<path d="M31.636 27V10a4.695 4.695 0 0 0-4.727-4.727H10A4.695 4.695 0 0 0 5.273 10v17A4.695 4.695 0 0 0 10 31.727h17c2.545-.091 4.636-2.182 4.636-4.727zm4-13.364v14.636c0 4.091-3.364 7.455-7.455 7.455H13.545c-.545 0-.818.636-.455 1 .909 1 2.182 1.636 3.727 1.636h12.182a9.35 9.35 0 0 0 9.364-9.364V16.818a5.076 5.076 0 0 0-1.636-3.727c-.455-.364-1.091 0-1.091.545z" /></svg>';
public static function get_insta_image_icon()
$svg = '<svg width="22" height="22" viewBox="0 0 0.6 0.6" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M.175.05A.125.125 0 0 0 .05.175v.25A.125.125 0 0 0 .175.55h.25A.125.125 0 0 0 .55.425v-.25A.125.125 0 0 0 .425.05h-.25ZM.2.225a.025.025 0 1 1 .05 0 .025.025 0 0 1-.05 0ZM.225.15a.075.075 0 1 0 0 .15.075.075 0 0 0 0-.15Zm.138.205A.025.025 0 0 1 .398.351l.048.042A.025.025 0 1 0 .479.355L.43.312a.075.075 0 0 0-.107.011l-.04.05a.024.024 0 0 1-.032.005.074.074 0 0 0-.099.015L.118.432a.025.025 0 0 0 .038.033l.035-.04A.024.024 0 0 1 .223.42.074.074 0 0 0 .322.405l.04-.05Z" fill="#fff"/></svg>';
public static function get_insta_like_icon()
$svg = '<svg version="1.1" id="Uploaded to svgrepo.com" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 0.8 0.8" xml:space="preserve"><path d="M.225.25C.225.264.214.275.2.275S.175.264.175.25.186.225.2.225.225.236.225.25zM.75.3C.75.453.589.582.485.65a1.06 1.06 0 0 1-.073.044.025.025 0 0 1-.024 0A1.049 1.049 0 0 1 .315.65C.211.582.05.453.05.3a.2.2 0 0 1 .2-.2.199.199 0 0 1 .15.068A.199.199 0 0 1 .55.1a.2.2 0 0 1 .2.2zM.25.25a.05.05 0 1 0-.1 0 .05.05 0 0 0 .1 0z" style="fill:#fff"/></svg>';
public static function get_insta_comment_icon()
$svg = '<svg fill="#fff" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 2.5 2.5" xml:space="preserve"><path d="M2.374.446a.063.063 0 0 0-.061-.057H.991a.063.063 0 0 0-.063.057H.927v.328h.559c.029 0 .053.022.056.051h.001v.731h.275l.162.162a.063.063 0 0 0 .116-.035v-.127h.217a.063.063 0 0 0 .06-.051h.002V.446h-.001z"/><path d="M1.361.899H.18A.056.056 0 0 0 .125.95v.946h.001a.057.057 0 0 0 .054.045h.194v.113a.057.057 0 0 0 .104.032l.145-.145h.738c.027 0 .05-.02.056-.045h.001V.95h-.001a.056.056 0 0 0-.056-.051z"/></svg>';
public static function get_instagram_icon()
$svg = '<svg version="1.1" id="Icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" xml:space="preserve" width="1285" height="400"><style>.st0{fill:none;stroke:#fff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10}</style><path class="st0" d="M14.375 19.375h-8.75c-2.75 0-5-2.25-5-5v-8.75c0-2.75 2.25-5 5-5h8.75c2.75 0 5 2.25 5 5v8.75c0 2.75-2.25 5-5 5z"/><path class="st0" d="M14.375 10A4.375 4.375 0 0 1 10 14.375 4.375 4.375 0 0 1 5.625 10a4.375 4.375 0 0 1 8.75 0zm1.25-5.625A.625.625 0 0 1 15 5a.625.625 0 0 1-.625-.625.625.625 0 0 1 1.25 0z"/></svg>';
public static function get_google_presentation_url($embedded_url)
$parsed_url = parse_url($embedded_url);
$base_url = $parsed_url['scheme'] . '://' . $parsed_url['host'] . $parsed_url['path'];
$base_url = strtok($base_url, '?');
$base_url = rtrim($base_url, '/');
public static function check_media_format($url)
$pattern1 = '/\.(mp4|mov|avi|wmv|flv|mkv|webm|mpeg|mpg)$/i';
$pattern2 = '/\.(mp3|wav|ogg|aac)$/i';
$isVideo = preg_match($pattern1, $url);
$isAudio = preg_match($pattern2, $url);
if (!empty($isVideo) || !empty($isAudio)) {
} else if (!empty($isAudio)) {
// Ajax Methods get instagram feed data
public function loadmore_data_handler()
$connected_account_type = isset($_POST['connected_account_type']) ? sanitize_text_field($_POST['connected_account_type']) : 'personal';
$hashtag_id = isset($_POST['hashtag_id']) ? sanitize_text_field($_POST['hashtag_id']) : '';
$feed_type = isset($_POST['feed_type']) ? sanitize_text_field($_POST['feed_type']) : 'user_aacount_type';
$user_id = isset($_POST['user_id']) ? sanitize_text_field($_POST['user_id']) : '';
$loadmore_key = isset($_POST['loadmore_key']) ? sanitize_text_field($_POST['loadmore_key']) : '';
$nonce = isset($_POST['_nonce']) ? sanitize_text_field($_POST['_nonce']) : '';
$params = isset($_POST['params']) ? sanitize_text_field($_POST['params']) : '';
// $params = json_decode($params, true);
$params = stripslashes($params); // Remove extra backslashes
$params = json_decode($params, true);
if (!wp_verify_nonce($nonce, 'ep_nonce')) {
wp_send_json_error('Invalid nonce');
wp_die(); // Terminate script execution if nonce is invalid
$feeds_data = get_option('ep_instagram_feed_data');
$user_data = $feeds_data[$user_id]['feed_userinfo'];
if ($feed_type == 'hashtag_type') {
$feeds_data = get_option('ep_instagram_hashtag_feed');
$profile_picture_url = isset($user_data['profile_picture_url']) ? $user_data['profile_picture_url'] : '';
if ($feed_type === 'user_account_type' && isset($feeds_data[$loadmore_key]['feed_posts'])) {
$feed_posts = $feeds_data[$loadmore_key]['feed_posts'];
} else if ($feed_type === 'hashtag_type' && isset($feeds_data[$loadmore_key])) {
$feed_posts = $feeds_data[$loadmore_key];
if (is_array($feed_posts) && count($feed_posts) > 0) {
$loaded_posts = isset($_POST['loaded_posts']) ? intval($_POST['loaded_posts']) : 0;
$posts_per_page = isset($_POST['posts_per_page']) ? intval($_POST['posts_per_page']) : 0;
$post_index = $loaded_posts + 1;
$start_index = $loaded_posts;
$next_posts = array_slice($feed_posts, $start_index, $posts_per_page);
if (is_array($next_posts) && count($next_posts) > 0) :
foreach ($next_posts as $post) :
$caption = !empty($post['caption']) ? $post['caption'] : '';
$media_type = !empty($post['media_type']) ? $post['media_type'] : '';
$media_url = !empty($post['media_url']) ? $post['media_url'] : '';
$permalink = !empty($post['permalink']) ? $post['permalink'] : '';
$timestamp = !empty($post['timestamp']) ? $post['timestamp'] : '';
$username = !empty($post['username']) ? $post['username'] : '';
$like_count = !empty($post['like_count']) ? $post['like_count'] : 0;
$comments_count = !empty($post['comments_count']) ? $post['comments_count'] : 0;
$post['profile_picture_url'] = $profile_picture_url;
$post['show_likes_count'] = isset($params['show_likes_count']) ? $params['show_likes_count'] : false;
$post['show_comments_count'] = isset($params['show_comments_count']) ? $params['show_comments_count'] : false;
$post['popup_follow_button'] = isset($params['popup_follow_button']) ? $params['popup_follow_button'] : true;
$post['popup_follow_button_text'] = isset($params['popup_follow_button_text']) ? $params['popup_follow_button_text'] : 'Follow';
<div class="insta-gallery-item cg-carousel__slide js-carousel__slide" data-insta-postid="<?php echo esc_attr($post['id']) ?>" data-postindex="<?php echo esc_attr($post_index); ?>" data-postdata="<?php echo htmlspecialchars(json_encode($post), ENT_QUOTES, 'UTF-8'); ?>" data-media-type="<?php echo esc_attr($media_type); ?>">
if (!empty($hashtag_id) && $media_type == 'CAROUSEL_ALBUM') {
if (isset($post['children']['data'][0]['media_url'])) {
$hashtag_media_url = $post['children']['data'][0]['media_url'];
$hashtag_media_type = $post['children']['data'][0]['media_type'];
if ($hashtag_media_type == 'VIDEO') {
echo '<video class="insta-gallery-image" src="' . esc_url($hashtag_media_url) . '"></video>';
echo ' <img class="insta-gallery-image" src="' . esc_url($hashtag_media_url) . '" alt="' . esc_attr('image') . '">';
if ($media_type == 'VIDEO') {
echo '<video class="insta-gallery-image" src="' . esc_url($media_url) . '"></video>';
echo ' <img class="insta-gallery-image" src="' . esc_url($media_url) . '" alt="' . esc_attr('image') . '">';
<div class="insta-gallery-item-type">
<div class="insta-gallery-item-type-icon">
if ($media_type == 'VIDEO') {
echo Helper::get_insta_video_icon();
} else if ($media_type == 'CAROUSEL_ALBUM') {
echo Helper::get_insta_image_carousel_icon();
echo Helper::get_insta_image_icon();
<div class="insta-gallery-item-info">
<?php if (strtolower($connected_account_type) === 'business') : ?>
<div class="insta-item-reaction-count">
<div class="insta-gallery-item-likes">
<?php echo Helper::get_insta_like_icon();
echo esc_html($like_count); ?>
<div class="insta-gallery-item-comments">
<?php echo Helper::get_insta_comment_icon();
echo esc_html($comments_count); ?>
<div class="insta-gallery-item-permalink">
<?php echo Helper::get_instagram_icon(); ?>
$feed_item = ob_get_clean();
$next_start_index = $start_index + count($next_posts);
'next_post_index' => $next_start_index,
'total_feed_posts' => count($feed_posts)
public static function getCalendlyUuid($url)
$pattern = '/\/([0-9a-fA-F-]+)$/';
if (preg_match($pattern, $url, $matches)) {
public static function getCalendlyUserInfo($access_token)
$transient_name = 'calendly_user_info_' . $access_token;
$user_info = get_transient($transient_name);
if (false === $user_info) {
$user_endpoint = 'https://api.calendly.com/users/me';
'Authorization' => "Bearer $access_token",
'Content-Type' => 'application/json',
$response = wp_remote_get($user_endpoint, $args);
if (!is_wp_error($response) && 200 === wp_remote_retrieve_response_code($response)) {
$user_info = wp_remote_retrieve_body($response);
set_transient($transient_name, $user_info, 3600);
public static function getCalaendlyEventTypes($user_uri, $access_token)
// Attempt to retrieve the data from the transient
$events_list = get_transient('calendly_events_list_' . md5($access_token));
if (false === $events_list) {
// If the data is not in the transient, fetch it from the API
$events_endpoint = "https://api.calendly.com/event_types?user=$user_uri";
'Authorization' => "Bearer $access_token",
'Content-Type' => 'application/json',
$response = wp_remote_get($events_endpoint, $args);
if (!is_wp_error($response)) {
$body = wp_remote_retrieve_body($response);
$events_list = json_decode($body, true);
// Store the data in a transient for a specified time (e.g., 1 hour)
set_transient('calendly_events_list', $events_list, HOUR_IN_SECONDS);
public static function getListEventInvitee($uuid, $access_token)
// Attempt to retrieve the data from the transient
$invitee_list = get_transient('calendly_invitee_list_' . md5($access_token));
if (false === $invitee_list) {
// If the data is not in the transient, fetch it from the API
$events_endpoint = "https://api.calendly.com/scheduled_events/$uuid/invitees";
'Authorization' => "Bearer $access_token",
'Content-Type' => 'application/json',
$response = wp_remote_get($events_endpoint, $args);
if (!is_wp_error($response)) {
$body = wp_remote_retrieve_body($response);
$invitee_list = json_decode($body, true);
// Store the data in a transient for a specified time (e.g., 1 hour)
set_transient('calendly_invitee_list', $invitee_list, HOUR_IN_SECONDS);
public static function getCalaendlyScheduledEvents($user_uri, $access_token)
// Attempt to retrieve the data from the transient
$events_list = get_transient('calendly_events_list_' . md5($access_token));
if (false === $events_list) {
// If the data is not in the transient, fetch it from the API
$events_endpoint = "https://api.calendly.com/scheduled_events?user=$user_uri";
'Authorization' => "Bearer $access_token",
'Content-Type' => 'application/json',
$response = wp_remote_get($events_endpoint, $args);
if (!is_wp_error($response)) {
$body = wp_remote_retrieve_body($response);
$events_list = json_decode($body, true);
// Store the data in a transient for a specified time (e.g., 1 hour)
set_transient('calendly_events_list', $events_list, HOUR_IN_SECONDS);
public static function parseDuration($durationString)
list($minutes, $seconds) = explode(':', $durationString);
return intval($minutes) * 60 + intval($seconds);
public static function generateAdTemplate($client_id, $attributes, $editor = 'elementor')
$adSource = isset($attributes['adSource']) ? $attributes['adSource'] : '';
$adContent = isset($attributes['adContent']) ? $attributes['adContent'] : '';
$unit = isset($attributes['unitoption']) ? $attributes['unitoption'] : 'px';
if ($editor === 'elementor') {
if ($attributes['adSource'] === 'video') {
$adFileUrl = isset($attributes['adFileUrl']['url']) ? $attributes['adFileUrl']['url'] : '';
} else if ($attributes['adSource'] === 'image') {
$adFileUrl = isset($attributes['adFileUrl1']['url']) ? $attributes['adFileUrl1']['url'] : '';
$adFileUrl = isset($attributes['adFileUrl2']['url']) ? $attributes['adFileUrl2']['url'] : '';
$width = isset($attributes['width']) ? $attributes['width']['size'] : '600';
$height = isset($attributes['height']) ? $attributes['height']['size'] : '550';
$adFileUrl = isset($attributes['adFileUrl']) ? $attributes['adFileUrl'] : '';
$width = isset($attributes['width']) ? $attributes['width'] : '600';
$height = isset($attributes['height']) ? $attributes['height'] : '550';
$adStart = isset($attributes['adStart']) ? intval($attributes['adStart']) : 0;
$adUrl = isset($attributes['adUrl']) ? $attributes['adUrl'] : '';
$adXPosition = isset($attributes['adXPosition']) ? $attributes['adXPosition'] : '';
$adYPosition = isset($attributes['adYPosition']) ? $attributes['adYPosition'] : '';
$adWidth = isset($attributes['adWidth']) ? $attributes['adWidth'] : '';
$adHeight = isset($attributes['adHeight']) ? $attributes['adHeight'] : '';
$adSkipButton = isset($attributes['adSkipButton']) ? $attributes['adSkipButton'] : false;
$adSkipButtonAfter = isset($attributes['adSkipButtonAfter']) ? intval($attributes['adSkipButtonAfter']) : 5;
if ($adContent && isset($adContent['fileLength'])) {
$videoDuration = self::parseDuration($adContent['fileLength']);
if (!empty($attributes['url']) && self::is_youtube_channel($attributes['url'])) {
$isYTChannelClass = ' ep-youtube-channel';
<div class="main-ad-template <?php echo esc_attr($adSource);
echo esc_attr($isYTChannelClass); ?>" id="<?php echo esc_attr('ad-' . $client_id); ?>" style="display:none">
<div class="ep-ad-container">
<div class="ep-ad-content" style="position: relative;">
<?php if (!empty($adUrl)) : ?> <a target="_blank" href="<?php echo esc_url($adUrl); ?>"> <?php endif; ?>
<?php if ($adSource === 'video') : ?>