| Server IP : 38.190.208.107 / Your IP : 216.73.217.51 Web Server : nginx/1.28.1 System : Linux ht2026040333114 6.1.0-10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.37-1 (2023-07-03) x86_64 User : root ( 0) PHP Version : 8.2.28 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv,eval,assert,passthru,system,exec,shell_exec,popen,proc_open MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wwwroot/wp.4/wp-content/themes/woodmart/js/scripts/global/ |
Upload File : |
/* global woodmart_settings */
(function($) {
woodmartThemeModule.callPhotoSwipe = function(index, items) {
if (woodmartThemeModule.$body.hasClass('rtl')) {
index = items.length - index - 1;
items = items.reverse();
}
var options = {
index : index,
shareButtons : [
{
id : 'facebook',
label: woodmart_settings.share_fb,
url : 'https://www.facebook.com/sharer/sharer.php?u={{url}}'
},
{
id : 'twitter',
label: woodmart_settings.tweet,
url : 'https://x.com/intent/tweet?text={{text}}&url={{url}}'
},
{
id : 'pinterest',
label: woodmart_settings.pin_it,
url : 'http://www.pinterest.com/pin/create/button/' +
'?url={{url}}&media={{image_url}}&description={{text}}'
},
{
id : 'download',
label : woodmart_settings.download_image,
url : '{{raw_image_url}}',
download: true
}
],
closeOnScroll: woodmart_settings.photoswipe_close_on_scroll,
isClickableElement: function (el) {
return el.tagName === 'A' || $(el).hasClass('wd-play-video')|| $(el).hasClass('wd-product-video');
},
getDoubleTapZoom: function (isMouseClick, item) {
if (isMouseClick || 'undefined' !== typeof item.html) {
return 1;
} else {
return item.initialZoomLevel < 0.7 ? 1 : 1.33;
}
}
};
woodmartThemeModule.$body.find('.pswp').remove();
woodmartThemeModule.$body.append(woodmart_settings.photoswipe_template);
var pswpElement = document.querySelectorAll('.pswp')[0];
// Initializes and opens PhotoSwipe
var gallery = new PhotoSwipe(pswpElement, PhotoSwipeUI_Default, items, options);
woodmartThemeModule.$document.trigger('wdPhotoSwipeBeforeInited', gallery );
gallery.init();
};
})(jQuery);