WordPress Download Manager - Version 3.2.61

Version Description

  • 2022.12.11 =
  • Improved session management
  • Introduced custom cron url ( Settings >> Privacy >> Cache & Stats ) to clear cache, you can use the URL
Download this release

Release Info

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

Code changes from version 3.2.60 to 3.2.61

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.60
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.60');
43
 
44
  define('WPDM_TEXT_DOMAIN','download-manager');
45
 
@@ -47,13 +47,6 @@ $upload_dir = wp_upload_dir();
47
  $upload_base_url = $upload_dir['baseurl'];
48
  $upload_dir = $upload_dir['basedir'];
49
 
50
- /**
51
- * Define cookie domain if it is already not defined
52
- */
53
- if (!defined('COOKIE_DOMAIN'))
54
- define('COOKIE_DOMAIN', false);
55
-
56
-
57
  /**
58
  * Define plugin admin access capability.
59
  */
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.61
9
  Text Domain: download-manager
10
  Domain Path: /languages
11
  */
39
 
40
  global $WPDM;
41
 
42
+ define('WPDM_VERSION','3.2.61');
43
 
44
  define('WPDM_TEXT_DOMAIN','download-manager');
45
 
47
  $upload_base_url = $upload_dir['baseurl'];
48
  $upload_dir = $upload_dir['basedir'];
49
 
 
 
 
 
 
 
 
50
  /**
51
  * Define plugin admin access capability.
52
  */
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: 6.0
7
  License: GPLv2 or later
8
- Stable tag: 3.2.60
9
 
10
 
11
  This File Management & Digital Store plugin will help you to control file downloads & sell digital products from your WP site.
@@ -184,6 +184,10 @@ Check download stats and get a push notification when someone downloads, install
184
 
185
  == Changelog ==
186
 
 
 
 
 
187
  = 3.2.60 - 2022.11.29 =
188
  * Fixed an input validation issue with the search bar in wpdm shortcodes
189
  * Added a new page template
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: 6.1
7
  License: GPLv2 or later
8
+ Stable tag: 3.2.61
9
 
10
 
11
  This File Management & Digital Store plugin will help you to control file downloads & sell digital products from your WP site.
184
 
185
  == Changelog ==
186
 
187
+ = 3.2.61 - 2022.12.11 =
188
+ * Improved session management
189
+ * Introduced custom cron url ( Settings >> Privacy >> Cache & Stats ) to clear cache, you can use the URL
190
+
191
  = 3.2.60 - 2022.11.29 =
192
  * Fixed an input validation issue with the search bar in wpdm shortcodes
193
  * Added a new page template
src/Admin/views/settings/privacy.php CHANGED
@@ -49,6 +49,16 @@ do_action("wpdm_privacy_settings_panel");
49
  <div class="panel-footer bg-white">
50
  <label><input type="checkbox" name="__wpdm_auto_clean_cache" <?php checked(1, get_option('__wpdm_auto_clean_cache', 0)); ?> value="1" /> <?php echo __( "Auto clean cache dir & temporary storage everyday", "download-manager" ) ?></label>
51
  </div>
 
 
 
 
 
 
 
 
 
 
52
  </div>
53
  <script>
54
  jQuery(function($) {
49
  <div class="panel-footer bg-white">
50
  <label><input type="checkbox" name="__wpdm_auto_clean_cache" <?php checked(1, get_option('__wpdm_auto_clean_cache', 0)); ?> value="1" /> <?php echo __( "Auto clean cache dir & temporary storage everyday", "download-manager" ) ?></label>
51
  </div>
52
+ <div class="panel-footer bg-white">
53
+ <label><?= __('Cron URL', WPDM_TEXT_DOMAIN) ?></label>
54
+ <div class="input-group">
55
+ <input type="text" class="form-control" id="cccronurl" readonly value="<?= home_url('/?cpc=wpdmcc&cronkey='.WPDM_CRON_KEY); ?>" />
56
+ <div class="input-group-btn">
57
+ <button class="btn btn-secondary ttip" type="button" title="<?= __('Copy', WPDM_TEXT_DOMAIN) ?>" onclick="WPDM.copy('cccronurl')"><i class="fa fa-copy"></i></button>
58
+ </div>
59
+ </div>
60
+ <em class="note"><?= __('Your can configure a cron job from your hosting control panel using the url above for reliable cron execution.', WPDM_TEXT_DOMAIN) ?></em>
61
+ </div>
62
  </div>
63
  <script>
64
  jQuery(function($) {
src/__/CronJobs.php CHANGED
@@ -24,6 +24,7 @@ class CronJobs
24
  {
25
 
26
  add_filter( 'cron_schedules', array($this, 'interval') );
 
27
 
28
  if ( ! wp_next_scheduled( '__wpdm_cron' ) ) {
29
  wp_schedule_event( time() + 3600, 'six_hourly', '__wpdm_cron' );
@@ -56,6 +57,19 @@ class CronJobs
56
  FileSystem::deleteFiles(WPDM_CACHE_DIR, false, array('filetime' => time() - 3600, 'ext' => '.txt'));
57
  //FileSystem::deleteFiles(WPDM_CACHE_DIR . 'pdfthumbs/', false);
58
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  }
60
 
61
  new CronJobs();
24
  {
25
 
26
  add_filter( 'cron_schedules', array($this, 'interval') );
27
+ add_action( 'init', array($this, 'clearTempDataCPCron') );
28
 
29
  if ( ! wp_next_scheduled( '__wpdm_cron' ) ) {
30
  wp_schedule_event( time() + 3600, 'six_hourly', '__wpdm_cron' );
57
  FileSystem::deleteFiles(WPDM_CACHE_DIR, false, array('filetime' => time() - 3600, 'ext' => '.txt'));
58
  //FileSystem::deleteFiles(WPDM_CACHE_DIR . 'pdfthumbs/', false);
59
  }
60
+
61
+ function clearTempDataCPCron(){
62
+ if(!isset($_REQUEST['cpc']) || !isset($_REQUEST['cronkey']) || $_REQUEST['cpc'] !== 'wpdmcc') return;
63
+
64
+ if($_REQUEST['cronkey'] !== WPDM_CRON_KEY) return;
65
+
66
+ global $wpdb;
67
+ $time = time();
68
+ $wpdb->query("delete from {$wpdb->prefix}ahm_sessions where `expire` < $time");
69
+ FileSystem::deleteFiles(WPDM_CACHE_DIR, false, '.zip');
70
+ FileSystem::deleteFiles(WPDM_CACHE_DIR, false, array('filetime' => time() - 3600, 'ext' => '.txt'));
71
+ die('Cache cleared successfully!');
72
+ }
73
  }
74
 
75
  new CronJobs();
src/__/Session.php CHANGED
@@ -27,7 +27,7 @@ class Session
27
  if(!defined('WPDM_ACCEPT_COOKIE') || WPDM_ACCEPT_COOKIE !== false) {
28
  //Implement user consent
29
  if(apply_filters('wpdm_user_accept_cookies', true)) {
30
- @setcookie( '__wpdm_client', $deviceID, 0, "/", COOKIE_DOMAIN, is_ssl(), true );
31
  $_COOKIE['__wpdm_client'] = $deviceID;
32
  }
33
  }
27
  if(!defined('WPDM_ACCEPT_COOKIE') || WPDM_ACCEPT_COOKIE !== false) {
28
  //Implement user consent
29
  if(apply_filters('wpdm_user_accept_cookies', true)) {
30
+ @setcookie( '__wpdm_client', $deviceID, 0, "/", "", is_ssl(), true );
31
  $_COOKIE['__wpdm_client'] = $deviceID;
32
  }
33
  }
src/__/__MailUI.php CHANGED
@@ -29,6 +29,12 @@ class __MailUI
29
  ->fetch("email-templates/ui-blocks/table.php", __DIR__.'/views');
30
  }
31
 
 
 
 
 
 
 
32
  static function button( $link, $label, $bg = '#0085d8', $padding = '10px 20px', $radius = 4, $width = 'block', $margin = '10px 0') {
33
  $link = esc_attr( $link );
34
  $button = "<a href='{$link}' style='background: {$bg}; color: #ffffff; border-radius: {$radius}px;display: {$width}; padding: {$padding};margin: {$margin}'>{$label}</a>";
29
  ->fetch("email-templates/ui-blocks/table.php", __DIR__.'/views');
30
  }
31
 
32
+ static function box($content)
33
+ {
34
+ return '<div style="padding: 20px; background: #ffffff; border: 1px solid #efefef;border-radius: 4px;margin: 10px 0">' . $content . '</div>';
35
+ }
36
+
37
+
38
  static function button( $link, $label, $bg = '#0085d8', $padding = '10px 20px', $radius = 4, $width = 'block', $margin = '10px 0') {
39
  $link = esc_attr( $link );
40
  $button = "<a href='{$link}' style='background: {$bg}; color: #ffffff; border-radius: {$radius}px;display: {$width}; padding: {$padding};margin: {$margin}'>{$label}</a>";