Version Description
- 2022.11.02 =
- Improved admin options
- Fixed a notice with all files table shortcode
Download this release
Release Info
Developer | codename065 |
Plugin | WordPress Download Manager |
Version | 3.2.59 |
Comparing to | |
See all releases |
Code changes from version 3.2.58 to 3.2.59
- assets/js/wpdm-admin.js +84 -36
- assets/js/wpdm-admin.min.js +0 -1
- download-manager.php +5 -2
- readme.txt +8 -1
- src/Package/Shortcodes.php +5 -0
- src/__/__.php +7 -0
assets/js/wpdm-admin.js
CHANGED
@@ -30,11 +30,22 @@ String.prototype.wpdm_hash = function(){
|
|
30 |
}
|
31 |
|
32 |
var WPDM = {
|
|
|
33 |
|
34 |
init: function ($) {
|
35 |
|
36 |
},
|
37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
copy: function ($id) {
|
39 |
var copyText = document.getElementById($id);
|
40 |
copyText.select();
|
@@ -43,6 +54,31 @@ var WPDM = {
|
|
43 |
WPDM.notify('<i class="fa fa-check-double"></i> Copied', 'success', 'top-center', 1000);
|
44 |
},
|
45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
hash: function (str) {
|
47 |
return str.wpdm_hash();
|
48 |
},
|
@@ -62,10 +98,10 @@ var WPDM = {
|
|
62 |
return uniq;
|
63 |
},
|
64 |
|
65 |
-
popupWindow: function (url, title, w, h) {
|
66 |
/* Fixes dual-screen position Most browsers Firefox */
|
67 |
-
var dualScreenLeft = window.screenLeft
|
68 |
-
var dualScreenTop = window.screenTop
|
69 |
|
70 |
var width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width;
|
71 |
var height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height;
|
@@ -78,33 +114,39 @@ var WPDM = {
|
|
78 |
if (window.focus) {
|
79 |
newWindow.focus();
|
80 |
}
|
81 |
-
|
|
|
82 |
return false;
|
83 |
},
|
84 |
|
85 |
bootAlert: function (heading, content, width) {
|
86 |
-
|
|
|
|
|
|
|
|
|
|
|
87 |
if (!width) width = 400;
|
88 |
-
if ($modal_id !== '') jQuery($modal_id).remove();
|
89 |
-
var modal_id = '__bootModal_' + WPDM.uniqueID();
|
90 |
-
$modal_id = '#' + modal_id;
|
91 |
html = '<div class="w3eden" id="w3eden' + modal_id + '"><div id="' + modal_id + '" class="modal fade" tabindex="-1" role="dialog">\n' +
|
92 |
' <div class="modal-dialog" style="width: ' + width + 'px" role="document">\n' +
|
93 |
' <div class="modal-content" style="border-radius: 4px;overflow: hidden">\n' +
|
94 |
-
' <div class="modal-header" style="padding: 12px 15px;background: rgba(0,0,0,0.02);">\n' +
|
95 |
-
' <h4 class="modal-title" style="font-size: 10pt;font-weight: 600;padding: 0;margin: 0;letter-spacing: 0.5px">' + heading + '</h4>\n' +
|
96 |
' </div>\n' +
|
97 |
' <div class="modal-body fetfont" style="line-height: 1.5;text-transform: unset;font-weight:400;letter-spacing:0.5px;font-size: 12px">\n' +
|
98 |
' ' + content + '\n' +
|
99 |
' </div>\n' +
|
100 |
-
' <div class="modal-footer" style="padding: 10px 15px">\n' +
|
101 |
-
' <button type="button" class="btn btn-secondary btn-xs" data-target="#' + modal_id + '" data-dismiss="modal">Close</button>\n' +
|
102 |
-
' </div>\n' +
|
103 |
' </div>\n' +
|
104 |
' </div>\n' +
|
105 |
'</div></div>';
|
106 |
jQuery('body').append(html);
|
107 |
jQuery("#" + modal_id).modal({show: true, backdrop: 'static'});
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
return jQuery("#" + modal_id);
|
109 |
},
|
110 |
|
@@ -273,7 +315,10 @@ var WPDM = {
|
|
273 |
audioUI: function (audio) {
|
274 |
var $ = jQuery, song_length, song_length_m, song_length_s;
|
275 |
|
276 |
-
|
|
|
|
|
|
|
277 |
|
278 |
if (audio.duration !== Infinity) {
|
279 |
song_length = parseInt(audio.duration);
|
@@ -394,20 +439,21 @@ var WPDM = {
|
|
394 |
$(this).on("contextmenu", function (e) {
|
395 |
// return native menu if pressing control
|
396 |
if (e.ctrlKey) return;
|
397 |
-
|
|
|
398 |
//open menu
|
399 |
var $menu = $(settings.menuSelector)
|
400 |
-
.data("invokedOn", $(
|
401 |
.show()
|
402 |
.css({
|
403 |
-
position: "
|
404 |
-
left: getMenuPosition(e.clientX
|
405 |
-
top: getMenuPosition(e.clientY
|
406 |
})
|
407 |
.off('click')
|
408 |
.on('click', 'a', function (e) {
|
409 |
$menu.hide();
|
410 |
-
|
411 |
var $invokedOn = $menu.data("invokedOn");
|
412 |
var $selectedMenu = $(e.target);
|
413 |
|
@@ -442,9 +488,9 @@ var WPDM = {
|
|
442 |
jQuery(function ($) {
|
443 |
|
444 |
// Uploading files
|
445 |
-
var file_frame, dfield;
|
446 |
|
447 |
-
$
|
448 |
$(this).animate({
|
449 |
opacity: 0
|
450 |
}, 1000, function () {
|
@@ -452,7 +498,7 @@ jQuery(function ($) {
|
|
452 |
});
|
453 |
});
|
454 |
|
455 |
-
$
|
456 |
e.preventDefault();
|
457 |
var url = $(this).attr('href');
|
458 |
var width = 600;
|
@@ -467,7 +513,7 @@ jQuery(function ($) {
|
|
467 |
return false;
|
468 |
});
|
469 |
|
470 |
-
$
|
471 |
event.preventDefault();
|
472 |
$btn = $(this);
|
473 |
$btn.attr('disabled', 'disabled').html('<i class="fa fa-refresh fa-spin"></i>');
|
@@ -483,11 +529,11 @@ jQuery(function ($) {
|
|
483 |
});
|
484 |
});
|
485 |
|
486 |
-
$
|
487 |
$(this).select();
|
488 |
});
|
489 |
|
490 |
-
$
|
491 |
event.preventDefault();
|
492 |
if (!confirm('Are you sure?')) return false;
|
493 |
$btn = $(this);
|
@@ -504,12 +550,12 @@ jQuery(function ($) {
|
|
504 |
});
|
505 |
|
506 |
|
507 |
-
$
|
508 |
$(this).css('width', $(this).css('width')).attr('disabled', 'disabled');
|
509 |
$(this).html($(this).data('onclick'));
|
510 |
});
|
511 |
|
512 |
-
$
|
513 |
event.preventDefault();
|
514 |
dfield = $($(this).attr('rel'));
|
515 |
|
@@ -540,7 +586,7 @@ jQuery(function ($) {
|
|
540 |
file_frame.open();
|
541 |
});
|
542 |
|
543 |
-
$
|
544 |
event.preventDefault();
|
545 |
dfield = $($(this).attr('rel'));
|
546 |
var dfield_h = $($(this).attr('rel') + '_hidden');
|
@@ -564,6 +610,7 @@ jQuery(function ($) {
|
|
564 |
file_frame.on('select', function () {
|
565 |
// We set multiple to false so only get one image from the uploader
|
566 |
attachment = file_frame.state().get('selection').first().toJSON();
|
|
|
567 |
dfield.attr('src', attachment.url);
|
568 |
dfield_h.val(attachment.url);
|
569 |
|
@@ -602,7 +649,7 @@ jQuery(function ($) {
|
|
602 |
};
|
603 |
$('#gps').click(shuffle);
|
604 |
|
605 |
-
$
|
606 |
var allps = "";
|
607 |
shuffle();
|
608 |
for (k = 0; k < $('#pcnt').val(); k++) {
|
@@ -614,7 +661,7 @@ jQuery(function ($) {
|
|
614 |
|
615 |
});
|
616 |
|
617 |
-
$
|
618 |
var aps;
|
619 |
aps = $('#ps').val();
|
620 |
aps = aps.replace(/\n/g, "][");
|
@@ -623,14 +670,18 @@ jQuery(function ($) {
|
|
623 |
$('#generatepass').modal('hide');
|
624 |
});
|
625 |
|
626 |
-
$
|
627 |
e.preventDefault();
|
628 |
var url;
|
629 |
-
if ($(this).attr('href')
|
630 |
else url = $(this).data('url');
|
631 |
wpdm_iframe_modal(utl);
|
632 |
});
|
633 |
|
|
|
|
|
|
|
|
|
634 |
try {
|
635 |
$('.ttip').tooltip();
|
636 |
} catch (e) {
|
@@ -758,6 +809,3 @@ function wpdm_iframe_modal(url, closebutton) {
|
|
758 |
|
759 |
}
|
760 |
|
761 |
-
|
762 |
-
|
763 |
-
|
30 |
}
|
31 |
|
32 |
var WPDM = {
|
33 |
+
actions: {},
|
34 |
|
35 |
init: function ($) {
|
36 |
|
37 |
},
|
38 |
|
39 |
+
addAction: function (action, func) {
|
40 |
+
if(!WPDM.actions[action]) WPDM.actions[action] = [];
|
41 |
+
WPDM.actions[action].push(func);
|
42 |
+
},
|
43 |
+
|
44 |
+
doAction: function (action, params) {
|
45 |
+
if(typeof WPDM.actions[action] !== 'undefined')
|
46 |
+
WPDM.actions[action].forEach(fn => fn(params));
|
47 |
+
},
|
48 |
+
|
49 |
copy: function ($id) {
|
50 |
var copyText = document.getElementById($id);
|
51 |
copyText.select();
|
54 |
WPDM.notify('<i class="fa fa-check-double"></i> Copied', 'success', 'top-center', 1000);
|
55 |
},
|
56 |
|
57 |
+
copyTxt: function (textToCopy) {
|
58 |
+
WPDM.notify('<i class="fa fa-check-double"></i> Copied', 'success', 'top-center', 1000);
|
59 |
+
// navigator clipboard api needs a secure context (https)
|
60 |
+
if (navigator.clipboard && window.isSecureContext) {
|
61 |
+
// navigator clipboard api method'
|
62 |
+
return navigator.clipboard.writeText(textToCopy);
|
63 |
+
} else {
|
64 |
+
// text area method
|
65 |
+
let textArea = document.createElement("textarea");
|
66 |
+
textArea.value = textToCopy;
|
67 |
+
// make the textarea out of viewport
|
68 |
+
textArea.style.position = "fixed";
|
69 |
+
textArea.style.left = "-999999px";
|
70 |
+
textArea.style.top = "-999999px";
|
71 |
+
document.body.appendChild(textArea);
|
72 |
+
textArea.focus();
|
73 |
+
textArea.select();
|
74 |
+
return new Promise((res, rej) => {
|
75 |
+
// here the magic happens
|
76 |
+
document.execCommand('copy') ? res() : rej();
|
77 |
+
textArea.remove();
|
78 |
+
});
|
79 |
+
}
|
80 |
+
},
|
81 |
+
|
82 |
hash: function (str) {
|
83 |
return str.wpdm_hash();
|
84 |
},
|
98 |
return uniq;
|
99 |
},
|
100 |
|
101 |
+
popupWindow: function (url, title, w, h, onclose) {
|
102 |
/* Fixes dual-screen position Most browsers Firefox */
|
103 |
+
var dualScreenLeft = typeof window.screenLeft !== 'undefined' ? window.screenLeft : screen.left;
|
104 |
+
var dualScreenTop = typeof window.screenTop !== 'undefined' ? window.screenTop : screen.top;
|
105 |
|
106 |
var width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width;
|
107 |
var height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height;
|
114 |
if (window.focus) {
|
115 |
newWindow.focus();
|
116 |
}
|
117 |
+
if(onclose !== undefined)
|
118 |
+
newWindow.onbeforeunload = function(){ onclose.call(); }
|
119 |
return false;
|
120 |
},
|
121 |
|
122 |
bootAlert: function (heading, content, width) {
|
123 |
+
let html, url = '';
|
124 |
+
let modal_id = '__bootModal_' + WPDM.uniqueID();
|
125 |
+
if(typeof content === 'object') {
|
126 |
+
url = content.url;
|
127 |
+
content = `<div id='${modal_id}_cont'><i class='fa fa-sun fa-spin'></i> Loading...</div>`;
|
128 |
+
}
|
129 |
if (!width) width = 400;
|
|
|
|
|
|
|
130 |
html = '<div class="w3eden" id="w3eden' + modal_id + '"><div id="' + modal_id + '" class="modal fade" tabindex="-1" role="dialog">\n' +
|
131 |
' <div class="modal-dialog" style="width: ' + width + 'px" role="document">\n' +
|
132 |
' <div class="modal-content" style="border-radius: 4px;overflow: hidden">\n' +
|
133 |
+
' <div class="modal-header" style="padding: 12px 15px;background: rgba(0,0,0,0.02);line-height: 18px">\n' +
|
134 |
+
' <h4 class="modal-title" style="font-size: 10pt;font-weight: 600;padding: 0;margin: 0;letter-spacing: 0.5px;line-height: 18px">' + heading + '</h4><button style="line-height: 18px;font-size: 10pt;background: transparent;outline: none;position: absolute;right: 14px;top: 14px;" type="button" class="close" data-target="#' + modal_id + '" data-dismiss="modal"><i class="fa fa-times-circle"></i></button>\n' +
|
135 |
' </div>\n' +
|
136 |
' <div class="modal-body fetfont" style="line-height: 1.5;text-transform: unset;font-weight:400;letter-spacing:0.5px;font-size: 12px">\n' +
|
137 |
' ' + content + '\n' +
|
138 |
' </div>\n' +
|
|
|
|
|
|
|
139 |
' </div>\n' +
|
140 |
' </div>\n' +
|
141 |
'</div></div>';
|
142 |
jQuery('body').append(html);
|
143 |
jQuery("#" + modal_id).modal({show: true, backdrop: 'static'});
|
144 |
+
|
145 |
+
if(url !== '') {
|
146 |
+
url = url.indexOf('?') > 0 ? url+'&__mdid=' + modal_id : url+'?__mdid=' + modal_id;
|
147 |
+
jQuery("#" + modal_id + "_cont").load(url);
|
148 |
+
}
|
149 |
+
|
150 |
return jQuery("#" + modal_id);
|
151 |
},
|
152 |
|
315 |
audioUI: function (audio) {
|
316 |
var $ = jQuery, song_length, song_length_m, song_length_s;
|
317 |
|
318 |
+
if (parseInt(wpdm_asset.bsversion) !== 3)
|
319 |
+
var player_html = '<div class="w3eden"><div style="display: none" class="wpdm-audio-player-ui" id="wpdm-audio-player-ui"><div class="card m-2"><div class="card-body text-center"><div class="media"><div class="mr-3 wpdm-audio-control-buttons"><button class="btn btn-primary btn-play" id="wpdm-btn-play"><i class="fa fa-play"></i></button> <button class="btn btn-primary btn-backward" id="wpdm-btn-backward"><i class="fa fa-backward"></i></button> <button class="btn btn-primary btn-forward" id="wpdm-btn-forward"><i class="fa fa-forward"></i></button></div><div class="media-body"><div class="position-relative"><div id="played">00:00</div><div id="mins">00:00</div></div><div class="progress"><div id="wpdm-audio-progress" class="progress-bar bg-success" role="progressbar" style="width: 0%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div></div></div><div class="ml-3 wpdm-audio-control-buttons"> <button class="btn btn-info btn-volumctrl" id="wpdm-btn-volumctrl"><i class="fa fa-volume-up"></i></button> <div class="volumctrl"><input type="range" min="0" max="1" step="0.01" value="3" class="p-0" id="wpdm-audio-volume"></div></div></div></div></div></div></div>';
|
320 |
+
else
|
321 |
+
var player_html = '<div class="w3eden"><div style="display: none" class="wpdm-audio-player-ui" id="wpdm-audio-player-ui"><div class="panel panel-default" style="margin: 0;border: 0;border-radius: 0;border-top: 1px solid #dddddd;background: #fcfcfc"><div class="panel-body text-center"><div class="media"><div class="pull-right wpdm-audio-control-buttons"><button class="btn btn-info btn-volumctrl" id="wpdm-btn-volumctrl"><i class="fa fa-volume-up"></i></button> <div class="volumctrl"> <input type="range" min="0" max="1" step="0.01" value="3" class="p-0" id="wpdm-audio-volume"> </div></div><div class="wpdm-audio-control-buttons pull-left"><nobr><button class="btn btn-primary btn-play" id="wpdm-btn-play"><i class="fa fa-play"></i></button> <button class="btn btn-primary btn-backward" id="wpdm-btn-backward"><i class="fa fa-backward"></i></button> <button class="btn btn-primary btn-forward" id="wpdm-btn-forward"><i class="fa fa-forward"></i></button></nobr></div><div class="media-body"><div class="position-relative"><div id="played">00:00</div><div id="mins">00:00</div></div><div class="progress"><div id="wpdm-audio-progress" class="progress-bar bg-success" role="progressbar" style="width: 0%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div></div></div></div></div></div></div></div>';
|
322 |
|
323 |
if (audio.duration !== Infinity) {
|
324 |
song_length = parseInt(audio.duration);
|
439 |
$(this).on("contextmenu", function (e) {
|
440 |
// return native menu if pressing control
|
441 |
if (e.ctrlKey) return;
|
442 |
+
if($(this).parent().hasClass('panel-folder')) $('.hide-on-dir').css('display', 'none');
|
443 |
+
else $('.hide-on-dir').css('display', 'block');
|
444 |
//open menu
|
445 |
var $menu = $(settings.menuSelector)
|
446 |
+
.data("invokedOn", $(this))
|
447 |
.show()
|
448 |
.css({
|
449 |
+
position: "fixed",
|
450 |
+
left: e.clientX, // getMenuPosition(e.clientX, 'width', 'scrollLeft'),
|
451 |
+
top: e.clientY // getMenuPosition(e.clientY, 'height', 'scrollTop')
|
452 |
})
|
453 |
.off('click')
|
454 |
.on('click', 'a', function (e) {
|
455 |
$menu.hide();
|
456 |
+
e.preventDefault();
|
457 |
var $invokedOn = $menu.data("invokedOn");
|
458 |
var $selectedMenu = $(e.target);
|
459 |
|
488 |
jQuery(function ($) {
|
489 |
|
490 |
// Uploading files
|
491 |
+
var file_frame, dfield, $body = $('body');
|
492 |
|
493 |
+
$body.on('click', '.wpdm-notify', function () {
|
494 |
$(this).animate({
|
495 |
opacity: 0
|
496 |
}, 1000, function () {
|
498 |
});
|
499 |
});
|
500 |
|
501 |
+
$body.on('click', '.wpdm-modal-pop', function (e) {
|
502 |
e.preventDefault();
|
503 |
var url = $(this).attr('href');
|
504 |
var width = 600;
|
513 |
return false;
|
514 |
});
|
515 |
|
516 |
+
$body.on('click', '.__wpdm_approvedr', function (event) {
|
517 |
event.preventDefault();
|
518 |
$btn = $(this);
|
519 |
$btn.attr('disabled', 'disabled').html('<i class="fa fa-refresh fa-spin"></i>');
|
529 |
});
|
530 |
});
|
531 |
|
532 |
+
$body.on('click', '.txtsc', function (event) {
|
533 |
$(this).select();
|
534 |
});
|
535 |
|
536 |
+
$body.on('click', '.__wpdm_declinedr', function (event) {
|
537 |
event.preventDefault();
|
538 |
if (!confirm('Are you sure?')) return false;
|
539 |
$btn = $(this);
|
550 |
});
|
551 |
|
552 |
|
553 |
+
$body.on('click', '.btn-onclick', function () {
|
554 |
$(this).css('width', $(this).css('width')).attr('disabled', 'disabled');
|
555 |
$(this).html($(this).data('onclick'));
|
556 |
});
|
557 |
|
558 |
+
$body.on('click', '.btn-media-upload', function (event) {
|
559 |
event.preventDefault();
|
560 |
dfield = $($(this).attr('rel'));
|
561 |
|
586 |
file_frame.open();
|
587 |
});
|
588 |
|
589 |
+
$body.on('click', '.btn-image-selector', function (event) {
|
590 |
event.preventDefault();
|
591 |
dfield = $($(this).attr('rel'));
|
592 |
var dfield_h = $($(this).attr('rel') + '_hidden');
|
610 |
file_frame.on('select', function () {
|
611 |
// We set multiple to false so only get one image from the uploader
|
612 |
attachment = file_frame.state().get('selection').first().toJSON();
|
613 |
+
console.log(attachment);
|
614 |
dfield.attr('src', attachment.url);
|
615 |
dfield_h.val(attachment.url);
|
616 |
|
649 |
};
|
650 |
$('#gps').click(shuffle);
|
651 |
|
652 |
+
$body.on('click', '#gpsc', function () {
|
653 |
var allps = "";
|
654 |
shuffle();
|
655 |
for (k = 0; k < $('#pcnt').val(); k++) {
|
661 |
|
662 |
});
|
663 |
|
664 |
+
$body.on('click', '#pins', function () {
|
665 |
var aps;
|
666 |
aps = $('#ps').val();
|
667 |
aps = aps.replace(/\n/g, "][");
|
670 |
$('#generatepass').modal('hide');
|
671 |
});
|
672 |
|
673 |
+
$body.on('click', '*:data[toggle="iframe-modal"]', function (e) {
|
674 |
e.preventDefault();
|
675 |
var url;
|
676 |
+
if ($(this).attr('href') !== undefined) url = $(this).attr('href');
|
677 |
else url = $(this).data('url');
|
678 |
wpdm_iframe_modal(utl);
|
679 |
});
|
680 |
|
681 |
+
$body.on('click', '#testemail', function () {
|
682 |
+
$.post(ajaxurl, {action: 'wpdm_test_email', template: $('#etmpl').val()})
|
683 |
+
});
|
684 |
+
|
685 |
try {
|
686 |
$('.ttip').tooltip();
|
687 |
} catch (e) {
|
809 |
|
810 |
}
|
811 |
|
|
|
|
|
|
assets/js/wpdm-admin.min.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
var allps;var wpdm_pass_target="#pps_z";var $modal_id="";String.prototype.wpdm_shuffle=function(){var a=this.split(""),n=a.length;for(var i=n-1;i>0;i--){var j=Math.floor(Math.random()*(i+1));var tmp=a[i];a[i]=a[j];a[j]=tmp}return a.join("")};String.prototype.wpdm_hash=function(){if(Array.prototype.reduce){return this.split("").reduce(function(a,b){a=(a<<5)-a+b.charCodeAt(0);return a&a},0)}var hash=0;if(this.length===0)return hash;for(var i=0;i<this.length;i++){var character=this.charCodeAt(i);hash=(hash<<5)-hash+character;hash=hash&hash}return hash};var WPDM={init:function($){},copy:function($id){var copyText=document.getElementById($id);copyText.select();copyText.setSelectionRange(0,99999);document.execCommand("copy");WPDM.notify('<i class="fa fa-check-double"></i> Copied',"success","top-center",1e3)},hash:function(str){return str.wpdm_hash()},beep:function(){if(WPDM.audio==undefined)var snd=new Audio("data:audio/wav;base64,//uQRAAAAWMSLwUIYAAsYkXgoQwAEaYLWfkWgAI0wWs/ItAAAGDgYtAgAyN+QWaAAihwMWm4G8QQRDiMcCBc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lwt/WKi2N4d//uQRCSAAjURNIHpMZBGYiaQPSYyAAABLAAAAAAAACWAAAAApUF/Mg+0aohSIRobBAsMlO//Kk4soosy1JSFRYWaLC4qZBYWFRGZdwqKiwkNBVmoWFSJkWFxX4FFRQWR+LsS4W/rFRb/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////VEFHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAU291bmRib3kuZGUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMjAwNGh0dHA6Ly93d3cuc291bmRib3kuZGUAAAAAAAAAACU=");else var snd=new Audio(WPDM.audio);snd.play()},uniqueID:function(){var uniq=Date.now()+"abcdefghijklmnopqrstuvwxyz_";uniq=uniq.wpdm_shuffle();uniq=uniq.substring(1,10);return uniq},popupWindow:function(url,title,w,h){var dualScreenLeft=window.screenLeft!=undefined?window.screenLeft:screen.left;var dualScreenTop=window.screenTop!=undefined?window.screenTop:screen.top;var width=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width;var height=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height;var left=width/2-w/2+dualScreenLeft;var top=height/2-h/2+dualScreenTop;var newWindow=window.open(url,title,"scrollbars=yes, width="+w+", height="+h+", top="+top+", left="+left);if(window.focus){newWindow.focus()}return false},bootAlert:function(heading,content,width){var html;if(!width)width=400;if($modal_id!=="")jQuery($modal_id).remove();var modal_id="__bootModal_"+WPDM.uniqueID();$modal_id="#"+modal_id;html='<div class="w3eden" id="w3eden'+modal_id+'"><div id="'+modal_id+'" class="modal fade" tabindex="-1" role="dialog">\n'+' <div class="modal-dialog" style="width: '+width+'px" role="document">\n'+' <div class="modal-content" style="border-radius: 4px;overflow: hidden">\n'+' <div class="modal-header" style="padding: 12px 15px;background: rgba(0,0,0,0.02);">\n'+' <h4 class="modal-title" style="font-size: 10pt;font-weight: 600;padding: 0;margin: 0;letter-spacing: 0.5px">'+heading+"</h4>\n"+" </div>\n"+' <div class="modal-body fetfont" style="line-height: 1.5;text-transform: unset;font-weight:400;letter-spacing:0.5px;font-size: 12px">\n'+" "+content+"\n"+" </div>\n"+' <div class="modal-footer" style="padding: 10px 15px">\n'+' <button type="button" class="btn btn-secondary btn-xs" data-target="#'+modal_id+'" data-dismiss="modal">Close</button>\n'+" </div>\n"+" </div>\n"+" </div>\n"+"</div></div>";jQuery("body").append(html);jQuery("#"+modal_id).modal({show:true,backdrop:"static"});return jQuery("#"+modal_id)},pushNotify:function(title,message,icon,image,url){var type="info";if(title.includes("rror")||message.includes("rror"))type="error";if(title.includes("uccess")||message.includes("uccess"))type="success";if(title.includes("arning")||message.includes("arning"))type="warning";if(!("Notification"in window)||!("ServiceWorkerRegistration"in window)){WPDM.notify("<strong>"+title+"</strong><br/>"+message,type,"top-right");return}Notification.requestPermission(function(result){if(result==="granted"){console.log("Notification: "+result);try{var notification=new Notification(title,{body:message,icon:icon?icon:"https://cdn1.iconfinder.com/data/icons/hawcons/32/698558-icon-47-note-important-512.png",image:image?image:""});if(url){notification.onclick=function(e){e.preventDefault();window.open(url,"_blank")}}}catch(err){WPDM.notify("<strong>"+title+"</strong><br/>"+message,type,"top-right");console.log("Notification API error: "+err)}}else{WPDM.notify("<strong>"+title+"</strong><br/>"+message,type,"top-right");console.log("Notification: "+result)}})},notify:function(message,type,position,autoclose){var $=jQuery;if(type===undefined||!type)type="info";if(position===undefined||!position)position="top-right";if(type==="danger")type="error";var notifycont=position.indexOf("#")>=0?position:"#wpdm-notify-"+position;if($(notifycont).length==0)$("body").prepend("<div id='wpdm-notify-"+position+"'></div>");var notif=$("<div class='wpdm-notify fetfont wpdm-notify-"+type+"' style='display: none'>"+message+"</div>");$(notifycont).append(notif);$(notif).fadeIn();if(autoclose!==undefined){setTimeout(function(){$(notif).animate({opacity:0},1e3,function(){$(this).slideUp()})},autoclose)}return $(notif)},floatify:function(html,position){var $=jQuery;if(position===undefined||!position)position="top-right";var floatifycont="#wpdm-floatify-"+position;if($(floatifycont).length==0)$("body").prepend("<div class='w3eden' id='wpdm-floatify-"+position+"'></div>");var floatify=$("<div class='wpdm-floatify fetfont style='margin-right: -500px'>"+html+"</div>");$(floatifycont).append(floatify);$(floatify).animate({marginRight:"0px"});return $(floatify)},blockUI:function(element,xhr){jQuery(element).addClass("blockui");if(xhr)xhr.addEventListener("load",function(){jQuery(element).removeClass("blockui")})},unblockUI:function(element){jQuery(element).removeClass("blockui")},overlay:function(element,html){var $=jQuery;var overlaycontent=$("<div class='wpdm-overlay-content' style='display: none'>"+html+"<div class='wpdm-overlay-close' style='cursor: pointer'><i class='far fa-times-circle'></i> close</div></div>");$(element).addClass("wpdm-overlay").append(overlaycontent);$(overlaycontent).fadeIn();$("body").on("click",".wpdm-overlay-close",function(){$(overlaycontent).fadeOut(function(){$(this).remove()})});return $(overlaycontent)},confirm:function(heading,content,buttons){var html,$=jQuery;var modal_id="__boot_popup_"+WPDM.uniqueID();$("#w3eden__boot_popup").remove();var _buttons="";if(buttons){_buttons='<div class="modal-footer" style="padding: 8px 15px;">\n';$.each(buttons,function(i,button){var id="btx_"+i;_buttons+="<button id='"+id+"' class='"+button.class+" btn-xs' style='font-size: 10px;padding: 3px 20px;'>"+button.label+"</button> "});_buttons+="</div>\n"}html='<div class="w3eden" id="w3eden'+modal_id+'"><div id="'+modal_id+'" style="z-index: 9999999 !important;" class="modal fade" tabindex="-1" role="dialog">\n'+' <div class="modal-dialog" role="document" style="max-width: 100%;width: 350px">\n'+' <div class="modal-content" style="border-radius: 3px;overflow: hidden">\n'+' <div class="modal-header" style="padding: 12px 15px;background: #f5f5f5;">\n'+' <h4 class="modal-title" style="font-size: 9pt;font-weight: 500;padding: 0;margin: 0;font-family:var(--wpdm-font), san-serif;letter-spacing: 0.5px">'+heading+"</h4>\n"+" </div>\n"+' <div class="modal-body text-center" style="font-family:var(--wpdm-font), san-serif;letter-spacing: 0.5px;font-size: 10pt;font-weight: 300;padding: 25px;line-height: 1.5">\n'+" "+content+"\n"+" </div>\n"+_buttons+" </div>\n"+" </div>\n"+"</div></div>";$("body").append(html);$("#"+modal_id).modal("show");$.each(buttons,function(i,button){var id="btx_"+i;$("#"+id).unbind("click");$("body").on("click","#"+id,function(){button.callback.call($("#"+modal_id));return false})});return $("#"+modal_id)},audioUI:function(audio){var $=jQuery,song_length,song_length_m,song_length_s;var player_html='<div class="w3eden"><div style="display: none" class="wpdm-audio-player-ui" id="wpdm-audio-player-ui"><div class="card m-2"><div class="card-body text-center"><div class="media"><div class="mr-3 wpdm-audio-control-buttons"><button class="btn btn-primary btn-play" id="wpdm-btn-play"><i class="fa fa-play"></i></button> <button class="btn btn-primary btn-backward" id="wpdm-btn-backward"><i class="fa fa-backward"></i></button> <button class="btn btn-primary btn-forward" id="wpdm-btn-forward"><i class="fa fa-forward"></i></button></div><div class="media-body"><div class="position-relative"><div id="played">00:00</div><div id="mins">00:00</div></div><div class="progress"><div id="wpdm-audio-progress" class="progress-bar bg-success" role="progressbar" style="width: 0%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div></div></div><div class="ml-3 wpdm-audio-control-buttons"> <button class="btn btn-info btn-volumctrl" id="wpdm-btn-volumctrl"><i class="fa fa-volume-up"></i></button> <div class="volumctrl"><input type="range" min="0" max="1" step="0.01" value="3" class="p-0" id="wpdm-audio-volume"></div></div></div></div></div></div></div>';if(audio.duration!==Infinity){song_length=parseInt(audio.duration);song_length_m=parseInt(song_length/60);song_length_s=song_length-song_length_m*60;song_length_m=song_length_m>9?song_length_m:"0"+song_length_m;song_length_s=song_length_s>9?song_length_s:"0"+song_length_s}else{song_length_m="--";song_length_s="--";audio.addEventListener("durationchange",function(e){console.log(this.duration);if(this.duration!==Infinity){song_length=parseInt(this.duration);song_length_m=parseInt(song_length/60);song_length_s=song_length-song_length_m*60;song_length_m=song_length_m>9?song_length_m:"0"+song_length_m;song_length_s=song_length_s>9?song_length_s:"0"+song_length_s;$("#mins").html(song_length_m+":"+song_length_s);next(song_length)}},false)}if($("#wpdm-audio-player-ui").length===0){$("body").append(player_html);$("#wpdm-audio-player-ui").slideDown();$("#mins").html(song_length_m+":"+song_length_s);$("body").on("click","#wpdm-audio-player-ui .progress",function(e){let value=e.offsetX*100/this.clientWidth;var played=parseInt(song_length*value/100);var played_m=parseInt(played/60);var played_s=played-played_m*60;played_m=played_m>9?played_m:"0"+played_m;played_s=played_s>9?played_s:"0"+played_s;$("#played").html(played_m+":"+played_s);audio.currentTime=song_length*value/100;$(this).find(".progress-bar").css("width",value+"%")});$("body").on("click","#wpdm-btn-backward",function(){let value=parseInt($("#wpdm-audio-player-ui .progress-bar").css("width"))/parseInt($("#wpdm-audio-player-ui .progress").css("width"))*100-10;if(value<0)value=0;var played=parseInt(song_length*value/100);var played_m=parseInt(played/60);var played_s=played-played_m*60;played_m=played_m>9?played_m:"0"+played_m;played_s=played_s>9?played_s:"0"+played_s;$("#played").html(played_m+":"+played_s);audio.currentTime=song_length*value/100;$("#wpdm-audio-player-ui .progress-bar").css("width",value+"%")});$("body").on("click","#wpdm-btn-forward",function(){let value=parseInt($("#wpdm-audio-player-ui .progress-bar").css("width"))/parseInt($("#wpdm-audio-player-ui .progress").css("width"))*100+10;if(value>100)value=100;var played=parseInt(song_length*value/100);var played_m=parseInt(played/60);var played_s=played-played_m*60;played_m=played_m>9?played_m:"0"+played_m;played_s=played_s>9?played_s:"0"+played_s;$("#played").html(played_m+":"+played_s);audio.currentTime=song_length*value/100;$("#wpdm-audio-player-ui .progress-bar").css("width",value+"%")});$("#wpdm-btn-volumctrl").on("click",function(){$(this).next(".volumctrl").toggle()});$("body").on("click",".btn-play",function(){if($(this).find(".fa").hasClass("fa-play")){$(this).find(".fa").addClass("fa-pause").removeClass("fa-play");$(this).data("state","playing");audio.play()}else{$(this).find(".fa").addClass("fa-play").removeClass("fa-pause");$(this).data("state","paused");audio.pause()}});$("body").on("change","#wpdm-audio-volume",function(){audio.volume=this.value})}$("#mins").html(song_length_m+":"+song_length_s);audio.addEventListener("play",function(){$("#wpdm-btn-play").find(".fa").addClass("fa-pause").removeClass("fa-play")});audio.addEventListener("pause",function(){$("#wpdm-btn-play").find(".fa").addClass("fa-play").removeClass("fa-pause")});audio.addEventListener("timeupdate",function(e){var song_length=parseInt(audio.duration);var time_now=audio.currentTime;var percent=time_now/song_length*100;if(percent>100)percent=100;$("#wpdm-audio-progress").css("width",percent+"%");var played=parseInt(time_now);var played_m=parseInt(played/60);var played_s=played-played_m*60;played_m=played_m>9?played_m:"0"+played_m;played_s=played_s>9?played_s:"0"+played_s;$("#played").html(played_m+":"+played_s)})}};(function($,window){$.fn.contextMenu=function(settings){return this.each(function(){$(this).on("contextmenu",function(e){if(e.ctrlKey)return;var $menu=$(settings.menuSelector).data("invokedOn",$(e.target)).show().css({position:"absolute",left:getMenuPosition(e.clientX-180,"width","scrollLeft"),top:getMenuPosition(e.clientY-32,"height","scrollTop")}).off("click").on("click","a",function(e){$menu.hide();var $invokedOn=$menu.data("invokedOn");var $selectedMenu=$(e.target);settings.menuSelected.call(this,$invokedOn,$selectedMenu)});return false});$("body").click(function(){$(settings.menuSelector).hide()})});function getMenuPosition(mouse,direction,scrollDir){var win=$(window)[direction](),scroll=$(window)[scrollDir](),menu=$(settings.menuSelector)[direction](),position=mouse+scroll;if(mouse+menu>win&&menu<mouse)position-=menu;return position}}})(jQuery,window);jQuery(function($){var file_frame,dfield;$("body").on("click",".wpdm-notify",function(){$(this).animate({opacity:0},1e3,function(){$(this).slideUp()})});$("body").on("click",".wpdm-modal-pop",function(e){e.preventDefault();var url=$(this).attr("href");var width=600;var title=$(this).text();if($(this).data("width")!==undefined)width=$(this).data("width");if($(this).attr("title")!==undefined)title=$(this).attr("title");if($(this).data("url")!==undefined)url=$(this).data("url");var $modal=WPDM.bootAlert(title,"<div id='wpdm-modal-content' class='blockui' style='min-height: 300px;'></div>",width);$($modal).find("#wpdm-modal-content").load(url,function(res){WPDM.unblockUI("#wpdm-modal-content")});return false});$("body").on("click",".__wpdm_approvedr",function(event){event.preventDefault();$btn=$(this);$btn.attr("disabled","disabled").html('<i class="fa fa-refresh fa-spin"></i>');$(".__wpdm_declinedr_"+$btn.data("rid")).remove();$.post(ajaxurl,{__approvedr:$(this).data("nonce"),__rid:$(this).data("rid"),action:"approveDownloadRequest"},function(res){if(res.match(/ok/)){$btn.removeClass("btn-info").addClass("btn-success").html("Approved")}})});$("body").on("click",".txtsc",function(event){$(this).select()});$("body").on("click",".__wpdm_declinedr",function(event){event.preventDefault();if(!confirm("Are you sure?"))return false;$btn=$(this);$btn.attr("disabled","disabled").html('<i class="fa fa-refresh fa-spin"></i>');$.post(ajaxurl,{__declinedr:$(this).data("nonce"),__rid:$(this).data("rid"),action:"declineDownloadRequest"},function(res){if(res.match(/ok/)){$("#__emlrow_"+$btn.data("rid")).remove()}})});$("body").on("click",".btn-onclick",function(){$(this).css("width",$(this).css("width")).attr("disabled","disabled");$(this).html($(this).data("onclick"))});$("body").on("click",".btn-media-upload",function(event){event.preventDefault();dfield=$($(this).attr("rel"));if(file_frame){file_frame.open();return}file_frame=wp.media.frames.file_frame=wp.media({title:$(this).data("uploader_title"),button:{text:$(this).data("uploader_button_text")},multiple:false});file_frame.on("select",function(){attachment=file_frame.state().get("selection").first().toJSON();dfield.val(attachment.url)});file_frame.open()});$("body").on("click",".btn-image-selector",function(event){event.preventDefault();dfield=$($(this).attr("rel"));var dfield_h=$($(this).attr("rel")+"_hidden");if(file_frame){file_frame.open();return}file_frame=wp.media.frames.file_frame=wp.media({title:$(this).data("uploader_title"),button:{text:$(this).data("uploader_button_text")},multiple:false});file_frame.on("select",function(){attachment=file_frame.state().get("selection").first().toJSON();dfield.attr("src",attachment.url);dfield_h.val(attachment.url)});file_frame.open()});allps=$("#pps_z").val();if(allps==undefined)allps="";$("#ps").val(allps.replace(/\]\[/g,"\n").replace(/[\]|\[]+/g,""));shuffle=function(){var sl="abcdefghijklmnopqrstuvwxyz";var cl="ABCDEFGHIJKLMNOPQRSTUVWXYZ";var nm="0123456789";var sc="~!@#$%^&*()_";ps="";pss="";ps=sl;if($("#passtrn").val()>1)ps+=cl;if($("#passtrn").val()>2)ps+=nm;if($("#passtrn").val()>3)ps+=sc;var i=0;while(i<=ps.length){$max=ps.length-1;$num=Math.floor(Math.random()*$max);$temp=ps.substr($num,1);pss+=$temp;i++}$("#ps").val(pss)};$("#gps").click(shuffle);$("body").on("click","#gpsc",function(){var allps="";shuffle();for(k=0;k<$("#pcnt").val();k++){allps+="["+randomPassword(pss,$("#ncp").val())+"]"}vallps=allps.replace(/\]\[/g,"\n").replace(/[\]|\[]+/g,"");$("#ps").val(vallps)});$("body").on("click","#pins",function(){var aps;aps=$("#ps").val();aps=aps.replace(/\n/g,"][");allps="["+aps+"]";$(wpdm_pass_target).val(allps);$("#generatepass").modal("hide")});$("body").on("click",'*:data[toggle="iframe-modal"]',function(e){e.preventDefault();var url;if($(this).attr("href")!=undefined)url=$(this).attr("href");else url=$(this).data("url");wpdm_iframe_modal(utl)});try{$(".ttip").tooltip()}catch(e){}});function randomPassword(chars,size){if(parseInt(size)==Number.NaN||size=="")size=8;var i=1;var ret="";while(i<=size){$max=chars.length-1;$num=Math.floor(Math.random()*$max);$temp=chars.substr($num,1);ret+=$temp;i++}return ret}function __showDownloadLink(pid,fid){var url;url=wpdmConfig.siteURL+"?wpdmdl="+pid+"&ind="+fid;__bootModal("File Download Link",'<textarea readonly="readonly" class="form-control" style="font-family: monospace">'+url+"</textarea>")}function __bootModal(heading,content,width){var html;if(!width)width=400;jQuery("#w3eden__bootModal").remove();html='<div class="w3eden" id="w3eden__bootModal"><div id="__bootModal" class="modal fade" tabindex="-1" role="dialog">\n'+' <div class="modal-dialog" style="width: '+width+'px" role="document">\n'+' <div class="modal-content">\n'+' <div class="modal-header">\n'+' <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>\n'+' <h4 class="modal-title">'+heading+"</h4>\n"+" </div>\n"+' <div class="modal-body">\n'+" <p>"+content+"</p>\n"+" </div>\n"+' <div class="modal-footer">\n'+' <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">Close</button>\n'+" </div>\n"+" </div>\n"+" </div>\n"+"</div></div>";jQuery("body").append(html);jQuery("#__bootModal").modal("show")}function wpdm_boot_popup(heading,content,buttons){var html,$=jQuery;$("#w3eden__boot_popup").remove();var _buttons='<div class="modal-footer" style="padding: 8px 15px;">\n';$.each(buttons,function(i,button){var id="btx_"+i;_buttons+="<button id='"+id+"' class='"+button.class+" btn-xs' style='font-size: 10px;padding: 3px 20px;'>"+button.label+"</button> "});_buttons+="</div>\n";html='<div class="w3eden" id="w3eden__boot_popup"><div id="__boot_popup" style="z-index: 9999999 !important;" class="modal fade" tabindex="-1" role="dialog">\n'+' <div class="modal-dialog" role="document" style="max-width: 100%;width: 350px">\n'+' <div class="modal-content">\n'+' <div class="modal-header">\n'+' <h4 class="modal-title" style="font-size: 11pt;font-weight: 500;padding: 0;margin: 0;letter-spacing: 0.5px">'+heading+"</h4>\n"+" </div>\n"+' <div class="modal-body text-center" style="letter-spacing: 0.5px;font-size: 9pt;font-weight: 300;padding: 25px;">\n'+" "+content+"\n"+" </div>\n"+_buttons+" </div>\n"+" </div>\n"+"</div></div>";$("body").append(html);$("#__boot_popup").modal("show");$.each(buttons,function(i,button){var id="btx_"+i;$("#"+id).unbind("click");$("#"+id).bind("click",function(){button.callback.call($("#__boot_popup"));return false})});return $("#__boot_popup")}function wpdm_iframe_modal(url,closebutton){var iframe,$=jQuery;if(url==="close"){$("#wpdm_iframe_modal").hide();$("#ifcb").hide();$("body").removeClass("wpdm-iframe-modal-open");return false}console.log($("#wpdm_iframe_modal").attr("src"));if($("#wpdm_iframe_modal").length===1&&url===$("#wpdm_iframe_modal").attr("src")){$("#wpdm_iframe_modal").fadeIn();$("#ifcb").fadeIn();try{document.getElementById("wpdm_iframe_modal").contentWindow.showModal()}catch(e){}return false}else{$("#wpdm_iframe_modal").remove();$("#ifcb").remove()}var closebutton_html="";if(closebutton!==undefined&&closebutton===true)closebutton_html="<span id='ifcb' class='w3eden'><a href='#' onclick='return wpdm_iframe_modal(\"close\");' style='border-radius: 0;position: fixed;top: 0;right: 0;z-index: 9999999999 !important;width: 40px;line-height: 40px;padding: 0' class='btn btn-danger'><i class='fas fa-times'></i></a></span>";iframe='<iframe src="'+url+'" style="width: 100%;height: 100%;position: fixed;z-index: 999999999 !important;border: 0;left: 0;top: 0;right: 0;bottom: 0;background: rgba(0,0,0,0.2);display: none;" id="wpdm_iframe_modal"></iframe>'+closebutton_html;$("body").append(iframe).addClass("wpdm-iframe-modal-open");$("#wpdm_iframe_modal").fadeIn()}
|
|
download-manager.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: https://www.wpdownloadmanager.com/purchases/
|
|
5 |
Description: Manage, Protect and Track file downloads, and sell digital products from your WordPress site. A complete digital asset management solution.
|
6 |
Author: W3 Eden, Inc.
|
7 |
Author URI: https://www.wpdownloadmanager.com/
|
8 |
-
Version: 3.2.
|
9 |
Text Domain: download-manager
|
10 |
Domain Path: /languages
|
11 |
*/
|
@@ -39,7 +39,7 @@ use WPDM\Widgets\WidgetController;
|
|
39 |
|
40 |
global $WPDM;
|
41 |
|
42 |
-
define('WPDM_VERSION','3.2.
|
43 |
|
44 |
define('WPDM_TEXT_DOMAIN','download-manager');
|
45 |
|
@@ -116,6 +116,9 @@ if(!defined('WPDM_PUB_NONCE'))
|
|
116 |
if(!defined('WPDM_PRI_NONCE'))
|
117 |
define('WPDM_PRI_NONCE', '.r&`|]S1GEAdm^hTA^XmE8vU3F^=K+)419alVN=EbDQ Z-pfl/nd-12^I&oRfDC]');
|
118 |
|
|
|
|
|
|
|
119 |
@ini_set('upload_tmp_dir',WPDM_CACHE_DIR);
|
120 |
|
121 |
|
5 |
Description: Manage, Protect and Track file downloads, and sell digital products from your WordPress site. A complete digital asset management solution.
|
6 |
Author: W3 Eden, Inc.
|
7 |
Author URI: https://www.wpdownloadmanager.com/
|
8 |
+
Version: 3.2.59
|
9 |
Text Domain: download-manager
|
10 |
Domain Path: /languages
|
11 |
*/
|
39 |
|
40 |
global $WPDM;
|
41 |
|
42 |
+
define('WPDM_VERSION','3.2.59');
|
43 |
|
44 |
define('WPDM_TEXT_DOMAIN','download-manager');
|
45 |
|
116 |
if(!defined('WPDM_PRI_NONCE'))
|
117 |
define('WPDM_PRI_NONCE', '.r&`|]S1GEAdm^hTA^XmE8vU3F^=K+)419alVN=EbDQ Z-pfl/nd-12^I&oRfDC]');
|
118 |
|
119 |
+
if(!defined('WPDM_CRON_KEY'))
|
120 |
+
define('WPDM_CRON_KEY', 'mKNVRCdbJr1DiedHE18N');
|
121 |
+
|
122 |
@ini_set('upload_tmp_dir',WPDM_CACHE_DIR);
|
123 |
|
124 |
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: download manager, document management, file manager, digital store, ecomme
|
|
5 |
Requires at least: 5.3
|
6 |
Tested up to: 6.0
|
7 |
License: GPLv2 or later
|
8 |
-
Stable tag: 3.2.
|
9 |
|
10 |
|
11 |
This File Management & Digital Store plugin will help you to control file downloads & sell digital products from your WP site.
|
@@ -128,6 +128,9 @@ Use [Box.com Explorer](https://www.wpdownloadmanager.com/download/box-com-explor
|
|
128 |
= OneDrive =
|
129 |
Use [OneDrive Explorer](https://www.wpdownloadmanager.com/download/wpdm-onedrive/) add-on ( free ) to store your files in Microsoft OneDrive and link with download manager, get 15 GB free storage space and save your server bandwidth
|
130 |
|
|
|
|
|
|
|
131 |
= Add-ons =
|
132 |
Download and Install following free add-on to add additional features as per your need
|
133 |
|
@@ -181,6 +184,10 @@ Check download stats and get a push notification when someone downloads, install
|
|
181 |
|
182 |
== Changelog ==
|
183 |
|
|
|
|
|
|
|
|
|
184 |
= 3.2.58 - 2022.10.17 =
|
185 |
* Fixed an issue with sorting by download count for packages shortcode
|
186 |
* Fixed an issue with absolute path recovery for Windows server
|
5 |
Requires at least: 5.3
|
6 |
Tested up to: 6.0
|
7 |
License: GPLv2 or later
|
8 |
+
Stable tag: 3.2.59
|
9 |
|
10 |
|
11 |
This File Management & Digital Store plugin will help you to control file downloads & sell digital products from your WP site.
|
128 |
= OneDrive =
|
129 |
Use [OneDrive Explorer](https://www.wpdownloadmanager.com/download/wpdm-onedrive/) add-on ( free ) to store your files in Microsoft OneDrive and link with download manager, get 15 GB free storage space and save your server bandwidth
|
130 |
|
131 |
+
= pCloud =
|
132 |
+
Use [pCloud Connector](https://www.wpdownloadmanager.com/download/pcloud-connector/) add-on ( premium ) to store your files in pCloud and link with download manager, get 10 GB free storage space and save your server bandwidth
|
133 |
+
|
134 |
= Add-ons =
|
135 |
Download and Install following free add-on to add additional features as per your need
|
136 |
|
184 |
|
185 |
== Changelog ==
|
186 |
|
187 |
+
= 3.2.59 - 2022.11.02 =
|
188 |
+
* Improved admin options
|
189 |
+
* Fixed a notice with all files table shortcode
|
190 |
+
|
191 |
= 3.2.58 - 2022.10.17 =
|
192 |
* Fixed an issue with sorting by download count for packages shortcode
|
193 |
* Fixed an issue with absolute path recovery for Windows server
|
src/Package/Shortcodes.php
CHANGED
@@ -109,6 +109,8 @@ class Shortcodes
|
|
109 |
|
110 |
static $wpdm_packages = 0;
|
111 |
|
|
|
|
|
112 |
// When login=1, show login form for guests/visitors
|
113 |
if (isset($params['login']) && $params['login'] == 1 && !is_user_logged_in())
|
114 |
return WPDM()->user->login->form($params);
|
@@ -385,6 +387,9 @@ class Shortcodes
|
|
385 |
function allPackages($params = array())
|
386 |
{
|
387 |
global $wpdb, $current_user, $wp_query;
|
|
|
|
|
|
|
388 |
$items = isset($params['items_per_page']) && $params['items_per_page'] > 0 ? $params['items_per_page'] : 20;
|
389 |
$offset = $cp = 0;
|
390 |
if (isset($params['jstable']) && $params['jstable'] == 1) {
|
109 |
|
110 |
static $wpdm_packages = 0;
|
111 |
|
112 |
+
$params = __::a($params, ['items_per_page' => 10, 'title' => '', 'desc' => '', 'orderby' => 'date', 'order' => 'DESC', 'paging' => false, 'page_numbers' => true, 'toolbar' => 1, 'template' => '', 'cols' => 3, 'colspad' => 2, 'colsphone' => 1, 'tags' => '', 'categories' => '', 'year' => '', 'month' => '', 's' => '', 'css_class' => 'wpdm_packages', 'scid' => '', 'async' => 1, 'tax' => '', 'terms' => '']);
|
113 |
+
|
114 |
// When login=1, show login form for guests/visitors
|
115 |
if (isset($params['login']) && $params['login'] == 1 && !is_user_logged_in())
|
116 |
return WPDM()->user->login->form($params);
|
387 |
function allPackages($params = array())
|
388 |
{
|
389 |
global $wpdb, $current_user, $wp_query;
|
390 |
+
|
391 |
+
$params = __::a($params, ['items_per_page' => 20]);
|
392 |
+
|
393 |
$items = isset($params['items_per_page']) && $params['items_per_page'] > 0 ? $params['items_per_page'] : 20;
|
394 |
$offset = $cp = 0;
|
395 |
if (isset($params['jstable']) && $params['jstable'] == 1) {
|
src/__/__.php
CHANGED
@@ -568,6 +568,13 @@ class __
|
|
568 |
return $uri;
|
569 |
}
|
570 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
571 |
static function p(...$args)
|
572 |
{
|
573 |
foreach ($args as $arg) {
|
568 |
return $uri;
|
569 |
}
|
570 |
|
571 |
+
static function a($array, $default = [])
|
572 |
+
{
|
573 |
+
if(!is_array($default)) $default = [];
|
574 |
+
if(!is_array($array)) $array = $default;
|
575 |
+
return $array;
|
576 |
+
}
|
577 |
+
|
578 |
static function p(...$args)
|
579 |
{
|
580 |
foreach ($args as $arg) {
|