Download Monitor - Version 1.8.1

Version Description

Download this release

Release Info

Developer barrykooij
Plugin Icon 128x128 Download Monitor
Version 1.8.1
Comparing to
See all releases

Code changes from version 1.8.0 to 1.8.1

assets/css/frontend.css CHANGED
@@ -1 +1 @@
1
- .download-box{width:250px;border:1px solid #ccc;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;text-align:center;position:relative;margin:1em auto;box-shadow:0 2px 4px rgba(0,0,0,.1),inset 0 1px 0 rgba(255,255,255,.4)}.download-box img.wp-post-image{margin:0;padding:0;display:block;width:100%;-moz-border-radius:0;-webkit-border-radius:0;-moz-border-top-left-radius:3px;-moz-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;border-radius:0;border-top-left-radius:3px;border-top-right-radius:3px;box-shadow:inset 0 1px 0 rgba(255,255,255,.4)}.download-box .download-box-content{padding:0 1em 1em}.download-box .download-count{-moz-border-radius:1em;-webkit-border-radius:1em;border-radius:1em;color:#777;text-shadow:0 1px 0 rgba(255,255,255,.5);background:#ddd;box-shadow:0 2px 4px rgba(0,0,0,.1),inset 0 1px 0 rgba(255,255,255,.4);position:absolute;top:0;right:0;padding:.5em;height:1em;width:auto;min-width:1em;font-size:1em;text-align:center;vertical-align:middle;line-height:1em;border:1px solid #bbb;margin:-.5em -.5em 0 0}.download-button{text-align:center;text-decoration:none;padding:.75em 1em;color:#fff;display:block;font-size:1.2em;line-height:1.5em;background-color:#09c;background-image:-webkit-linear-gradient(#009fd4,#09c,#0086b2);background-image:-moz-linear-gradient(#009fd4,#09c,#0086b2);-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;text-shadow:0 -1px 0 rgba(0,0,0,.5);box-shadow:0 2px 4px rgba(0,0,0,.3),inset 0 1px 0 rgba(255,255,255,.4);border:1px solid #0086b2;cursor:pointer}.download-button:hover{color:#fff;background-color:#09c;background-image:-webkit-linear-gradient(#09c,#0086b2);background-image:-moz-linear-gradient(#09c,#0086b2)}.download-button small{font-size:.8em;opacity:.8;display:block}.filetype-icon{padding-left:19px;background-repeat:no-repeat;background-position:left;background-image:url(../images/filetypes/document.png)}.filetype-pdf{background-image:url(../images/filetypes/document-pdf.png)}.filetype-aif,.filetype-aifc,.filetype-aiff,.filetype-au,.filetype-kar,.filetype-m3u,.filetype-m4r,.filetype-mid,.filetype-midi,.filetype-mp2,.filetype-mp3,.filetype-mpga,.filetype-ra,.filetype-ram,.filetype-rm,.filetype-rpm,.filetype-snd,.filetype-wav,.filetype-wave{background-image:url(../images/filetypes/document-music.png)}.filetype-avi,.filetype-divx,.filetype-mov,.filetype-movie,.filetype-mp4,.filetype-mpe,.filetype-mpeg,.filetype-mpg,.filetype-mxu,.filetype-qt{background-image:url(../images/filetypes/document-film.png)}.filetype-7z,.filetype-gz,.filetype-rar,.filetype-sit,.filetype-tar,.filetype-zip{background-image:url(../images/filetypes/document-zipper.png)}.filetype-csv,.filetype-tsv,.filetype-xls,.filetype-xlsx{background-image:url(../images/filetypes/document-excel.png)}.filetype-doc,.filetype-docx{background-image:url(../images/filetypes/document-word-text.png)}.filetype-ai{background-image:url(../images/filetypes/document-illustrator.png)}.filetype-swf{background-image:url(../images/filetypes/document-flash-movie.png)}.filetype-bmp,.filetype-djv,.filetype-eps,.filetype-gif,.filetype-ief,.filetype-jpe,.filetype-jpeg,.filetype-jpg,.filetype-pbm,.filetype-pgm,.filetype-png,.filetype-pnm,.filetype-ppm,.filetype-ps,.filetype-ras,.filetype-rgb,.filetype-tif,.filetype-tiff,.filetype-wbmp,.filetype-xbm,.filetype-xpm,.filetype-xwd{background-image:url(../images/filetypes/document-image.png)}.filetype-psd{background-image:url(../images/filetypes/document-photoshop.png)}.filetype-ppt,.filetype-pptx{background-image:url(../images/filetypes/document-powerpoint.png)}.filetype-as,.filetype-css,.filetype-htaccess,.filetype-htm,.filetype-html,.filetype-js,.filetype-php,.filetype-sql,.filetype-xml,.filetype-xsl{background-image:url(../images/filetypes/document-code.png)}.filetype-rtf,.filetype-rtx{background-image:url(../images/filetypes/document-text-image.png)}.filetype-txt{background-image:url(../images/filetypes/document-text.png)}#content nav.download-monitor-pagination,nav.download-monitor-pagination{text-align:center}#content nav.download-monitor-pagination ul,nav.download-monitor-pagination ul{display:inline-block;white-space:nowrap;padding:0;clear:both;border:1px solid #eee;border-right:0;margin:1px}#content nav.download-monitor-pagination ul li,nav.download-monitor-pagination ul li{border-right:1px solid #eee;padding:0;margin:0;float:left;display:inline;overflow:hidden}#content nav.download-monitor-pagination ul li a,#content nav.download-monitor-pagination ul li span,nav.download-monitor-pagination ul li a,nav.download-monitor-pagination ul li span{margin:0;text-decoration:none;line-height:1em;font-size:1em;font-weight:400;padding:.5em;min-width:1em;display:block}#content nav.download-monitor-pagination ul li a:focus,#content nav.download-monitor-pagination ul li a:hover,#content nav.download-monitor-pagination ul li span.current,nav.download-monitor-pagination ul li a:focus,nav.download-monitor-pagination ul li a:hover,nav.download-monitor-pagination ul li span.current{background:#eee;color:#888}
1
+ .download-box{width:250px;border:1px solid #ccc;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;text-align:center;position:relative;margin:1em auto;box-shadow:0 2px 4px rgba(0,0,0,.1),inset 0 1px 0 rgba(255,255,255,.4)}.download-box img.wp-post-image{margin:0;padding:0;display:block;width:100%;-moz-border-radius:0;-webkit-border-radius:0;-moz-border-top-left-radius:3px;-moz-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;border-radius:0;border-top-left-radius:3px;border-top-right-radius:3px;box-shadow:inset 0 1px 0 rgba(255,255,255,.4)}.download-box .download-box-content{padding:0 1em 1em}.download-box .download-count{-moz-border-radius:1em;-webkit-border-radius:1em;border-radius:1em;color:#777;text-shadow:0 1px 0 rgba(255,255,255,.5);background:#ddd;box-shadow:0 2px 4px rgba(0,0,0,.1),inset 0 1px 0 rgba(255,255,255,.4);position:absolute;top:0;right:0;padding:.6em;width:auto;min-width:1em;font-size:1em;text-align:center;vertical-align:middle;line-height:1em;border:1px solid #bbb;margin:-.5em -.5em 0 0}.download-button{text-align:center;text-decoration:none;padding:.75em 1em;color:#fff;display:block;font-size:1.2em;line-height:1.5em;background-color:#09c;background-image:-webkit-linear-gradient(#009fd4,#09c,#0086b2);background-image:-moz-linear-gradient(#009fd4,#09c,#0086b2);-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;text-shadow:0 -1px 0 rgba(0,0,0,.5);box-shadow:0 2px 4px rgba(0,0,0,.3),inset 0 1px 0 rgba(255,255,255,.4);border:1px solid #0086b2;cursor:pointer}.download-button:hover{color:#fff;background-color:#09c;background-image:-webkit-linear-gradient(#09c,#0086b2);background-image:-moz-linear-gradient(#09c,#0086b2)}.download-button small{font-size:.8em;opacity:.8;display:block}.filetype-icon{padding-left:19px;background-repeat:no-repeat;background-position:left;background-image:url(../images/filetypes/document.png)}.filetype-pdf{background-image:url(../images/filetypes/document-pdf.png)}.filetype-aif,.filetype-aifc,.filetype-aiff,.filetype-au,.filetype-kar,.filetype-m3u,.filetype-m4r,.filetype-mid,.filetype-midi,.filetype-mp2,.filetype-mp3,.filetype-mpga,.filetype-ra,.filetype-ram,.filetype-rm,.filetype-rpm,.filetype-snd,.filetype-wav,.filetype-wave{background-image:url(../images/filetypes/document-music.png)}.filetype-avi,.filetype-divx,.filetype-mov,.filetype-movie,.filetype-mp4,.filetype-mpe,.filetype-mpeg,.filetype-mpg,.filetype-mxu,.filetype-qt{background-image:url(../images/filetypes/document-film.png)}.filetype-7z,.filetype-gz,.filetype-rar,.filetype-sit,.filetype-tar,.filetype-zip{background-image:url(../images/filetypes/document-zipper.png)}.filetype-csv,.filetype-tsv,.filetype-xls,.filetype-xlsx{background-image:url(../images/filetypes/document-excel.png)}.filetype-doc,.filetype-docx{background-image:url(../images/filetypes/document-word-text.png)}.filetype-ai{background-image:url(../images/filetypes/document-illustrator.png)}.filetype-swf{background-image:url(../images/filetypes/document-flash-movie.png)}.filetype-bmp,.filetype-djv,.filetype-eps,.filetype-gif,.filetype-ief,.filetype-jpe,.filetype-jpeg,.filetype-jpg,.filetype-pbm,.filetype-pgm,.filetype-png,.filetype-pnm,.filetype-ppm,.filetype-ps,.filetype-ras,.filetype-rgb,.filetype-tif,.filetype-tiff,.filetype-wbmp,.filetype-xbm,.filetype-xpm,.filetype-xwd{background-image:url(../images/filetypes/document-image.png)}.filetype-psd{background-image:url(../images/filetypes/document-photoshop.png)}.filetype-ppt,.filetype-pptx{background-image:url(../images/filetypes/document-powerpoint.png)}.filetype-as,.filetype-css,.filetype-htaccess,.filetype-htm,.filetype-html,.filetype-js,.filetype-php,.filetype-sql,.filetype-xml,.filetype-xsl{background-image:url(../images/filetypes/document-code.png)}.filetype-rtf,.filetype-rtx{background-image:url(../images/filetypes/document-text-image.png)}.filetype-txt{background-image:url(../images/filetypes/document-text.png)}#content nav.download-monitor-pagination,nav.download-monitor-pagination{text-align:center}#content nav.download-monitor-pagination ul,nav.download-monitor-pagination ul{display:inline-block;white-space:nowrap;padding:0;clear:both;border:1px solid #eee;border-right:0;margin:1px}#content nav.download-monitor-pagination ul li,nav.download-monitor-pagination ul li{border-right:1px solid #eee;padding:0;margin:0;float:left;display:inline;overflow:hidden}#content nav.download-monitor-pagination ul li a,#content nav.download-monitor-pagination ul li span,nav.download-monitor-pagination ul li a,nav.download-monitor-pagination ul li span{margin:0;text-decoration:none;line-height:1em;font-size:1em;font-weight:400;padding:.5em;min-width:1em;display:block}#content nav.download-monitor-pagination ul li a:focus,#content nav.download-monitor-pagination ul li a:hover,#content nav.download-monitor-pagination ul li span.current,nav.download-monitor-pagination ul li a:focus,nav.download-monitor-pagination ul li a:hover,nav.download-monitor-pagination ul li span.current{background:#eee;color:#888}
assets/css/frontend.less CHANGED
@@ -41,8 +41,7 @@
41
  position: absolute;
42
  top: 0;
43
  right: 0;
44
- padding: .5em;
45
- height: 1em;
46
  width: auto;
47
  min-width: 1em;
48
  font-size: 1em;
41
  position: absolute;
42
  top: 0;
43
  right: 0;
44
+ padding: .6em;
 
45
  width: auto;
46
  min-width: 1em;
47
  font-size: 1em;
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 downloadable files, monitoring downloads and outputting download links and file information on your WordPress powered site.
6
- Version: 1.8.0
7
  Author: Never5
8
  Author URI: https://www.never5.com
9
  Requires at least: 3.8
10
- Tested up to: 4.2.2
11
 
12
  License: GPL v3
13
 
@@ -32,7 +32,7 @@ if ( ! defined( 'ABSPATH' ) ) {
32
  } // Exit if accessed directly
33
 
34
  // Define DLM Version
35
- define( 'DLM_VERSION', '1.8.0' );
36
 
37
  function __download_monitor_main() {
38
 
3
  Plugin Name: Download Monitor
4
  Plugin URI: https://www.download-monitor.com
5
  Description: A full solution for managing downloadable files, monitoring downloads and outputting download links and file information on your WordPress powered site.
6
+ Version: 1.8.1
7
  Author: Never5
8
  Author URI: https://www.never5.com
9
  Requires at least: 3.8
10
+ Tested up to: 4.3
11
 
12
  License: GPL v3
13
 
32
  } // Exit if accessed directly
33
 
34
  // Define DLM Version
35
+ define( 'DLM_VERSION', '1.8.1' );
36
 
37
  function __download_monitor_main() {
38
 
includes/class-dlm-download-handler.php CHANGED
@@ -510,8 +510,9 @@ class DLM_Download_Handler {
510
  */
511
  @ob_end_clean(); // Clear the output buffer
512
 
513
- if ( ob_get_level() ) {
514
- @ob_end_clean(); // Zip corruption fix
 
515
  }
516
 
517
  $headers = array();
510
  */
511
  @ob_end_clean(); // Clear the output buffer
512
 
513
+ // Zip corruption fix
514
+ while ( ob_get_level() > 0 ) {
515
+ @ob_end_clean();
516
  }
517
 
518
  $headers = array();
includes/class-dlm-file-manager.php CHANGED
@@ -70,7 +70,7 @@ class DLM_File_Manager {
70
  $file_path = trim( str_replace( $wp_uploads_url, $wp_uploads_dir, $file_path ) );
71
  $file_path = realpath( $file_path );
72
 
73
- } elseif ( is_multisite() && ( strpos( $file_path, network_site_url( '/', 'http' ) ) !== false || strpos( $file_path, network_site_url( '/', 'https' ) ) !== false ) ) {
74
 
75
  /** This is a local file outside of wp-content so figure out the path */
76
  $remote_file = false;
70
  $file_path = trim( str_replace( $wp_uploads_url, $wp_uploads_dir, $file_path ) );
71
  $file_path = realpath( $file_path );
72
 
73
+ } elseif ( ( is_multisite() && ( strpos( $file_path, network_site_url( '/', 'http' ) ) !== false ) || ( strpos( $file_path, network_site_url( '/', 'https' ) ) !== false ) ) ) {
74
 
75
  /** This is a local file outside of wp-content so figure out the path */
76
  $remote_file = false;
includes/class-dlm-shortcodes.php CHANGED
@@ -135,7 +135,7 @@ class DLM_Shortcodes {
135
  // Template handler
136
  $template_handler = new DLM_Template_Handler();
137
 
138
- $template_handler->get_template_part( 'content-download', $template );
139
  }
140
 
141
  } else {
@@ -332,7 +332,7 @@ class DLM_Shortcodes {
332
  // check if explode had results
333
  if ( ! empty( $categories ) ) {
334
 
335
- foreach($categories as $category) {
336
  $args['tax_query'][] = array(
337
  'taxonomy' => 'dlm_download_category',
338
  'field' => 'slug',
@@ -343,7 +343,7 @@ class DLM_Shortcodes {
343
 
344
  }
345
 
346
- }else {
347
 
348
  // categories with OR
349
 
@@ -408,7 +408,7 @@ class DLM_Shortcodes {
408
 
409
  <?php echo html_entity_decode( $before ); ?>
410
 
411
- <?php $template_handler->get_template_part( 'content-download', $template ); ?>
412
 
413
  <?php echo html_entity_decode( $after ); ?>
414
 
135
  // Template handler
136
  $template_handler = new DLM_Template_Handler();
137
 
138
+ $template_handler->get_template_part( 'content-download', $template, '', array( 'dlm_download' => new DLM_Download( get_the_ID() ) ) );
139
  }
140
 
141
  } else {
332
  // check if explode had results
333
  if ( ! empty( $categories ) ) {
334
 
335
+ foreach ( $categories as $category ) {
336
  $args['tax_query'][] = array(
337
  'taxonomy' => 'dlm_download_category',
338
  'field' => 'slug',
343
 
344
  }
345
 
346
+ } else {
347
 
348
  // categories with OR
349
 
408
 
409
  <?php echo html_entity_decode( $before ); ?>
410
 
411
+ <?php $template_handler->get_template_part( 'content-download', $template, '', array( 'dlm_download' => new DLM_Download( get_the_ID() ) ) ); ?>
412
 
413
  <?php echo html_entity_decode( $after ); ?>
414
 
includes/class-dlm-template-handler.php CHANGED
@@ -29,16 +29,16 @@ class DLM_Template_Handler {
29
  $template = locate_template( array( "{$slug}-{$name}.php", "download-monitor/{$slug}-{$name}.php" ) );
30
  }
31
 
32
- // Get default slug-name.php
33
- if ( ! $template && $name && file_exists( $plugin_path . "/templates/{$slug}-{$name}.php" ) ) {
34
- $template = $plugin_path . "/templates/{$slug}-{$name}.php";
35
- }
36
-
37
  // If a custom path was defined, check that next
38
  if ( ! $template && $custom_dir && file_exists( trailingslashit( $custom_dir ) . "{$slug}-{$name}.php" ) ) {
39
  $template = trailingslashit( $custom_dir ) . "{$slug}-{$name}.php";
40
  }
41
 
 
 
 
 
 
42
  // If template file doesn't exist, look in yourtheme/slug.php and yourtheme/download-monitor/slug.php
43
  if ( ! $template ) {
44
  $template = locate_template( array( "{$slug}.php", "download-monitor/{$slug}.php" ) );
29
  $template = locate_template( array( "{$slug}-{$name}.php", "download-monitor/{$slug}-{$name}.php" ) );
30
  }
31
 
 
 
 
 
 
32
  // If a custom path was defined, check that next
33
  if ( ! $template && $custom_dir && file_exists( trailingslashit( $custom_dir ) . "{$slug}-{$name}.php" ) ) {
34
  $template = trailingslashit( $custom_dir ) . "{$slug}-{$name}.php";
35
  }
36
 
37
+ // Get default slug-name.php
38
+ if ( ! $template && $name && file_exists( $plugin_path . "/templates/{$slug}-{$name}.php" ) ) {
39
+ $template = $plugin_path . "/templates/{$slug}-{$name}.php";
40
+ }
41
+
42
  // If template file doesn't exist, look in yourtheme/slug.php and yourtheme/download-monitor/slug.php
43
  if ( ! $template ) {
44
  $template = locate_template( array( "{$slug}.php", "download-monitor/{$slug}.php" ) );
includes/class-dlm-upgrade-manager.php CHANGED
@@ -15,7 +15,7 @@ class DLM_Upgrade_Manager {
15
  $current_version = get_option( DLM_Constants::OPTION_CURRENT_VERSION, 0 );
16
 
17
  // Check if update is required
18
- if ( 1 || version_compare( DLM_VERSION, $current_version, '>' ) ) {
19
 
20
  // Do update
21
  $this->do_upgrade( $current_version );
15
  $current_version = get_option( DLM_Constants::OPTION_CURRENT_VERSION, 0 );
16
 
17
  // Check if update is required
18
+ if ( version_compare( DLM_VERSION, $current_version, '>' ) ) {
19
 
20
  // Do update
21
  $this->do_upgrade( $current_version );
includes/class-wp-dlm.php CHANGED
@@ -184,6 +184,11 @@ class WP_DLM {
184
  // Get current supported
185
  $current_support = get_theme_support( 'post-thumbnails' );
186
 
 
 
 
 
 
187
  // This can be a bool or array. If array we merge our post type in, if bool ignore because it's like a global theme setting.
188
  if ( is_array( $current_support ) ) {
189
  add_theme_support( 'post-thumbnails', array_merge( $current_support, array( 'dlm_download' ) ) );
184
  // Get current supported
185
  $current_support = get_theme_support( 'post-thumbnails' );
186
 
187
+ // fix current support for some themes
188
+ if ( is_array( $current_support[0] ) ) {
189
+ $current_support = $current_support[0];
190
+ }
191
+
192
  // This can be a bool or array. If array we merge our post type in, if bool ignore because it's like a global theme setting.
193
  if ( is_array( $current_support ) ) {
194
  add_theme_support( 'post-thumbnails', array_merge( $current_support, array( 'dlm_download' ) ) );
includes/widgets/class-dlm-widget-downloads.php CHANGED
@@ -110,7 +110,7 @@ class DLM_Widget_Downloads extends WP_Widget {
110
 
111
  echo apply_filters( 'dlm_widget_downloads_list_item_start', '<li>' );
112
 
113
- $template_handler->get_template_part( 'content-download', $format );
114
 
115
  echo apply_filters( 'dlm_widget_downloads_list_item_end', '</li>' );
116
  }
110
 
111
  echo apply_filters( 'dlm_widget_downloads_list_item_start', '<li>' );
112
 
113
+ $template_handler->get_template_part( 'content-download', $format, '', array( 'dlm_download' => new DLM_Download( get_the_ID() ) ) );
114
 
115
  echo apply_filters( 'dlm_widget_downloads_list_item_end', '</li>' );
116
  }
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: never5, barrykooij, mikejolley
3
  Donate link: http://www.barrykooij.com/donate/
4
  Tags: download, downloads, monitor, hits, download monitor, tracking, admin, count, counter, files, versions, download count, logging, AJAX, digital, documents, download category, download manager, download template, downloadmanager, file manager, file tree, grid, hits, ip-address, manager, media, monitor, password, protect downloads, tracker
5
  Requires at least: 3.8
6
- Tested up to: 4.2.2
7
- Stable tag: 1.8.0
8
  License: GPLv3
9
 
10
  Download Monitor is a plugin for uploading and managing downloads, tracking downloads, and displaying links.
@@ -96,7 +96,7 @@ Admin hits are not counted, log out and try!
96
 
97
  Version 1.0.0 is a fresh start/complete rewrite of the legacy 3.0 version using modern best-practices such as custom post types and endpoints. Because of this, data from the legacy plugin won't work without migration using [the legacy importer](https://www.download-monitor.com/extensions/dlm-legacy-importer/). Since this upgrade process isn't straightforward nor automated I've reverted the version to 1.0.0 to prevent automatic updates.
98
 
99
- Legacy versions can still be [found here](http://wordpress.org/plugins/download-monitor/developers/).
100
 
101
  == Screenshots ==
102
 
@@ -107,6 +107,12 @@ Legacy versions can still be [found here](http://wordpress.org/plugins/download-
107
 
108
  == Changelog ==
109
 
 
 
 
 
 
 
110
  = 1.8.0: July 10, 2015 =
111
  * Feature: Added option to only count downloads and add logs from unique ip addresses, props [Matt Mower](https://github.com/mdmower).
112
  * Feature: It's now possible to display downloads with the downloads shortcode that are in all given categories (AND instead of OR) by using + (plus_ instead of , (comma).
3
  Donate link: http://www.barrykooij.com/donate/
4
  Tags: download, downloads, monitor, hits, download monitor, tracking, admin, count, counter, files, versions, download count, logging, AJAX, digital, documents, download category, download manager, download template, downloadmanager, file manager, file tree, grid, hits, ip-address, manager, media, monitor, password, protect downloads, tracker
5
  Requires at least: 3.8
6
+ Tested up to: 4.3
7
+ Stable tag: 1.8.1
8
  License: GPLv3
9
 
10
  Download Monitor is a plugin for uploading and managing downloads, tracking downloads, and displaying links.
96
 
97
  Version 1.0.0 is a fresh start/complete rewrite of the legacy 3.0 version using modern best-practices such as custom post types and endpoints. Because of this, data from the legacy plugin won't work without migration using [the legacy importer](https://www.download-monitor.com/extensions/dlm-legacy-importer/). Since this upgrade process isn't straightforward nor automated I've reverted the version to 1.0.0 to prevent automatic updates.
98
 
99
+ More documentation can be found in our [Knowledge Base](https://www.download-monitor.com/kb/).
100
 
101
  == Screenshots ==
102
 
107
 
108
  == Changelog ==
109
 
110
+ = 1.8.1: August 21, 2015 =
111
+ * Tweak: Small tweak to make download count fit better in box template.
112
+ * Tweak: Fixed a zero file size bug.
113
+ * Tweak: Fixed featured image disappears bug, props [Ricardo](https://wordpress.org/support/profile/ricardopires).
114
+ * Tweak: Search template file in custom path before in plugin path.
115
+
116
  = 1.8.0: July 10, 2015 =
117
  * Feature: Added option to only count downloads and add logs from unique ip addresses, props [Matt Mower](https://github.com/mdmower).
118
  * Feature: It's now possible to display downloads with the downloads shortcode that are in all given categories (AND instead of OR) by using + (plus_ instead of , (comma).
templates/content-download-box.php CHANGED
@@ -3,7 +3,9 @@
3
  * Detailed download output
4
  */
5
 
6
- global $dlm_download;
 
 
7
  ?>
8
  <aside class="download-box">
9
 
3
  * Detailed download output
4
  */
5
 
6
+ if ( ! defined( 'ABSPATH' ) ) {
7
+ exit;
8
+ } // Exit if accessed directly
9
  ?>
10
  <aside class="download-box">
11
 
templates/content-download-button.php CHANGED
@@ -3,7 +3,9 @@
3
  * Download button
4
  */
5
 
6
- global $dlm_download;
 
 
7
  ?>
8
  <p><a class="aligncenter download-button" href="<?php $dlm_download->the_download_link(); ?>" rel="nofollow">
9
  <?php printf( __( 'Download &ldquo;%s&rdquo;', 'download-monitor' ), $dlm_download->get_the_title() ); ?>
3
  * Download button
4
  */
5
 
6
+ if ( ! defined( 'ABSPATH' ) ) {
7
+ exit;
8
+ } // Exit if accessed directly
9
  ?>
10
  <p><a class="aligncenter download-button" href="<?php $dlm_download->the_download_link(); ?>" rel="nofollow">
11
  <?php printf( __( 'Download &ldquo;%s&rdquo;', 'download-monitor' ), $dlm_download->get_the_title() ); ?>
templates/content-download-filename.php CHANGED
@@ -3,7 +3,9 @@
3
  * Default output for a download via the [download] shortcode
4
  */
5
 
6
- global $dlm_download;
 
 
7
  ?>
8
  <a class="download-link filetype-icon <?php echo 'filetype-' . $dlm_download->get_the_filetype(); ?>"
9
  title="<?php if ( $dlm_download->has_version_number() ) {
3
  * Default output for a download via the [download] shortcode
4
  */
5
 
6
+ if ( ! defined( 'ABSPATH' ) ) {
7
+ exit;
8
+ } // Exit if accessed directly
9
  ?>
10
  <a class="download-link filetype-icon <?php echo 'filetype-' . $dlm_download->get_the_filetype(); ?>"
11
  title="<?php if ( $dlm_download->has_version_number() ) {
templates/content-download-title.php CHANGED
@@ -3,7 +3,9 @@
3
  * Shows title only.
4
  */
5
 
6
- global $dlm_download;
 
 
7
  ?>
8
  <a class="download-link" title="<?php if ( $dlm_download->has_version_number() ) {
9
  printf( __( 'Version %s', 'download-monitor' ), $dlm_download->get_the_version_number() );
3
  * Shows title only.
4
  */
5
 
6
+ if ( ! defined( 'ABSPATH' ) ) {
7
+ exit;
8
+ } // Exit if accessed directly
9
  ?>
10
  <a class="download-link" title="<?php if ( $dlm_download->has_version_number() ) {
11
  printf( __( 'Version %s', 'download-monitor' ), $dlm_download->get_the_version_number() );
templates/content-download-version-list.php CHANGED
@@ -3,7 +3,9 @@
3
  * List of versions
4
  */
5
 
6
- global $dlm_download;
 
 
7
 
8
  $versions = $dlm_download->get_file_versions();
9
 
3
  * List of versions
4
  */
5
 
6
+ if ( ! defined( 'ABSPATH' ) ) {
7
+ exit;
8
+ } // Exit if accessed directly
9
 
10
  $versions = $dlm_download->get_file_versions();
11
 
templates/content-download.php CHANGED
@@ -3,7 +3,9 @@
3
  * Default output for a download via the [download] shortcode
4
  */
5
 
6
- global $dlm_download;
 
 
7
  ?>
8
  <a class="download-link" title="<?php if ( $dlm_download->has_version_number() ) {
9
  printf( __( 'Version %s', 'download-monitor' ), $dlm_download->get_the_version_number() );
3
  * Default output for a download via the [download] shortcode
4
  */
5
 
6
+ if ( ! defined( 'ABSPATH' ) ) {
7
+ exit;
8
+ } // Exit if accessed directly
9
  ?>
10
  <a class="download-link" title="<?php if ( $dlm_download->has_version_number() ) {
11
  printf( __( 'Version %s', 'download-monitor' ), $dlm_download->get_the_version_number() );