Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/wp-conte.../plugins/embedpre.../assets/js
File: front.js
if (instaPostData.show_likes_count == 'true') {
[500] Fix | Delete
likeComments += `
[501] Fix | Delete
<div class="embedpress-inline popup-like-button"><a target="_blank" href="${instaPostData.permalink}">${likeIcon} ${instaPostData.like_count || 0}</a></div>
[502] Fix | Delete
`;
[503] Fix | Delete
}
[504] Fix | Delete
if (instaPostData.show_comments_count == 'true') {
[505] Fix | Delete
likeComments += `
[506] Fix | Delete
<div class="embedpress-inline"><a target="_blank" href="${instaPostData.permalink}">${commentsIcon} ${instaPostData.comments_count || 0}</a></div>
[507] Fix | Delete
`;
[508] Fix | Delete
}
[509] Fix | Delete
}
[510] Fix | Delete
[511] Fix | Delete
[512] Fix | Delete
let followBtn = '';
[513] Fix | Delete
if (instaPostData.popup_follow_button_text == 'false') {
[514] Fix | Delete
instaPostData.popup_follow_button_text = '';
[515] Fix | Delete
}
[516] Fix | Delete
if (instaPostData.popup_follow_button == 'true' || instaPostData.popup_follow_button == 'yes') {
[517] Fix | Delete
followBtn = `<div class="insta-followbtn">
[518] Fix | Delete
<a target="_new" href="${srcUrl}" type="button" class="btn btn-primary">${instaPostData.popup_follow_button_text}</a>
[519] Fix | Delete
</div>`;
[520] Fix | Delete
}
[521] Fix | Delete
console.log(instaPostData);
[522] Fix | Delete
[523] Fix | Delete
let popupHtml = '';
[524] Fix | Delete
popupHtml += `
[525] Fix | Delete
<div class="popup-container">
[526] Fix | Delete
<div class="popup-md-9 white">
[527] Fix | Delete
<div class="embedpress-popup-block embedpress-popup-img" id="post-${instaPostData.id}">
[528] Fix | Delete
${carouselTemplate}
[529] Fix | Delete
</div>
[530] Fix | Delete
</div>
[531] Fix | Delete
<div class="popup-md-3 red">
[532] Fix | Delete
<div class="embedpress-popup-block embedpress-popup-info">
[533] Fix | Delete
<div class="embedpress-popup-header">
[534] Fix | Delete
<div class="embedpress-popup-header-img"> <a target="_blank" href="${srcUrl}"
[535] Fix | Delete
target="_blank" class="embedpress-href">
[536] Fix | Delete
<img decoding="async" loading="lazy" class="embedpress-popup-round" src="${instaPostData.profile_picture_url}" width="30" height="30"> <span class="embedpress-popup-username">${instaPostData.username}</span>
[537] Fix | Delete
</a>
[538] Fix | Delete
</div>
[539] Fix | Delete
${followBtn}
[540] Fix | Delete
</div>
[541] Fix | Delete
<div class="embedpress-popup-text">${captionText}</div>
[542] Fix | Delete
<div class="embedpress-popup-stats">
[543] Fix | Delete
${likeComments}
[544] Fix | Delete
<div class="embedpress-inline">
[545] Fix | Delete
<div class="embedpress-popup-share-buttons"> <a
[546] Fix | Delete
href="https://www.facebook.com/sharer/sharer.php?u=${instaPostData.permalink}" target="_blank">
[547] Fix | Delete
<span class="dashicons dashicons-facebook"></span></a> <a
[548] Fix | Delete
href="https://twitter.com/intent/tweet?url=${instaPostData.permalink}"
[549] Fix | Delete
target="_blank"><span>
[550] Fix | Delete
<svg viewBox="0 0 18 18" aria-hidden="true" class="r-4qtqp9 r-yyyyoo r-dnmrzs r-bnwqim r-1plcrui r-lrvibr r-lrsllp r-18jsvk2 r-16y2uox r-8kz0gk" width="18" height="18"><path d="M13.683 1.688h2.481l-5.42 6.195 6.377 8.43h-4.993L8.217 11.2l-4.474 5.113H1.26l5.798-6.626L.941 1.688H6.06l3.535 4.673zm-.871 13.14h1.375L5.313 3.095H3.838z"/></svg>
[551] Fix | Delete
</span></a>
[552] Fix | Delete
<a href="https://www.linkedin.com/shareArticle?mini=true&amp;url=${instaPostData.permalink}"
[553] Fix | Delete
target="_blank"><span class="dashicons dashicons-linkedin"></span></a> <a
[554] Fix | Delete
href="https://pinterest.com/pin/create/button/?url=${instaPostData.permalink}"
[555] Fix | Delete
target="_blank"><span class="dashicons dashicons-pinterest"></span></a></div>
[556] Fix | Delete
<div class="embedpress-href embedpress-popup-share">${shareIcon}</div>
[557] Fix | Delete
</div><div class="embedpress-inline embedpress-popup-instagram-buttons"><a
[558] Fix | Delete
href="${instaPostData.permalink}" target="_blank"
[559] Fix | Delete
class="embedpress-href">${instaIcon}</a></div>
[560] Fix | Delete
</div>
[561] Fix | Delete
[562] Fix | Delete
</div>
[563] Fix | Delete
</div>
[564] Fix | Delete
</div>
[565] Fix | Delete
`;
[566] Fix | Delete
[567] Fix | Delete
// INIT CAROUSEL
[568] Fix | Delete
[569] Fix | Delete
[570] Fix | Delete
return popupHtml;
[571] Fix | Delete
}
[572] Fix | Delete
[573] Fix | Delete
// Add a click event listener to the insta-gallery container
[574] Fix | Delete
epGlobals.instaPopup = (container) => {
[575] Fix | Delete
container?.addEventListener('click', function (event) {
[576] Fix | Delete
// Check if the clicked element has the class insta-gallery-item
[577] Fix | Delete
const instaItem = event.target.closest('.insta-gallery-item');
[578] Fix | Delete
[579] Fix | Delete
if (instaItem) {
[580] Fix | Delete
[581] Fix | Delete
const postData = instaItem.dataset.postdata;
[582] Fix | Delete
[583] Fix | Delete
const postid = instaItem.getAttribute('data-insta-postid');
[584] Fix | Delete
const accountType = container?.closest('.instagram-container')?.getAttribute('data-connected-acc-type');
[585] Fix | Delete
[586] Fix | Delete
let hashtag = '';
[587] Fix | Delete
[588] Fix | Delete
if (instaItem.closest('.instagram-container').getAttribute('data-hashtag')) {
[589] Fix | Delete
hashtag = instaItem?.closest('.instagram-container')?.getAttribute('data-hashtag');
[590] Fix | Delete
}
[591] Fix | Delete
[592] Fix | Delete
const closestPopup = event.target.closest('.ose-instagram-feed')?.querySelector('.insta-popup');
[593] Fix | Delete
[594] Fix | Delete
if (closestPopup) {
[595] Fix | Delete
closestPopup.style.display = 'block';
[596] Fix | Delete
}
[597] Fix | Delete
[598] Fix | Delete
[599] Fix | Delete
var feedElement = event.target.closest('.ose-instagram-feed');
[600] Fix | Delete
if (feedElement) {
[601] Fix | Delete
var popupElement = feedElement.querySelector('.popup-is-initialized');
[602] Fix | Delete
if (popupElement) {
[603] Fix | Delete
popupElement.innerHTML = getPopupTemplate(postData, hashtag, accountType);
[604] Fix | Delete
}
[605] Fix | Delete
}
[606] Fix | Delete
[607] Fix | Delete
if (!document.querySelector(`#post-${postid}`)?.classList.contains('carousel-is-initialized')) {
[608] Fix | Delete
const carousel = new CgCarousel(`#post-${postid}`, { slidesPerView: 1, loop: true }, {});
[609] Fix | Delete
[610] Fix | Delete
const next = document.querySelector(`#post-${postid} .js-carousel__next-1`);
[611] Fix | Delete
next?.addEventListener('click', () => carousel.next());
[612] Fix | Delete
[613] Fix | Delete
const prev = document.querySelector(`#post-${postid} .js-carousel__prev-1`);
[614] Fix | Delete
prev?.addEventListener('click', () => carousel.prev());
[615] Fix | Delete
[616] Fix | Delete
document.querySelector(`#post-${postid}`)?.classList.add('carousel-is-initialized');
[617] Fix | Delete
}
[618] Fix | Delete
[619] Fix | Delete
}
[620] Fix | Delete
});
[621] Fix | Delete
}
[622] Fix | Delete
[623] Fix | Delete
[624] Fix | Delete
const instaContainers = document.querySelectorAll('.embedpress-gutenberg-wrapper .insta-gallery');
[625] Fix | Delete
if (instaContainers.length > 0) {
[626] Fix | Delete
instaContainers.forEach((container) => {
[627] Fix | Delete
epGlobals.instaPopup(container);
[628] Fix | Delete
});
[629] Fix | Delete
}
[630] Fix | Delete
[631] Fix | Delete
$('.popup-close').click(function (e) {
[632] Fix | Delete
// Hide the popup by setting display to none
[633] Fix | Delete
$('.insta-popup').hide();
[634] Fix | Delete
$('.popup-container').remove();
[635] Fix | Delete
});
[636] Fix | Delete
[637] Fix | Delete
$(document).on('click', function (e) {
[638] Fix | Delete
if (e.target.classList.contains('popup-wrapper')) {
[639] Fix | Delete
$('.insta-popup').hide();
[640] Fix | Delete
$('.popup-container').remove();
[641] Fix | Delete
}
[642] Fix | Delete
});
[643] Fix | Delete
[644] Fix | Delete
[645] Fix | Delete
const instafeeds = document.querySelectorAll('.ose-instagram-feed');
[646] Fix | Delete
[647] Fix | Delete
epGlobals.initializeTabs = (containerEl) => {
[648] Fix | Delete
[649] Fix | Delete
// Initial tab selection
[650] Fix | Delete
showItems('ALL');
[651] Fix | Delete
[652] Fix | Delete
containerEl.addEventListener('click', function (event) {
[653] Fix | Delete
const clickedElement = event.target;
[654] Fix | Delete
if (!clickedElement) {
[655] Fix | Delete
return; // No element clicked, ignore the event
[656] Fix | Delete
}
[657] Fix | Delete
[658] Fix | Delete
if (containerEl.querySelector('.load-more-button-container') && (clickedElement.getAttribute('data-media-type') === 'VIDEO' || clickedElement.getAttribute('data-media-type') === 'CAROUSEL_ALBUM')) {
[659] Fix | Delete
containerEl.querySelector('.load-more-button-container').style.display = 'none';
[660] Fix | Delete
}
[661] Fix | Delete
else if (containerEl.querySelector('.load-more-button-container') && (clickedElement.getAttribute('data-media-type') === 'ALL')) {
[662] Fix | Delete
containerEl.querySelector('.load-more-button-container').style.display = 'flex';
[663] Fix | Delete
}
[664] Fix | Delete
[665] Fix | Delete
// Handle tab click
[666] Fix | Delete
if (clickedElement.matches('.tabs li')) {
[667] Fix | Delete
if (clickedElement.classList.contains('active')) {
[668] Fix | Delete
return;
[669] Fix | Delete
} else {
[670] Fix | Delete
const mediaType = clickedElement.getAttribute('data-media-type');
[671] Fix | Delete
showItems(mediaType);
[672] Fix | Delete
[673] Fix | Delete
const tabs = containerEl.querySelectorAll('.tabs li');
[674] Fix | Delete
tabs.forEach(t => t.classList.remove('active'));
[675] Fix | Delete
clickedElement.classList.add('active');
[676] Fix | Delete
}
[677] Fix | Delete
}
[678] Fix | Delete
[679] Fix | Delete
});
[680] Fix | Delete
[681] Fix | Delete
function showItems(mediaType) {
[682] Fix | Delete
const items = containerEl.getElementsByClassName('insta-gallery-item');
[683] Fix | Delete
for (let i = 0; i < items.length; i++) {
[684] Fix | Delete
const item = items[i];
[685] Fix | Delete
if (mediaType === 'ALL' || item.getAttribute('data-media-type') === mediaType) {
[686] Fix | Delete
item.style.display = 'block';
[687] Fix | Delete
} else {
[688] Fix | Delete
item.style.display = 'none';
[689] Fix | Delete
}
[690] Fix | Delete
}
[691] Fix | Delete
}
[692] Fix | Delete
}
[693] Fix | Delete
[694] Fix | Delete
epGlobals.instaLoadMore = () => {
[695] Fix | Delete
// Unbind any previously bound click event to avoid multiple bindings
[696] Fix | Delete
$('.insta-load-more-button').off('click').on('click', function (e) {
[697] Fix | Delete
const that = $(this);
[698] Fix | Delete
const loadmoreBtn = that.closest('.load-more-button-container');
[699] Fix | Delete
const loadmoreKey = loadmoreBtn.data('loadmorekey');
[700] Fix | Delete
const connectedAccount = that.closest('.instagram-container').data('connected-acc-type');
[701] Fix | Delete
const feedType = that.closest('.instagram-container').data('feed-type');
[702] Fix | Delete
const hashtagId = that.closest('.instagram-container').data('hashtag-id');
[703] Fix | Delete
const userId = that.closest('.instagram-container').data('uid');
[704] Fix | Delete
let loadedPosts = loadmoreBtn.data('loaded-posts') || 0;
[705] Fix | Delete
let postsPerPage = loadmoreBtn.data('posts-per-page') || 0;
[706] Fix | Delete
const params = JSON.stringify(that.closest('.instagram-container').data('params'));
[707] Fix | Delete
[708] Fix | Delete
[709] Fix | Delete
const instaContainer = that.closest('.instagram-container');
[710] Fix | Delete
[711] Fix | Delete
const spinicon = `<svg class="insta-loadmore-spinicon" width="18" height="18" fill="${'#fff'}" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><style>.spinner_GuJz{transform-origin:center;animation:spinner_STY6 1.5s linear infinite}@keyframes spinner_STY6{100%{transform:rotate(360deg)}}</style><g class="spinner_GuJz"><circle cx="3" cy="12" r="2"/><circle cx="21" cy="12" r="2"/><circle cx="12" cy="21" r="2"/><circle cx="12" cy="3" r="2"/><circle cx="5.64" cy="5.64" r="2"/><circle cx="18.36" cy="18.36" r="2"/><circle cx="5.64" cy="18.36" r="2"/><circle cx="18.36" cy="5.64" r="2"/></g></svg>`;
[712] Fix | Delete
[713] Fix | Delete
// Check if no spinicon exists
[714] Fix | Delete
if (instaContainer.find('.insta-loadmore-spinicon').length === 0) {
[715] Fix | Delete
that.append(spinicon);
[716] Fix | Delete
}
[717] Fix | Delete
[718] Fix | Delete
that.attr('disabled', true);
[719] Fix | Delete
[720] Fix | Delete
var data = {
[721] Fix | Delete
'action': 'loadmore_data_handler',
[722] Fix | Delete
'user_id': userId,
[723] Fix | Delete
'loaded_posts': loadedPosts,
[724] Fix | Delete
'posts_per_page': postsPerPage,
[725] Fix | Delete
'feed_type': feedType,
[726] Fix | Delete
'connected_account_type': connectedAccount,
[727] Fix | Delete
'loadmore_key': loadmoreKey,
[728] Fix | Delete
'params': params,
[729] Fix | Delete
'_nonce': eplocalize.nonce
[730] Fix | Delete
};
[731] Fix | Delete
[732] Fix | Delete
if (feedType === 'hashtag_type') {
[733] Fix | Delete
data.hashtag_id = hashtagId;
[734] Fix | Delete
}
[735] Fix | Delete
[736] Fix | Delete
jQuery.post(eplocalize.ajaxurl, data, function (response) {
[737] Fix | Delete
if (response.total_feed_posts >= response.next_post_index) {
[738] Fix | Delete
var $responseHtml = $(response.html);
[739] Fix | Delete
[740] Fix | Delete
instaContainer.find('.insta-gallery').append($responseHtml);
[741] Fix | Delete
that.removeAttr('disabled');
[742] Fix | Delete
[743] Fix | Delete
instaContainer.find('.insta-loadmore-spinicon').remove();
[744] Fix | Delete
[745] Fix | Delete
loadedPosts = response.next_post_index;
[746] Fix | Delete
[747] Fix | Delete
loadmoreBtn.data('loaded-posts', loadedPosts);
[748] Fix | Delete
[749] Fix | Delete
// After loading more items, reinitialize the tabs for the specific container
[750] Fix | Delete
const containerEl = loadmoreBtn.closest('.ose-instagram-feed')[0];
[751] Fix | Delete
epGlobals.initializeTabs(containerEl);
[752] Fix | Delete
[753] Fix | Delete
if (response.total_feed_posts === response.next_post_index) {
[754] Fix | Delete
loadmoreBtn.remove();
[755] Fix | Delete
}
[756] Fix | Delete
} else {
[757] Fix | Delete
loadmoreBtn.remove();
[758] Fix | Delete
}
[759] Fix | Delete
});
[760] Fix | Delete
});
[761] Fix | Delete
}
[762] Fix | Delete
[763] Fix | Delete
[764] Fix | Delete
if (instafeeds.length > 0) {
[765] Fix | Delete
instafeeds.forEach(function (feed) {
[766] Fix | Delete
epGlobals.initializeTabs(feed);
[767] Fix | Delete
});
[768] Fix | Delete
}
[769] Fix | Delete
[770] Fix | Delete
if ($('.embedpress-gutenberg-wrapper .ose-instagram-feed').length > 0) {
[771] Fix | Delete
epGlobals.instaLoadMore();
[772] Fix | Delete
}
[773] Fix | Delete
[774] Fix | Delete
$(document).on({
[775] Fix | Delete
mouseenter: function () {
[776] Fix | Delete
$('.embedpress-popup-share-buttons').addClass('show');
[777] Fix | Delete
},
[778] Fix | Delete
mouseleave: function () {
[779] Fix | Delete
var buttons = $('.embedpress-popup-share-buttons');
[780] Fix | Delete
setTimeout(function () {
[781] Fix | Delete
if (!buttons.is(':hover')) buttons.removeClass('show');
[782] Fix | Delete
}, 200);
[783] Fix | Delete
}
[784] Fix | Delete
}, '.embedpress-href.embedpress-popup-share, .embedpress-popup-share-buttons');
[785] Fix | Delete
[786] Fix | Delete
$(document).on({
[787] Fix | Delete
mouseenter: function () {
[788] Fix | Delete
$(this).addClass('show');
[789] Fix | Delete
},
[790] Fix | Delete
mouseleave: function () {
[791] Fix | Delete
$(this).removeClass('show');
[792] Fix | Delete
}
[793] Fix | Delete
}, '.embedpress-popup-share-buttons');
[794] Fix | Delete
[795] Fix | Delete
[796] Fix | Delete
[797] Fix | Delete
[798] Fix | Delete
[799] Fix | Delete
})(jQuery);
[800] Fix | Delete
[801] Fix | Delete
[802] Fix | Delete
[803] Fix | Delete
document.addEventListener('DOMContentLoaded', function () {
[804] Fix | Delete
[805] Fix | Delete
epGlobals.initCarousel = (carouselSelector, options, carouselId) => {
[806] Fix | Delete
[807] Fix | Delete
const carouselOptions = {
[808] Fix | Delete
slidesPerView: options.slideshow,
[809] Fix | Delete
spacing: options.spacing,
[810] Fix | Delete
loop: options.loop,
[811] Fix | Delete
autoplay: options.autoplay,
[812] Fix | Delete
transitionSpeed: options.transitionspeed,
[813] Fix | Delete
autoplaySpeed: options.autoplayspeed,
[814] Fix | Delete
arrows: options.arrows,
[815] Fix | Delete
breakpoints: {
[816] Fix | Delete
768: {
[817] Fix | Delete
slidesPerView: parseInt(options.slideshow) - 1
[818] Fix | Delete
},
[819] Fix | Delete
1024: {
[820] Fix | Delete
slidesPerView: parseInt(options.slideshow)
[821] Fix | Delete
}
[822] Fix | Delete
}
[823] Fix | Delete
};
[824] Fix | Delete
[825] Fix | Delete
// INIT CAROUSEL
[826] Fix | Delete
const carousel = new CgCarousel(carouselSelector, carouselOptions, {});
[827] Fix | Delete
[828] Fix | Delete
// Navigation
[829] Fix | Delete
const next = document.querySelector(`[data-carouselid="${carouselId}"] #js-carousel__next-1`);
[830] Fix | Delete
next.addEventListener('click', () => carousel.next());
[831] Fix | Delete
[832] Fix | Delete
const prev = document.querySelector(`[data-carouselid="${carouselId}"] #js-carousel__prev-1`);
[833] Fix | Delete
prev.addEventListener('click', () => carousel.prev());
[834] Fix | Delete
}
[835] Fix | Delete
[836] Fix | Delete
const instaWrappers = document.querySelectorAll('.ep-embed-content-wraper');
[837] Fix | Delete
[838] Fix | Delete
if (instaWrappers.length > 0) {
[839] Fix | Delete
instaWrappers.forEach((wrapper) => {
[840] Fix | Delete
const carouselId = wrapper.getAttribute('data-carouselid');
[841] Fix | Delete
[842] Fix | Delete
if (!carouselId) return;
[843] Fix | Delete
[844] Fix | Delete
let options = wrapper.getAttribute(`data-carousel-options`);
[845] Fix | Delete
[846] Fix | Delete
options = JSON.parse(options);
[847] Fix | Delete
const carouselSelector = `[data-carouselid="${carouselId}"] .embedpress-insta-container`;
[848] Fix | Delete
[849] Fix | Delete
if (options.arrows) {
[850] Fix | Delete
document.querySelector(`[data-carouselid="${carouselId}"] .cg-carousel__btns`).classList.remove('hidden');
[851] Fix | Delete
}
[852] Fix | Delete
[853] Fix | Delete
epGlobals.initCarousel(carouselSelector, options, carouselId);
[854] Fix | Delete
[855] Fix | Delete
});
[856] Fix | Delete
}
[857] Fix | Delete
[858] Fix | Delete
[859] Fix | Delete
[860] Fix | Delete
});
[861] Fix | Delete
[862] Fix | Delete
[863] Fix | Delete
[864] Fix | Delete
jQuery(window).on("elementor/frontend/init", function () {
[865] Fix | Delete
[866] Fix | Delete
var filterableGalleryHandler = function ($scope, $) {
[867] Fix | Delete
[868] Fix | Delete
// Get the Elementor unique selector for this widget
[869] Fix | Delete
let classes = $scope[0].className;
[870] Fix | Delete
let selectorEl = '.' + classes.split(' ').join('.');
[871] Fix | Delete
[872] Fix | Delete
const epElLoadMore = () => {
[873] Fix | Delete
[874] Fix | Delete
const spinicon = '<svg width="18" height="18" fill="#fff" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><style>.spinner_GuJz{transform-origin:center;animation:spinner_STY6 1.5s linear infinite}@keyframes spinner_STY6{100%{transform:rotate(360deg)}}</style><g class="spinner_GuJz"><circle cx="3" cy="12" r="2"/><circle cx="21" cy="12" r="2"/><circle cx="12" cy="21" r="2"/><circle cx="12" cy="3" r="2"/><circle cx="5.64" cy="5.64" r="2"/><circle cx="18.36" cy="18.36" r="2"/><circle cx="5.64" cy="18.36" r="2"/><circle cx="18.36" cy="5.64" r="2"/></g></svg>';
[875] Fix | Delete
[876] Fix | Delete
$('.elementor-widget-container .ep-nft-gallery-wrapper').each(function () {
[877] Fix | Delete
let selctorEl = `.elementor-widget-container [data-nftid='${$(this).data('nftid')}']`;
[878] Fix | Delete
let loadmorelabel = $(selctorEl).data('loadmorelabel');
[879] Fix | Delete
$(selctorEl + ` .ep_nft_item`).slice(0, $(selctorEl).data('itemparpage')).show();
[880] Fix | Delete
$('.elementor-widget-container .ep-nft-gallery-wrapper .ep-loadmore-wrapper button').css('display', 'flex');
[881] Fix | Delete
[882] Fix | Delete
$(selctorEl + " .nft-loadmore").click(function (e) {
[883] Fix | Delete
//change the text of the button
[884] Fix | Delete
$(this).html(loadmorelabel + spinicon);
[885] Fix | Delete
[886] Fix | Delete
//disable the button
[887] Fix | Delete
$(this).prop("disabled", true);
[888] Fix | Delete
//wait for 1 seconds
[889] Fix | Delete
setTimeout(function () {
[890] Fix | Delete
//change the text back
[891] Fix | Delete
$(selctorEl + " .nft-loadmore").text(loadmorelabel);
[892] Fix | Delete
//enable the button
[893] Fix | Delete
$(selctorEl + " .nft-loadmore").prop("disabled", false);
[894] Fix | Delete
$(selctorEl + " .ep_nft_item:hidden").slice(0, $(selctorEl).data('itemparpage')).fadeIn("slow");
[895] Fix | Delete
if ($(selctorEl + " .ep_nft_item:hidden").length == 0) {
[896] Fix | Delete
$(selctorEl + " .nft-loadmore").fadeOut("slow");
[897] Fix | Delete
}
[898] Fix | Delete
}, 500);
[899] Fix | Delete
});
[900] Fix | Delete
});
[901] Fix | Delete
};
[902] Fix | Delete
[903] Fix | Delete
if ($('.elementor-widget-container .ep-nft-gallery-wrapper').length > 0) {
[904] Fix | Delete
epElLoadMore();
[905] Fix | Delete
}
[906] Fix | Delete
[907] Fix | Delete
// Content protection system function
[908] Fix | Delete
const unlockElSubmitHander = (perentSel, that) => {
[909] Fix | Delete
var ep_client_id = jQuery(that).closest('form').find('input[name="ep_client_id"]').val();
[910] Fix | Delete
var password = jQuery(`input[name="pass_${ep_client_id}"]`).val();
[911] Fix | Delete
var post_id = jQuery(`input[name="post_id"]`).val();
[912] Fix | Delete
const buttonText = jQuery(that).closest('.password-form-container').find('input[type="submit"]').val();
[913] Fix | Delete
const unlokingText = jQuery(that).data('unlocking-text');
[914] Fix | Delete
[915] Fix | Delete
var data = {
[916] Fix | Delete
'action': 'lock_content_form_handler',
[917] Fix | Delete
'client_id': ep_client_id,
[918] Fix | Delete
'password': password,
[919] Fix | Delete
'post_id': post_id,
[920] Fix | Delete
};
[921] Fix | Delete
[922] Fix | Delete
jQuery('#' + perentSel + '-' + ep_client_id + ' .password-form input[type="submit"]').val(unlokingText);
[923] Fix | Delete
[924] Fix | Delete
jQuery.post(eplocalize.ajaxurl, data, function (response) {
[925] Fix | Delete
if (response.success) {
[926] Fix | Delete
if (!response.embedHtml) {
[927] Fix | Delete
jQuery('#' + perentSel + '-' + ep_client_id + ' .password-form input[type="submit"]').val(buttonText);
[928] Fix | Delete
jQuery('#' + perentSel + '-' + ep_client_id + ' .password-form input[type="password"]').val('');
[929] Fix | Delete
jQuery(that).closest('.password-form-container').find('.error-message').removeClass('hidden');
[930] Fix | Delete
}
[931] Fix | Delete
else {
[932] Fix | Delete
if ($('.ep-content-locked').has('#' + perentSel + '-' + ep_client_id).length) {
[933] Fix | Delete
$('.ep-content-locked').removeClass('ep-content-locked');
[934] Fix | Delete
}
[935] Fix | Delete
[936] Fix | Delete
jQuery('#' + perentSel + '-' + ep_client_id + ' .ep-embed-content-wraper').html(response.embedHtml);
[937] Fix | Delete
[938] Fix | Delete
$('#' + perentSel + '-' + ep_client_id).removeClass('ep-content-protection-enabled');
[939] Fix | Delete
[940] Fix | Delete
if (jQuery('#' + perentSel + '-' + ep_client_id + ' .ose-youtube').length > 0) {
[941] Fix | Delete
epGlobals.youtubeChannelGallery();
[942] Fix | Delete
}
[943] Fix | Delete
[944] Fix | Delete
if ($('.elementor-widget-container .ep-nft-gallery-wrapper').length > 0) {
[945] Fix | Delete
epElLoadMore();
[946] Fix | Delete
}
[947] Fix | Delete
}
[948] Fix | Delete
} else {
[949] Fix | Delete
jQuery('#password-error_' + ep_client_id).html(response.form);
[950] Fix | Delete
jQuery('#password-error_' + ep_client_id).show();
[951] Fix | Delete
}
[952] Fix | Delete
}, 'json');
[953] Fix | Delete
}
[954] Fix | Delete
[955] Fix | Delete
// unlockElSubmitHander called for Elementor
[956] Fix | Delete
jQuery('.ep-elementor-content .password-form').submit(function (e) {
[957] Fix | Delete
e.preventDefault(); // Prevent the default form submission
[958] Fix | Delete
unlockElSubmitHander('ep-elementor-content', this);
[959] Fix | Delete
});
[960] Fix | Delete
[961] Fix | Delete
[962] Fix | Delete
const instaWrappers = document.querySelectorAll('.ep-embed-content-wraper');
[963] Fix | Delete
[964] Fix | Delete
if (instaWrappers.length > 0) {
[965] Fix | Delete
instaWrappers.forEach((wrapper) => {
[966] Fix | Delete
const carouselId = wrapper.getAttribute('data-carouselid');
[967] Fix | Delete
[968] Fix | Delete
if (!carouselId) return;
[969] Fix | Delete
[970] Fix | Delete
let options = wrapper.getAttribute(`data-carousel-options`);
[971] Fix | Delete
[972] Fix | Delete
options = JSON.parse(options);
[973] Fix | Delete
const carouselSelector = `[data-carouselid="${carouselId}"] .embedpress-insta-container`;
[974] Fix | Delete
[975] Fix | Delete
if (options.arrows) {
[976] Fix | Delete
document.querySelector(`[data-carouselid="${carouselId}"] .cg-carousel__btns`).classList.remove('hidden');
[977] Fix | Delete
}
[978] Fix | Delete
[979] Fix | Delete
epGlobals.initCarousel(carouselSelector, options, carouselId);
[980] Fix | Delete
[981] Fix | Delete
});
[982] Fix | Delete
}
[983] Fix | Delete
[984] Fix | Delete
const instaFeed = document.querySelector(`${selectorEl} .ose-instagram-feed`);
[985] Fix | Delete
const instaGallery = document.querySelector(`${selectorEl} .insta-gallery`);
[986] Fix | Delete
if (instaFeed) {
[987] Fix | Delete
epGlobals.initializeTabs(instaFeed);
[988] Fix | Delete
}
[989] Fix | Delete
if (instaGallery) {
[990] Fix | Delete
epGlobals.instaPopup(instaGallery);
[991] Fix | Delete
[992] Fix | Delete
$('.popup-close').click(function (e) {
[993] Fix | Delete
// Hide the popup by setting display to none
[994] Fix | Delete
$('.insta-popup').hide();
[995] Fix | Delete
$('.popup-container').remove();
[996] Fix | Delete
});
[997] Fix | Delete
[998] Fix | Delete
}
[999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function