Version Description
- 2022.02.17 =
- Compatibility update for wp 5.9
- Improved admin options
- Fixed an issue with the category shortcode
Download this release
Release Info
Developer | codename065 |
Plugin | WordPress Download Manager |
Version | 3.2.37 |
Comparing to | |
See all releases |
Code changes from version 3.2.35 to 3.2.37
- assets/css/admin-styles.css +4 -0
- download-manager.php +2 -2
- readme.txt +11 -2
- src/Admin/views/templates/list-templates.php +7 -1
- src/Form/Field.php +10 -9
- src/Package/PackageController.php +3 -38
- src/__/Apply.php +1 -1
- src/__/Template.php +0 -8
- src/__/__.php +1 -1
assets/css/admin-styles.css
CHANGED
@@ -2118,6 +2118,10 @@ body.wpdm-iframe-modal-open {
|
|
2118 |
width: 275px;
|
2119 |
}
|
2120 |
|
|
|
|
|
|
|
|
|
2121 |
body.rtl #wpdm-admin-page-body {
|
2122 |
margin-right: 250px !important;
|
2123 |
}
|
2118 |
width: 275px;
|
2119 |
}
|
2120 |
|
2121 |
+
#all-package-settings .card {
|
2122 |
+
margin-bottom: 15px !important;
|
2123 |
+
}
|
2124 |
+
|
2125 |
body.rtl #wpdm-admin-page-body {
|
2126 |
margin-right: 250px !important;
|
2127 |
}
|
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 |
|
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.37
|
9 |
Text Domain: download-manager
|
10 |
Domain Path: /languages
|
11 |
*/
|
39 |
|
40 |
global $WPDM;
|
41 |
|
42 |
+
define('WPDM_VERSION','3.2.37');
|
43 |
|
44 |
define('WPDM_TEXT_DOMAIN','download-manager');
|
45 |
|
readme.txt
CHANGED
@@ -3,9 +3,9 @@ Contributors: w3eden, codename065, shahriar0822, shimo16ab, shafayat-alam
|
|
3 |
Donate link:
|
4 |
Tags: download manager, document management, file manager, digital store, ecommerce, document management plugin, download monitor, download counter, password protection, download protection
|
5 |
Requires at least: 5.3
|
6 |
-
Tested up to: 5.
|
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.
|
@@ -181,6 +181,15 @@ Check download stats and get a push notification when someone downloads, install
|
|
181 |
|
182 |
== Changelog ==
|
183 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
= 3.2.35 - 2022.01.25 =
|
185 |
* Fixed an issue with the password validation
|
186 |
|
3 |
Donate link:
|
4 |
Tags: download manager, document management, file manager, digital store, ecommerce, document management plugin, download monitor, download counter, password protection, download protection
|
5 |
Requires at least: 5.3
|
6 |
+
Tested up to: 5.9
|
7 |
License: GPLv2 or later
|
8 |
+
Stable tag: 3.2.37
|
9 |
|
10 |
|
11 |
This File Management & Digital Store plugin will help you to control file downloads & sell digital products from your WP site.
|
181 |
|
182 |
== Changelog ==
|
183 |
|
184 |
+
= 3.2.37 - 2022.02.17 =
|
185 |
+
* Compatibility update for wp 5.9
|
186 |
+
* Improved admin options
|
187 |
+
* Fixed an issue with the category shortcode
|
188 |
+
|
189 |
+
= 3.2.36 - 2022.02.02 =
|
190 |
+
* Adjusted a backward compatibility issue for older php version
|
191 |
+
* Fixed several variable escaping issues
|
192 |
+
|
193 |
= 3.2.35 - 2022.01.25 =
|
194 |
* Fixed an issue with the password validation
|
195 |
|
src/Admin/views/templates/list-templates.php
CHANGED
@@ -21,6 +21,9 @@ if(!isset($_GET['_type']) || $_GET['_type'] !== 'email'){ ?>
|
|
21 |
<thead>
|
22 |
<tr>
|
23 |
<th style="min-width: 400px"><?php echo __( "Template Name" , "download-manager" ); ?></th>
|
|
|
|
|
|
|
24 |
<th style="width: 250px;"><?php echo __( "Template ID" , "download-manager" ); ?></th>
|
25 |
<?php if(!isset($_GET['_type']) || $_GET['_type'] != 'email'){ ?>
|
26 |
<th style="width: 150px"><?php echo __( "Status" , "download-manager" ); ?></th>
|
@@ -85,9 +88,12 @@ if(!isset($_GET['_type']) || $_GET['_type'] !== 'email'){ ?>
|
|
85 |
?>
|
86 |
<tr valign="top" class="author-self status-inherit" id="post-8">
|
87 |
<td class="column-icon media-icon" style="text-align: left;">
|
88 |
-
<?php echo esc_attr($template['label']); ?>
|
89 |
|
90 |
</td>
|
|
|
|
|
|
|
91 |
<td>
|
92 |
<?php echo $ctpl; ?>
|
93 |
</td>
|
21 |
<thead>
|
22 |
<tr>
|
23 |
<th style="min-width: 400px"><?php echo __( "Template Name" , "download-manager" ); ?></th>
|
24 |
+
<?php if(wpdm_query_var('_type') === 'email'){ ?>
|
25 |
+
<th style="width: 150px"><?php echo __( "Mail Receiver" , "download-manager" ); ?></th>
|
26 |
+
<?php } ?>
|
27 |
<th style="width: 250px;"><?php echo __( "Template ID" , "download-manager" ); ?></th>
|
28 |
<?php if(!isset($_GET['_type']) || $_GET['_type'] != 'email'){ ?>
|
29 |
<th style="width: 150px"><?php echo __( "Status" , "download-manager" ); ?></th>
|
88 |
?>
|
89 |
<tr valign="top" class="author-self status-inherit" id="post-8">
|
90 |
<td class="column-icon media-icon" style="text-align: left;">
|
91 |
+
<?php echo esc_attr($template['label']); ?>
|
92 |
|
93 |
</td>
|
94 |
+
|
95 |
+
<td style="width: 150px"><?php echo ucfirst($template['for']); ?></td>
|
96 |
+
|
97 |
<td>
|
98 |
<?php echo $ctpl; ?>
|
99 |
</td>
|
src/Form/Field.php
CHANGED
@@ -109,7 +109,7 @@ class Field
|
|
109 |
}
|
110 |
$_options = "";
|
111 |
foreach ($options as $value => $label){
|
112 |
-
$_options .= "<div><label class='d-block option-label'><input type='radio' $_attrs value='
|
113 |
}
|
114 |
return $_options;
|
115 |
}
|
@@ -136,14 +136,15 @@ class Field
|
|
136 |
$_attrs = '';
|
137 |
if (is_array($attrs)) {
|
138 |
foreach ($attrs as $attr => $value) {
|
|
|
139 |
$_attrs .= "$attr='$value' ";
|
140 |
}
|
141 |
}
|
142 |
?>
|
143 |
<div class="input-group">
|
144 |
-
<input <?php echo $_attrs; ?> type="url" value="<?php echo $value; ?>"/>
|
145 |
<span class="input-group-append">
|
146 |
-
<button class="btn btn-secondary btn-media-upload" type="button" rel="#<?php echo $attrs['id']; ?>"><i
|
147 |
class="far fa-image"></i></button>
|
148 |
</span>
|
149 |
</div>
|
@@ -156,21 +157,21 @@ class Field
|
|
156 |
?>
|
157 |
<div class="form-group row">
|
158 |
<div class="col-sm-12">
|
159 |
-
<input type="hidden" id="<?php echo $attrs['id'] ?>" name="<?php echo $attrs['name'] ?>" value=""/>
|
160 |
<script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit"
|
161 |
async defer></script>
|
162 |
-
<div id="<?php echo $attrs['id'] ?>_field"></div>
|
163 |
<style>
|
164 |
-
#<?php echo $attrs['id'] ?>_field iframe{ transform: scale(1.16); margin-left: 24px; margin-top: 5px; margin-bottom: 5px; }
|
165 |
-
#<?php echo $attrs['id'] ?>_field{ padding-bottom: 10px !important; }
|
166 |
</style>
|
167 |
<script type="text/javascript">
|
168 |
var verifyCallback = function (response) {
|
169 |
-
jQuery('#<?php echo $attrs['id'] ?>').val(response);
|
170 |
};
|
171 |
var widgetId2;
|
172 |
var onloadCallback = function () {
|
173 |
-
grecaptcha.render('<?php echo $attrs['id'] ?>_field', {
|
174 |
'sitekey': '<?php echo get_option('_wpdm_recaptcha_site_key'); ?>',
|
175 |
'callback': verifyCallback,
|
176 |
'theme': 'light'
|
109 |
}
|
110 |
$_options = "";
|
111 |
foreach ($options as $value => $label){
|
112 |
+
$_options .= "<div><label class='d-block option-label'><input type='radio' $_attrs value='".esc_attr($value)."'> " . esc_attr($label) . "</label></div>\r\n";
|
113 |
}
|
114 |
return $_options;
|
115 |
}
|
136 |
$_attrs = '';
|
137 |
if (is_array($attrs)) {
|
138 |
foreach ($attrs as $attr => $value) {
|
139 |
+
$value = esc_attr($value);
|
140 |
$_attrs .= "$attr='$value' ";
|
141 |
}
|
142 |
}
|
143 |
?>
|
144 |
<div class="input-group">
|
145 |
+
<input <?php echo $_attrs; ?> type="url" value="<?php echo esc_attr($value); ?>"/>
|
146 |
<span class="input-group-append">
|
147 |
+
<button class="btn btn-secondary btn-media-upload" type="button" rel="#<?php echo esc_attr($attrs['id']); ?>"><i
|
148 |
class="far fa-image"></i></button>
|
149 |
</span>
|
150 |
</div>
|
157 |
?>
|
158 |
<div class="form-group row">
|
159 |
<div class="col-sm-12">
|
160 |
+
<input type="hidden" id="<?php echo esc_attr($attrs['id']) ?>" name="<?php echo esc_attr($attrs['name']) ?>" value=""/>
|
161 |
<script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit"
|
162 |
async defer></script>
|
163 |
+
<div id="<?php echo esc_attr($attrs['id']) ?>_field"></div>
|
164 |
<style>
|
165 |
+
#<?php echo esc_attr($attrs['id']) ?>_field iframe{ transform: scale(1.16); margin-left: 24px; margin-top: 5px; margin-bottom: 5px; }
|
166 |
+
#<?php echo esc_attr($attrs['id']) ?>_field{ padding-bottom: 10px !important; }
|
167 |
</style>
|
168 |
<script type="text/javascript">
|
169 |
var verifyCallback = function (response) {
|
170 |
+
jQuery('#<?php echo esc_attr($attrs['id']) ?>').val(response);
|
171 |
};
|
172 |
var widgetId2;
|
173 |
var onloadCallback = function () {
|
174 |
+
grecaptcha.render('<?php echo esc_attr($attrs['id']) ?>_field', {
|
175 |
'sitekey': '<?php echo get_option('_wpdm_recaptcha_site_key'); ?>',
|
176 |
'callback': verifyCallback,
|
177 |
'theme': 'light'
|
src/Package/PackageController.php
CHANGED
@@ -94,10 +94,10 @@ class PackageController extends PackageTemplate {
|
|
94 |
//Featured Image
|
95 |
$post_vars['preview'] = $post_vars['thumb'] = "";
|
96 |
if ( has_post_thumbnail( $ID ) ) {
|
97 |
-
$src
|
98 |
-
$post_vars['preview'] = $src['0'];
|
99 |
-
$post_vars['featured_image'] = get_the_post_thumbnail( $ID, 'full' );
|
100 |
|
|
|
|
|
101 |
if ( in_array( 'thumb', $template_tags ) ) {
|
102 |
$post_vars['thumb'] = get_the_post_thumbnail( $ID );
|
103 |
}
|
@@ -1201,41 +1201,6 @@ class PackageController extends PackageTemplate {
|
|
1201 |
|
1202 |
$sociallock = "";
|
1203 |
|
1204 |
-
if ( isset( $package['email_lock'] ) && (int) $package['email_lock'] == 1 ) {
|
1205 |
-
$data .= PackageLocks::AskEmail( $package );
|
1206 |
-
$lock = 'locked';
|
1207 |
-
}
|
1208 |
-
|
1209 |
-
if ( isset( $package['linkedin_lock'] ) && (int) $package['linkedin_lock'] == 1 ) {
|
1210 |
-
$lock = 'locked';
|
1211 |
-
$sociallock .= PackageLocks::LinkedInShare( $package );
|
1212 |
-
|
1213 |
-
}
|
1214 |
-
|
1215 |
-
if ( isset( $package['twitterfollow_lock'] ) && (int) $package['twitterfollow_lock'] == 1 ) {
|
1216 |
-
$lock = 'locked';
|
1217 |
-
$sociallock .= PackageLocks::TwitterFollow( $package );
|
1218 |
-
|
1219 |
-
}
|
1220 |
-
|
1221 |
-
if ( isset( $package['gplusone_lock'] ) && (int) $package['gplusone_lock'] == 1 ) {
|
1222 |
-
$lock = 'locked';
|
1223 |
-
$sociallock .= PackageLocks::GooglePlusOne( $package, true );
|
1224 |
-
|
1225 |
-
}
|
1226 |
-
|
1227 |
-
if ( isset( $package['tweet_lock'] ) && (int) $package['tweet_lock'] == 1 ) {
|
1228 |
-
$lock = 'locked';
|
1229 |
-
$sociallock .= PackageLocks::Tweet( $package );
|
1230 |
-
|
1231 |
-
}
|
1232 |
-
|
1233 |
-
if ( isset( $package['facebooklike_lock'] ) && (int) $package['facebooklike_lock'] == 1 ) {
|
1234 |
-
$lock = 'locked';
|
1235 |
-
$sociallock .= PackageLocks::FacebookLike( $package, true );
|
1236 |
-
|
1237 |
-
}
|
1238 |
-
|
1239 |
|
1240 |
$extralocks = '';
|
1241 |
$extralocks = apply_filters( "wpdm_download_lock", $extralocks, $package );
|
94 |
//Featured Image
|
95 |
$post_vars['preview'] = $post_vars['thumb'] = "";
|
96 |
if ( has_post_thumbnail( $ID ) ) {
|
97 |
+
$src = wp_get_attachment_image_src( get_post_thumbnail_id( $ID ), 'full', false );
|
|
|
|
|
98 |
|
99 |
+
$post_vars['preview'] = is_array($src) ? $src['0'] : '';
|
100 |
+
$post_vars['featured_image'] = get_the_post_thumbnail( $ID, 'full' );
|
101 |
if ( in_array( 'thumb', $template_tags ) ) {
|
102 |
$post_vars['thumb'] = get_the_post_thumbnail( $ID );
|
103 |
}
|
1201 |
|
1202 |
$sociallock = "";
|
1203 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1204 |
|
1205 |
$extralocks = '';
|
1206 |
$extralocks = apply_filters( "wpdm_download_lock", $extralocks, $package );
|
src/__/Apply.php
CHANGED
@@ -678,7 +678,7 @@ class Apply
|
|
678 |
}
|
679 |
|
680 |
.wpdm-download-link<?php echo sanitize_text_field($class); ?> {
|
681 |
-
border-radius: <?php echo (int)($ui_button['borderradius']
|
682 |
}
|
683 |
|
684 |
|
678 |
}
|
679 |
|
680 |
.wpdm-download-link<?php echo sanitize_text_field($class); ?> {
|
681 |
+
border-radius: <?php echo (int)( isset($ui_button['borderradius']) ? $ui_button['borderradius'] : 4 ); ?>px;
|
682 |
}
|
683 |
|
684 |
|
src/__/Template.php
CHANGED
@@ -62,14 +62,6 @@ class Template
|
|
62 |
echo $this->fetch($template, $tpldir, $fallback);
|
63 |
}
|
64 |
|
65 |
-
function execute($code){
|
66 |
-
ob_start();
|
67 |
-
if(is_array($this->vars))
|
68 |
-
extract($this->vars);
|
69 |
-
echo $code;
|
70 |
-
return ob_get_clean();
|
71 |
-
}
|
72 |
-
|
73 |
static function output($data, $vars, $tpldir = '')
|
74 |
{
|
75 |
if(strstr($data, '.php')) {
|
62 |
echo $this->fetch($template, $tpldir, $fallback);
|
63 |
}
|
64 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
static function output($data, $vars, $tpldir = '')
|
66 |
{
|
67 |
if(strstr($data, '.php')) {
|
src/__/__.php
CHANGED
@@ -190,7 +190,7 @@ class __
|
|
190 |
$default = $default ? $default : (isset($params['default']) ? $params['default'] : null);
|
191 |
$val = isset($_REQUEST[$var]) ? __::sanitize_array($_REQUEST[$var]) : null;
|
192 |
if(!$val)
|
193 |
-
$val = $wp_query->query_vars[$var]
|
194 |
}
|
195 |
|
196 |
if (!is_array($val))
|
190 |
$default = $default ? $default : (isset($params['default']) ? $params['default'] : null);
|
191 |
$val = isset($_REQUEST[$var]) ? __::sanitize_array($_REQUEST[$var]) : null;
|
192 |
if(!$val)
|
193 |
+
$val = isset($wp_query->query_vars[$var]) ? $wp_query->query_vars[$var] : $default;
|
194 |
}
|
195 |
|
196 |
if (!is_array($val))
|