WordPress Download Manager - Version 3.2.39

Version Description

  • 2022.03.14 =
  • Improved master key option
  • Fixed an issue with the css variable for Google web font
Download this release

Release Info

Developer codename065
Plugin Icon 128x128 WordPress Download Manager
Version 3.2.39
Comparing to
See all releases

Code changes from version 3.2.38 to 3.2.39

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.38
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.38');
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.39
9
  Text Domain: download-manager
10
  Domain Path: /languages
11
  */
39
 
40
  global $WPDM;
41
 
42
+ define('WPDM_VERSION','3.2.39');
43
 
44
  define('WPDM_TEXT_DOMAIN','download-manager');
45
 
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: 5.9
7
  License: GPLv2 or later
8
- Stable tag: 3.2.38
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,10 @@ Check download stats and get a push notification when someone downloads, install
181
 
182
  == Changelog ==
183
 
 
 
 
 
184
  = 3.2.38 - 2022.03.08 =
185
  * Improved all downloads table, added support for wpdm acf add-on
186
 
5
  Requires at least: 5.3
6
  Tested up to: 5.9
7
  License: GPLv2 or later
8
+ Stable tag: 3.2.39
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.39 - 2022.03.14 =
185
+ * Improved master key option
186
+ * Fixed an issue with the css variable for Google web font
187
+
188
  = 3.2.38 - 2022.03.08 =
189
  * Improved all downloads table, added support for wpdm acf add-on
190
 
src/Admin/Menu/Packages.php CHANGED
@@ -79,11 +79,12 @@ class Packages
79
  update_post_meta($post, $key_name, $meta_value);
80
  }
81
 
 
82
  if(get_post_meta($post, '__wpdm_masterkey', true) == '')
83
- update_post_meta($post, '__wpdm_masterkey', uniqid());
84
 
85
  if (isset($_POST['reset_key']) && $_POST['reset_key'] == 1)
86
- update_post_meta($post, '__wpdm_masterkey', uniqid());
87
 
88
  if(isset($_REQUEST['reset_udl'])) WPDM()->downloadHistory->resetUserDownloadCount($post, 'all');
89
  do_action('wpdm_admin_update_package',$post, $_POST['file']);
79
  update_post_meta($post, $key_name, $meta_value);
80
  }
81
 
82
+ $masterKey = Crypt::encrypt(['id' => $post, 'time' => time()]);
83
  if(get_post_meta($post, '__wpdm_masterkey', true) == '')
84
+ update_post_meta($post, '__wpdm_masterkey', $masterKey);
85
 
86
  if (isset($_POST['reset_key']) && $_POST['reset_key'] == 1)
87
+ update_post_meta($post, '__wpdm_masterkey', $masterKey);
88
 
89
  if(isset($_REQUEST['reset_udl'])) WPDM()->downloadHistory->resetUserDownloadCount($post, 'all');
90
  do_action('wpdm_admin_update_package',$post, $_POST['file']);
src/Admin/views/metaboxes/package-settings.php CHANGED
@@ -94,7 +94,7 @@
94
  <?php if(isset($_GET['post'])&&$_GET['post']!=''){ ?>
95
  <tr>
96
  <td><?php echo __( "Master Key" , "download-manager" ); ?></td>
97
- <td><input class="form-control" style="width: 200px;display: inline-block;font-family: monospace;letter-spacing: 1px" type="text" readonly="readonly" value="<?php echo get_post_meta($post->ID, '__wpdm_masterkey', true); ?>"> <label><input type="checkbox" value="1" name="reset_key" /> <?php echo __( "Regenerate Master Key for Download" , "download-manager" ); ?></label> <i class="info fa fa-info" data-placement="top" title="<?php echo __( "This key can be used for direct download" , "download-manager" ); ?>"></i></td>
98
  </tr>
99
  <?php } ?>
100
  <?php do_action("wpdm_package_settings_tr", $post->ID); ?>
94
  <?php if(isset($_GET['post'])&&$_GET['post']!=''){ ?>
95
  <tr>
96
  <td><?php echo __( "Master Key" , "download-manager" ); ?></td>
97
+ <td><input class="form-control" style="font-family: monospace;letter-spacing: 1px" type="text" readonly="readonly" value="<?php echo get_post_meta($post->ID, '__wpdm_masterkey', true); ?>"> <label><input type="checkbox" value="1" name="reset_key" /> <?php echo __( "Regenerate Master Key for Download" , "download-manager" ); ?></label> <i class="info fa fa-info" data-placement="top" title="<?php echo __( "This key can be used for direct download" , "download-manager" ); ?>"></i></td>
98
  </tr>
99
  <?php } ?>
100
  <?php do_action("wpdm_package_settings_tr", $post->ID); ?>
src/User/views/dashboard/download-history.php CHANGED
@@ -19,7 +19,7 @@
19
  ?>
20
  <tr>
21
  <td><a href="<?php echo get_permalink($stat->pid); ?>"><?php echo $stat->post_title; ?></a></td>
22
- <td><?php echo date_i18n(get_option('date_format')." H:i",$stat->timestamp); ?></td>
23
  <td><?php echo $stat->ip; ?></td>
24
  </tr>
25
  <?php
19
  ?>
20
  <tr>
21
  <td><a href="<?php echo get_permalink($stat->pid); ?>"><?php echo $stat->post_title; ?></a></td>
22
+ <td><?php echo date_i18n(get_option('date_format')." H:i", $stat->timestamp); ?></td>
23
  <td><?php echo $stat->ip; ?></td>
24
  </tr>
25
  <?php
src/__/Apply.php CHANGED
@@ -634,7 +634,7 @@ class Apply
634
  $warning = isset($uicolors['warning']) ? $uicolors['warning'] : '#f29e0f';
635
  $danger = isset($uicolors['danger']) ? $uicolors['danger'] : '#ff5062';
636
  $font = get_option('__wpdm_google_font', 'Rubik');
637
- $font = $font ? "\"{$font}\"," : '';
638
  if (is_singular('wpdmpro'))
639
  $ui_button = get_option('__wpdm_ui_download_button');
640
  else
@@ -674,7 +674,7 @@ class Apply
674
  --color-purple: <?php echo esc_attr( isset($uicolors['purple'])?$uicolors['purple']:'#8557D3' ); ?>;
675
  --color-red: <?php echo esc_attr( isset($uicolors['red'])?$uicolors['red']:'#ff5062' ); ?>;
676
  --color-muted: rgba(69, 89, 122, 0.6);
677
- --wpdm-font: <?php echo esc_attr( $font ); ?> -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
678
  }
679
 
680
  .wpdm-download-link<?php echo sanitize_text_field($class); ?> {
634
  $warning = isset($uicolors['warning']) ? $uicolors['warning'] : '#f29e0f';
635
  $danger = isset($uicolors['danger']) ? $uicolors['danger'] : '#ff5062';
636
  $font = get_option('__wpdm_google_font', 'Rubik');
637
+ $font = $font ? "{$font}" : '-apple-system';
638
  if (is_singular('wpdmpro'))
639
  $ui_button = get_option('__wpdm_ui_download_button');
640
  else
674
  --color-purple: <?php echo esc_attr( isset($uicolors['purple'])?$uicolors['purple']:'#8557D3' ); ?>;
675
  --color-red: <?php echo esc_attr( isset($uicolors['red'])?$uicolors['red']:'#ff5062' ); ?>;
676
  --color-muted: rgba(69, 89, 122, 0.6);
677
+ --wpdm-font: "<?php echo esc_attr( $font ); ?>", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
678
  }
679
 
680
  .wpdm-download-link<?php echo sanitize_text_field($class); ?> {
src/__/Session.php CHANGED
@@ -68,7 +68,8 @@ class Session
68
  if (self::$store === 'file') self::$data[$name] = array('value' => $value, 'expire' => time() + $expire);
69
  else {
70
  self::clear($name);
71
- $wpdb->insert("{$wpdb->prefix}ahm_sessions", array('deviceID' => self::$deviceID, 'name' => $name, 'value' => maybe_serialize($value), 'expire' => time() + $expire));
 
72
  }
73
  }
74
 
68
  if (self::$store === 'file') self::$data[$name] = array('value' => $value, 'expire' => time() + $expire);
69
  else {
70
  self::clear($name);
71
+ if($value)
72
+ $wpdb->insert("{$wpdb->prefix}ahm_sessions", array('deviceID' => self::$deviceID, 'name' => $name, 'value' => maybe_serialize($value), 'expire' => time() + $expire));
73
  }
74
  }
75