Download Monitor - Version 4.5.0

Version Description

Download this release

Release Info

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

Code changes from version 4.4.14 to 4.5.0

changelog.txt CHANGED
@@ -1,3 +1,11 @@
 
 
 
 
 
 
 
 
1
  = 4.4.14 - 12.01.2022 =
2
  Added: Filter 'dlm_filemanager_get_file_name' to filter the displayed file name.
3
  Fixed: Check if there are pages/posts/cpt with the same slug as the endpoint ( https://github.com/WPChill/download-monitor/issues/774 )
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
5
+ Changed: Category link in Downloads view table will now work similar to Posts and keep already set filters - https://github.com/WPChill/download-monitor/issues/818
6
+ Changed: Minor sanitization and escaping fix
7
+ Changed: Redo public taxonomies ( https://github.com/WPChill/download-monitor/issues/775 )
8
+
9
  = 4.4.14 - 12.01.2022 =
10
  Added: Filter 'dlm_filemanager_get_file_name' to filter the displayed file name.
11
  Fixed: Check if there are pages/posts/cpt with the same slug as the endpoint ( https://github.com/WPChill/download-monitor/issues/774 )
download-monitor.php CHANGED
@@ -3,7 +3,7 @@
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.4.14
7
  Author: WPChill
8
  Author URI: https://wpchill.com
9
  Requires at least: 5.4
@@ -33,7 +33,7 @@ if ( ! defined( 'ABSPATH' ) ) {
33
  } // Exit if accessed directly
34
 
35
  // Define DLM Version
36
- define( 'DLM_VERSION', '4.4.14' );
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.0
7
  Author: WPChill
8
  Author URI: https://wpchill.com
9
  Requires at least: 5.4
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__ );
includes/admin/class-dlm-review.php CHANGED
@@ -139,7 +139,7 @@ class DLM_Review {
139
  }
140
 
141
  $.post( '<?php echo admin_url( 'admin-ajax.php' ) ?>', data, function( response ) {
142
- $( '#<?php echo $this->slug ?>-download-monitor-review-notice' ).slideUp( 'fast', function() {
143
  $( this ).remove();
144
  } );
145
  });
139
  }
140
 
141
  $.post( '<?php echo admin_url( 'admin-ajax.php' ) ?>', data, function( response ) {
142
+ $( '#<?php echo esc_attr( $this->slug ) ?>-download-monitor-review-notice' ).slideUp( 'fast', function() {
143
  $( this ).remove();
144
  } );
145
  });
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  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.8
6
- Stable tag: 4.4.14
7
  License: GPLv3
8
  Text Domain: -
9
  Requires PHP: 5.6
2
  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
src/Admin/Admin.php CHANGED
@@ -197,7 +197,7 @@ class DLM_Admin {
197
 
198
  $enqueue = false;
199
 
200
- if ( $hook == 'post-new.php' || $hook == 'post.php' || $hook == 'edit.php' ) {
201
  if (
202
  ( ! empty( $_GET['post_type'] ) && in_array( $_GET['post_type'], array(
203
  'dlm_download',
197
 
198
  $enqueue = false;
199
 
200
+ if ( $hook == 'post-new.php' || $hook == 'post.php' || $hook == 'edit.php' || 'term.php' == $hook ) {
201
  if (
202
  ( ! empty( $_GET['post_type'] ) && in_array( $_GET['post_type'], array(
203
  'dlm_download',
src/Admin/CustomActions.php CHANGED
@@ -37,13 +37,13 @@ class DLM_Custom_Actions {
37
  }
38
 
39
  $r = array();
 
40
  $r['pad_counts'] = 1;
41
  $r['hierarchical'] = $hierarchical;
42
  $r['hide_empty'] = 1;
43
  $r['show_count'] = $show_counts;
44
  $r['selected'] = ( isset( $wp_query->query['dlm_download_category'] ) ) ? $wp_query->query['dlm_download_category'] : '';
45
-
46
- $r['menu_order'] = false;
47
 
48
  if ( $orderby == 'order' ) {
49
  $r['menu_order'] = 'asc';
@@ -51,7 +51,7 @@ class DLM_Custom_Actions {
51
  $r['orderby'] = $orderby;
52
  }
53
 
54
- $terms = get_terms( 'dlm_download_category', $r );
55
 
56
  if ( ! $terms ) {
57
  return;
37
  }
38
 
39
  $r = array();
40
+ $r['taxonomy'] = 'dlm_download_category';
41
  $r['pad_counts'] = 1;
42
  $r['hierarchical'] = $hierarchical;
43
  $r['hide_empty'] = 1;
44
  $r['show_count'] = $show_counts;
45
  $r['selected'] = ( isset( $wp_query->query['dlm_download_category'] ) ) ? $wp_query->query['dlm_download_category'] : '';
46
+ $r['menu_order'] = false;
 
47
 
48
  if ( $orderby == 'order' ) {
49
  $r['menu_order'] = 'asc';
51
  $r['orderby'] = $orderby;
52
  }
53
 
54
+ $terms = get_terms( $r );
55
 
56
  if ( ! $terms ) {
57
  return;
src/Admin/CustomColumns.php CHANGED
@@ -72,10 +72,12 @@ class DLM_Custom_Columns {
72
  echo esc_html( $post->ID );
73
  break;
74
  case "download_cat" :
75
- if ( ! $terms = get_the_term_list( $post->ID, 'dlm_download_category', '', ', ', '' ) ) {
76
  echo '<span class="na">&ndash;</span>';
77
  } else {
78
- echo wp_kses_post( $terms );
 
 
79
  }
80
  break;
81
  case "download_tag" :
72
  echo esc_html( $post->ID );
73
  break;
74
  case "download_cat" :
75
+ if ( ! $terms = get_the_terms( $post->ID, 'dlm_download_category' ) ) {
76
  echo '<span class="na">&ndash;</span>';
77
  } else {
78
+ foreach ( $terms as $term ) {
79
+ echo '<a href=' . esc_url( add_query_arg( 'dlm_download_category', esc_attr( $term->slug ) ) ) . '>' . esc_html( $term->name ) . '</a> ';
80
+ }
81
  }
82
  break;
83
  case "download_tag" :
src/Shortcodes.php CHANGED
@@ -282,6 +282,9 @@ class DLM_Shortcodes {
282
  public function downloads( $atts ) {
283
  global $dlm_max_num_pages;
284
 
 
 
 
285
  extract( shortcode_atts( array(
286
  // Query args
287
  'per_page' => '-1', // -1 = no limit
282
  public function downloads( $atts ) {
283
  global $dlm_max_num_pages;
284
 
285
+ // enqueue style only on shortcode use
286
+ wp_enqueue_style( 'dlm-frontend' );
287
+
288
  extract( shortcode_atts( array(
289
  // Query args
290
  'per_page' => '-1', // -1 = no limit
src/TaxonomyManager.php CHANGED
@@ -42,8 +42,8 @@ class DLM_Taxonomy_Manager {
42
  'new_item_name' => __( 'New Download Category Name', 'download-monitor' ),
43
  ),
44
  'show_ui' => true,
45
- 'query_var' => false,
46
- 'public' => false,
47
  'capabilities' => array(
48
  'manage_terms' => 'manage_downloads',
49
  'edit_terms' => 'manage_downloads',
42
  'new_item_name' => __( 'New Download Category Name', 'download-monitor' ),
43
  ),
44
  'show_ui' => true,
45
+ 'query_var' => true,
46
+ 'public' => true,
47
  'capabilities' => array(
48
  'manage_terms' => 'manage_downloads',
49
  'edit_terms' => 'manage_downloads',
templates/shop/checkout/order-complete.php CHANGED
@@ -94,7 +94,7 @@ if ( ! defined( 'ABSPATH' ) ) {
94
  <tr>
95
  <td><?php echo esc_html( $download_title ); ?></td>
96
  <td><?php echo esc_html( $version_label ); ?></td>
97
- <td><?php echo $download_button_html; ?></td>
98
  </tr>
99
  <?php endforeach; ?>
100
  </tbody>
94
  <tr>
95
  <td><?php echo esc_html( $download_title ); ?></td>
96
  <td><?php echo esc_html( $version_label ); ?></td>
97
+ <td><?php echo wp_kses_post( $download_button_html ); ?></td>
98
  </tr>
99
  <?php endforeach; ?>
100
  </tbody>