Download Monitor - Version 4.5.1

Version Description

Download this release

Release Info

Developer giucu91
Plugin Icon 128x128 Download Monitor
Version 4.5.1
Comparing to
See all releases

Code changes from version 4.5.0 to 4.5.1

changelog.txt CHANGED
@@ -1,4 +1,7 @@
1
- = 4.5.0 - TBA =
 
 
 
2
  Fixed: Style missing in `[downloads]` shortcode - ( https://wordpress.org/support/topic/box-template-styling-stopped-displaying/ )
3
  Fixed: Downloads not being filtered by categories - https://github.com/WPChill/download-monitor/issues/815
4
  Fixed: Missing admin.css file for Download Monitor admin header in category edit page - https://github.com/WPChill/download-monitor/issues/817
1
+ = 4.5.1 - 31.01.2022 =
2
+ Removed: Removed plugin updater from lite.
3
+
4
+ = 4.5.0 - 26.01.2022 =
5
  Fixed: Style missing in `[downloads]` shortcode - ( https://wordpress.org/support/topic/box-template-styling-stopped-displaying/ )
6
  Fixed: Downloads not being filtered by categories - https://github.com/WPChill/download-monitor/issues/815
7
  Fixed: Missing admin.css file for Download Monitor admin header in category edit page - https://github.com/WPChill/download-monitor/issues/817
download-monitor.php CHANGED
@@ -3,11 +3,11 @@
3
  Plugin Name: Download Monitor
4
  Plugin URI: https://www.download-monitor.com
5
  Description: A full solution for managing and selling downloadable files, monitoring downloads and outputting download links and file information on your WordPress powered site.
6
- Version: 4.5.0
7
  Author: WPChill
8
  Author URI: https://wpchill.com
9
  Requires at least: 5.4
10
- Tested up to: 5.8
11
  Text Domain: download-monitor
12
 
13
  License: GPL v3
@@ -33,7 +33,7 @@ if ( ! defined( 'ABSPATH' ) ) {
33
  } // Exit if accessed directly
34
 
35
  // Define DLM Version
36
- define( 'DLM_VERSION', '4.5.0' );
37
 
38
  // Define DLM FILE
39
  define( 'DLM_PLUGIN_FILE', __FILE__ );
3
  Plugin Name: Download Monitor
4
  Plugin URI: https://www.download-monitor.com
5
  Description: A full solution for managing and selling downloadable files, monitoring downloads and outputting download links and file information on your WordPress powered site.
6
+ Version: 4.5.1
7
  Author: WPChill
8
  Author URI: https://wpchill.com
9
  Requires at least: 5.4
10
+ Tested up to: 5.9
11
  Text Domain: download-monitor
12
 
13
  License: GPL v3
33
  } // Exit if accessed directly
34
 
35
  // Define DLM Version
36
+ define( 'DLM_VERSION', '4.5.1' );
37
 
38
  // Define DLM FILE
39
  define( 'DLM_PLUGIN_FILE', __FILE__ );
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: wpchill, silkalns, barrykooij, mikejolley
3
  Tags: download manager, document management, file manager, digital store, ecommerce, document management plugin, download monitor, download counter, password protection, download protection, password, protect downloads, tracker, sell, shop, ecommerce, paypal
4
  Requires at least: 5.4
5
  Tested up to: 5.9
6
- Stable tag: 4.5.0
7
  License: GPLv3
8
  Text Domain: -
9
  Requires PHP: 5.6
@@ -49,9 +49,9 @@ We have a large Knowledge Base on our [Download Monitor website](https://www.dow
49
 
50
  Are you a new Download Monitor user? Read these articles on how to get your files ready for download with Download Monitor:
51
 
52
- 1. [How to install Download Monitor](https://www.download-monitor.com/kb/installation/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-documentation)
53
- 2. [How to add your first download in Download Monitor](https://www.download-monitor.com/kb/adding-downloads/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-documentation)
54
- 3. [How to list your first download on your website with the download shortcode](https://www.download-monitor.com/kb/shortcode-download/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-documentation)
55
 
56
  More advanced topics that a lot of people find interesting:
57
 
@@ -61,15 +61,13 @@ More advanced topics that a lot of people find interesting:
61
 
62
  = Contributing and reporting bugs =
63
 
64
- You can contribute code to this plugin via GitHub: [https://github.com/download-monitor/download-monitor](https://github.com/download-monitor/download-monitor)
65
 
66
  You can contribute localizations via Transifex [https://www.transifex.com/projects/p/download-monitor/](https://www.transifex.com/projects/p/download-monitor/)
67
 
68
  = Support =
69
 
70
- Use the WordPress.org forums for community support. If you spot a bug, you can of course log it on [Github](https://github.com/download-monitor/download-monitor) instead where we can act upon it more efficiently.
71
-
72
- Unfortunately we can't offer you help with a customisation. Please consider hiring a developer for your website's customizations.
73
 
74
  == Installation ==
75
 
3
  Tags: download manager, document management, file manager, digital store, ecommerce, document management plugin, download monitor, download counter, password protection, download protection, password, protect downloads, tracker, sell, shop, ecommerce, paypal
4
  Requires at least: 5.4
5
  Tested up to: 5.9
6
+ Stable tag: 4.5.1
7
  License: GPLv3
8
  Text Domain: -
9
  Requires PHP: 5.6
49
 
50
  Are you a new Download Monitor user? Read these articles on how to get your files ready for download with Download Monitor:
51
 
52
+ 1. [How to install Download Monitor](https://www.download-monitor.com/kb/install-and-activate-download-monitor//?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-documentation)
53
+ 2. [How to add your first download in Download Monitor](https://www.download-monitor.com/kb/adding-downloads-to-your-website/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-documentation)
54
+ 3. [How to list your first download on your website with the download shortcode](https://www.download-monitor.com/kb/shortcode-downloads/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-documentation)
55
 
56
  More advanced topics that a lot of people find interesting:
57
 
61
 
62
  = Contributing and reporting bugs =
63
 
64
+ You can contribute code to this plugin via GitHub: [https://github.com/WPChill/download-monitor](https://github.com/WPChill/download-monitor)
65
 
66
  You can contribute localizations via Transifex [https://www.transifex.com/projects/p/download-monitor/](https://www.transifex.com/projects/p/download-monitor/)
67
 
68
  = Support =
69
 
70
+ Use the WordPress.org forums for community support. If you spot a bug, you can of course log it on [Github](https://github.com/WPChill/download-monitor/issues/new/choose) instead where we can act upon it more efficiently.
 
 
71
 
72
  == Installation ==
73
 
src/Product/Product.php CHANGED
@@ -304,170 +304,4 @@ class DLM_Product {
304
  return 'https://www.download-monitor.com/pricing?' . $query_string;
305
  }
306
 
307
-
308
- // Remove this after migration is complete.
309
-
310
- /**
311
- * Check for plugin updates
312
- *
313
- * @var $check_for_updates_data
314
- *
315
- * @return array
316
- */
317
- public function check_for_updates( $check_for_updates_data ) {
318
-
319
- // Get license
320
- $license = $this->get_license();
321
-
322
- // Check if checked is set
323
- if ( empty( $check_for_updates_data->checked ) ) {
324
- return $check_for_updates_data;
325
- }
326
-
327
- // Only check for data if license is activated
328
- if ( true !== $license->is_active() ) {
329
- return $check_for_updates_data;
330
- }
331
-
332
- // Get current version
333
- $current_ver = ( $this->version !== false ) ? $this->version : $check_for_updates_data->checked[ $this->plugin_name ];
334
-
335
- // The request
336
- $request = wp_remote_get( self::STORE_URL . self::ENDPOINT_UPDATE . '&' . http_build_query( array(
337
- 'request' => 'pluginupdatecheck',
338
- 'plugin_name' => $this->plugin_name,
339
- 'version' => $current_ver,
340
- 'api_product_id' => $this->product_id,
341
- 'licence_key' => $license->get_key(),
342
- 'email' => $license->get_email(),
343
- 'instance' => site_url()
344
- ), '', '&' ) );
345
-
346
- // Check if request is correct
347
- if ( is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) != 200 ) {
348
- return $check_for_updates_data;
349
- }
350
-
351
- // Check for a plugin update
352
- $response = maybe_unserialize( wp_remote_retrieve_body( $request ) );
353
-
354
- // $response must be an object
355
- if ( ! is_object( $response ) ) {
356
- return $check_for_updates_data;
357
- }
358
-
359
- if ( isset( $response->errors ) ) {
360
- $this->handle_errors( $response->errors );
361
- return $check_for_updates_data;
362
- }
363
-
364
- // Set version variables
365
- if ( is_object( $response ) && false !== $response && isset( $response->new_version ) ) {
366
-
367
- // Check if there's a new version
368
- if ( version_compare( $response->new_version, $current_ver, '>' ) ) {
369
- $check_for_updates_data->response[ $this->plugin_name ] = $response;
370
- }
371
-
372
- }
373
-
374
- return $check_for_updates_data;
375
- }
376
-
377
- /**
378
- * Plugins API
379
- *
380
- * @param bool $false
381
- * @param string $action
382
- * @param array $args
383
- *
384
- * @return mixed
385
- */
386
- public function plugins_api( $false, $action, $args ) {
387
-
388
-
389
- // License
390
- $license = $this->get_license();
391
-
392
- // Only take over plugin info screen if license is activated
393
- if ( true !== $license->is_active() ) {
394
- return $false;
395
- }
396
-
397
- // Check if this request if for this product
398
- if ( ! isset( $args->slug ) || ( $args->slug !== $this->product_id ) ) {
399
- return $false;
400
- }
401
-
402
- // Get the current version
403
- $plugin_info = get_site_transient( 'update_plugins' );
404
- $current_ver = ( $this->version !== false ) ? $this->version : ( isset( $plugin_info->checked[ $this->plugin_name ] ) ? $plugin_info->checked[ $this->plugin_name ] : '' );
405
-
406
- $request = wp_remote_get( self::STORE_URL . self::ENDPOINT_UPDATE . '&' . http_build_query( array(
407
- 'request' => 'plugininformation',
408
- 'plugin_name' => $this->plugin_name,
409
- 'version' => $current_ver,
410
- 'api_product_id' => $this->product_id,
411
- 'licence_key' => $license->get_key(),
412
- 'email' => $license->get_email(),
413
- 'instance' => site_url()
414
- ), '', '&' ) );
415
-
416
- // Check if request is correct
417
- if ( is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) != 200 ) {
418
- return $false;
419
- }
420
-
421
- // Check for a plugin update
422
- $response = maybe_unserialize( wp_remote_retrieve_body( $request ) );
423
-
424
- // $response must be an object
425
- if ( ! is_object( $response ) ) {
426
- return $false;
427
- }
428
-
429
- // Handle errors
430
- if ( isset( $response->errors ) ) {
431
- $this->handle_errors( $response->errors );
432
- return $false;
433
- }
434
-
435
- // If everything is okay return the $response
436
- if ( isset( $response ) && is_object( $response ) && false !== $response ) {
437
- return $response;
438
- }
439
- }
440
-
441
- /**
442
- * Display notice after extension plugin row
443
- *
444
- * @param string $file
445
- * @param array $plugin_data
446
- */
447
- public function after_plugin_row( $file, $plugin_data ) {
448
-
449
- // Don't show if license is activated
450
- if ( $this->get_license()->is_active() ) {
451
- return;
452
- }
453
-
454
- // Output row with message telling people to activate their license
455
- $id = sanitize_title( $plugin_data['Name'] );
456
- echo '<tr class="plugin-update-tr active">';
457
- echo '<td colspan="3" class="plugin-update colspanchange">';
458
- echo '<div class="dlm-plugin-inline-notice">';
459
- printf(
460
- wp_kses_post (__( '<a href="%s">Register your copy</a> of the <strong>%s</strong> extension to receive access to automatic upgrades and support. Need a license key? <a href="%s" target="_blank">Purchase one now</a>.', 'download-monitor' ) ),
461
- esc_url( admin_url( 'edit.php?post_type=dlm_download&page=dlm-installed-extensions' ) ),
462
- esc_html( $this->get_product_name() ),
463
- esc_url( $this->get_tracking_url( 'plugins_page' ) )
464
- );
465
- echo '</div></td></tr>';
466
-
467
- // Disable bottom border on parent row
468
- echo '<style scoped="scoped">';
469
- echo sprintf( "#%s td, #%s th { box-shadow: none !important; }", esc_html( $id ), esc_html( $id ) );
470
- echo '</style>';
471
- }
472
-
473
  }
304
  return 'https://www.download-monitor.com/pricing?' . $query_string;
305
  }
306
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
307
  }
src/Product/ProductManager.php CHANGED
@@ -171,14 +171,6 @@ class DLM_Product_Manager {
171
  // Setup new Product
172
  $product = new DLM_Product( $extension['file'], $extension['version'], $extension['name'] );
173
 
174
- // Remove this after migration.
175
- if ( apply_filters( "dlm_disable_update_for_{$extension['file']}", true ) ) {
176
- // Setup plugin actions and filters
177
- add_action( 'pre_set_site_transient_update_plugins', array( $product, 'check_for_updates' ) );
178
- add_filter( 'plugins_api', array( $product, 'plugins_api' ), 10, 3 );
179
- add_action( 'after_plugin_row_' . $product->get_plugin_name(), array( $product, 'after_plugin_row' ), 10, 2 );
180
- }
181
-
182
  // Set action for each extension
183
  do_action( 'dlm_extensions_action_' . $extension['file'], $extension, $product );
184
 
171
  // Setup new Product
172
  $product = new DLM_Product( $extension['file'], $extension['version'], $extension['name'] );
173
 
 
 
 
 
 
 
 
 
174
  // Set action for each extension
175
  do_action( 'dlm_extensions_action_' . $extension['file'], $extension, $product );
176