Version Description
- Fixed an undefined method call 'get_filesize'.
- Allow third party extensions to hijack [downloads] shortcode with filter dlm_shortcode_download_content.
- Made 'wp_dlm_downloading' cookie only accessible through the HTTP protocol, props Matt Mower.
Download this release
Release Info
Developer | barrykooij |
Plugin | Download Monitor |
Version | 1.6.3 |
Comparing to | |
See all releases |
Code changes from version 1.6.2 to 1.6.3
- download-monitor.php +2 -2
- includes/class-dlm-download-handler.php +1 -1
- includes/class-dlm-download-version.php +1 -1
- includes/class-dlm-shortcodes.php +10 -0
- readme.txt +25 -26
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 downloadable files, monitoring downloads and outputting download links and file information on your WordPress powered site.
|
6 |
-
Version: 1.6.
|
7 |
Author: Barry Kooij & Mike Jolley
|
8 |
Author URI: http://www.download-monitor.com
|
9 |
Requires at least: 3.8
|
@@ -33,7 +33,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
33 |
function __download_monitor_main() {
|
34 |
|
35 |
// Define DLM Version
|
36 |
-
define( 'DLM_VERSION', '1.6.
|
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 downloadable files, monitoring downloads and outputting download links and file information on your WordPress powered site.
|
6 |
+
Version: 1.6.3
|
7 |
Author: Barry Kooij & Mike Jolley
|
8 |
Author URI: http://www.download-monitor.com
|
9 |
Requires at least: 3.8
|
33 |
function __download_monitor_main() {
|
34 |
|
35 |
// Define DLM Version
|
36 |
+
define( 'DLM_VERSION', '1.6.3' );
|
37 |
|
38 |
// Define DLM FILE
|
39 |
define( 'DLM_PLUGIN_FILE', __FILE__ );
|
includes/class-dlm-download-handler.php
CHANGED
@@ -231,7 +231,7 @@ class DLM_Download_Handler {
|
|
231 |
do_action( 'dlm_downloading', $download, $version, $file_path );
|
232 |
|
233 |
// Set cookie to prevent double logging
|
234 |
-
setcookie( 'wp_dlm_downloading', $download->id, time() + 60, COOKIEPATH, COOKIE_DOMAIN, false );
|
235 |
}
|
236 |
|
237 |
// Redirect to the file...
|
231 |
do_action( 'dlm_downloading', $download, $version, $file_path );
|
232 |
|
233 |
// Set cookie to prevent double logging
|
234 |
+
setcookie( 'wp_dlm_downloading', $download->id, time() + 60, COOKIEPATH, COOKIE_DOMAIN, false, true );
|
235 |
}
|
236 |
|
237 |
// Redirect to the file...
|
includes/class-dlm-download-version.php
CHANGED
@@ -76,7 +76,7 @@ class DLM_Download_Version {
|
|
76 |
$file_manager = new DLM_File_Manager();
|
77 |
|
78 |
// Get the file size
|
79 |
-
$filesize = $file_manager->
|
80 |
|
81 |
update_post_meta( $this->id, '_filesize', $filesize );
|
82 |
|
76 |
$file_manager = new DLM_File_Manager();
|
77 |
|
78 |
// Get the file size
|
79 |
+
$filesize = $file_manager->get_file_size( $file_path );
|
80 |
|
81 |
update_post_meta( $this->id, '_filesize', $filesize );
|
82 |
|
includes/class-dlm-shortcodes.php
CHANGED
@@ -70,12 +70,22 @@ class DLM_Shortcodes {
|
|
70 |
'version' => ''
|
71 |
), $atts ) );
|
72 |
|
|
|
73 |
$id = apply_filters( 'dlm_shortcode_download_id', $id );
|
74 |
|
|
|
75 |
if ( empty( $id ) ) {
|
76 |
return;
|
77 |
}
|
78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
// If we have content, wrap in a link only
|
80 |
if ( $content ) {
|
81 |
|
70 |
'version' => ''
|
71 |
), $atts ) );
|
72 |
|
73 |
+
// Make id filterable
|
74 |
$id = apply_filters( 'dlm_shortcode_download_id', $id );
|
75 |
|
76 |
+
// Check id
|
77 |
if ( empty( $id ) ) {
|
78 |
return;
|
79 |
}
|
80 |
|
81 |
+
// Allow third party extensions to hijack shortcode
|
82 |
+
$hijacked_content = apply_filters( 'dlm_shortcode_download_content', '', $id );
|
83 |
+
|
84 |
+
// If there's hijacked content, return it and be done with it
|
85 |
+
if( '' !== $hijacked_content ) {
|
86 |
+
return $hijacked_content;
|
87 |
+
}
|
88 |
+
|
89 |
// If we have content, wrap in a link only
|
90 |
if ( $content ) {
|
91 |
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: barrykooij, mikejolley
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=barry@cageworks.nl&item_name=Donation+for+Download+Monitor
|
4 |
Tags: download, downloads, monitor, hits, download monitor, tracking, admin, count, counter, files, versions, download count, logging
|
5 |
Requires at least: 3.8
|
6 |
-
Tested up to: 4.1
|
7 |
-
Stable tag: 1.6.
|
8 |
License: GPLv3
|
9 |
|
10 |
Download Monitor is a plugin for uploading and managing downloads, tracking downloads, and displaying links.
|
@@ -23,18 +23,21 @@ Download Monitor provides an interface for uploading and managing downloadable f
|
|
23 |
* Display download links on the frontend using shortcodes.
|
24 |
* Change the way download links get displayed via template files.
|
25 |
* Track downloads counts and log user download attempts.
|
26 |
-
* Member only downloads.
|
27 |
* Customisable endpoints for showing pretty download links.
|
28 |
|
29 |
[Read more about Download Monitor](https://www.download-monitor.com).
|
30 |
|
31 |
-
|
32 |
-
|
33 |
-
|
|
|
|
|
|
|
34 |
|
35 |
-
=
|
36 |
|
37 |
-
|
38 |
|
39 |
= Contributing and reporting bugs =
|
40 |
|
@@ -46,7 +49,7 @@ You can contribute localizations via Transifex [https://www.transifex.com/projec
|
|
46 |
|
47 |
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.
|
48 |
|
49 |
-
|
50 |
|
51 |
== Installation ==
|
52 |
|
@@ -66,18 +69,6 @@ The manual installation method involves downloading the plugin and uploading it
|
|
66 |
|
67 |
== Frequently Asked Questions ==
|
68 |
|
69 |
-
= I used this before, so why is this version 1? =
|
70 |
-
|
71 |
-
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.
|
72 |
-
|
73 |
-
Legacy versions can still be [found here](http://wordpress.org/plugins/download-monitor/developers/).
|
74 |
-
|
75 |
-
= X feature/shortcode is missing from the legacy version; why? =
|
76 |
-
|
77 |
-
The rewrite has trimmed the fat and only kept the best, most useful features. If something is missing, you can always code it yourself - the new system is very flexible and its easy to query files using [get_posts](http://codex.wordpress.org/Template_Tags/get_posts).
|
78 |
-
|
79 |
-
If you are missing the "Page Addon", this is now a separate plugin found here: [Download Monitor Page Addon](https://www.download-monitor.com/extensions/page-addon/).
|
80 |
-
|
81 |
= Can I upload .xxx filetype using the uploader? =
|
82 |
|
83 |
Download Monitor uses the WordPress uploader for uploading files. By default these formats are supported:
|
@@ -101,6 +92,12 @@ Download links are powered by endpoints. If you find them 404'ing, go to Setting
|
|
101 |
|
102 |
Admin hits are not counted, log out and try!
|
103 |
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
== Screenshots ==
|
105 |
|
106 |
1. The main admin screen lists your downloads using familiar WordPress UI.
|
@@ -110,12 +107,17 @@ Admin hits are not counted, log out and try!
|
|
110 |
|
111 |
== Changelog ==
|
112 |
|
|
|
|
|
|
|
|
|
|
|
113 |
= 1.6.2 =
|
114 |
* Fixed a bug that caused translations not to load.
|
115 |
* Fixed a bug that prevented download versions from being removed.
|
116 |
* Fixed a pagination in 'insert download' shortcode bug.
|
117 |
* Fixed a bug in the template loader when used with a custom directory, a slug and no custom template.
|
118 |
-
* Removed assigning by reference, fixed strict notice
|
119 |
* Tweaked template loader to accept arguments.
|
120 |
* Allow downloads shortcode WP_Query arguments to be filtered with 'dlm_shortcode_downloads_args'.
|
121 |
|
@@ -274,7 +276,4 @@ Admin hits are not counted, log out and try!
|
|
274 |
= 1.0.0 =
|
275 |
* Complete rewrite of the plugin making use of custom post types and other best practices. Fresh start version '1' to prevent auto-updates (legacy importer needs to be used to migrate from old versions).
|
276 |
|
277 |
-
== Upgrade Notice ==
|
278 |
-
|
279 |
-
= 1.6.0 =
|
280 |
-
If you're using the Page Addon or Amazon S3 extension you must update these extensions too. Visit https://www.download-monitor.com/ for more information.
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=barry@cageworks.nl&item_name=Donation+for+Download+Monitor
|
4 |
Tags: download, downloads, monitor, hits, download monitor, tracking, admin, count, counter, files, versions, download count, logging
|
5 |
Requires at least: 3.8
|
6 |
+
Tested up to: 4.1.1
|
7 |
+
Stable tag: 1.6.3
|
8 |
License: GPLv3
|
9 |
|
10 |
Download Monitor is a plugin for uploading and managing downloads, tracking downloads, and displaying links.
|
23 |
* Display download links on the frontend using shortcodes.
|
24 |
* Change the way download links get displayed via template files.
|
25 |
* Track downloads counts and log user download attempts.
|
26 |
+
* Member only downloads, requires users to be logged in to download your files.
|
27 |
* Customisable endpoints for showing pretty download links.
|
28 |
|
29 |
[Read more about Download Monitor](https://www.download-monitor.com).
|
30 |
|
31 |
+
> #### Download Monitor Extensions
|
32 |
+
> Extend the core Download Monitor plugin with it's powerful extensions. All extensions come with one year of updates and support.<br />
|
33 |
+
>
|
34 |
+
> Some of our popular extensions include: [Page Addon](https://www.download-monitor.com/extensions/page-addon/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-block-page-addon), [Email Lock](https://www.download-monitor.com/extensions/email-lock/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-block-email-lock), [CSV Importer](https://www.download-monitor.com/extensions/csv-importer/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-block-csv-importer) and [Gravity Forms Lock](https://www.download-monitor.com/extensions/gravity-forms/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-block-gravity-forms-lock).
|
35 |
+
>
|
36 |
+
> Want to see more? [Browse All Extensions](https://www.download-monitor.com/extensions/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-block-browse-all)
|
37 |
|
38 |
+
= Documentation =
|
39 |
|
40 |
+
Documentation can be found on the [Download Monitor website](https://www.download-monitor.com/documentation/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-documentation).
|
41 |
|
42 |
= Contributing and reporting bugs =
|
43 |
|
49 |
|
50 |
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.
|
51 |
|
52 |
+
Unfortunately we can't offer you help with a customisation. Please consider hiring a developer for your website's customizations.
|
53 |
|
54 |
== Installation ==
|
55 |
|
69 |
|
70 |
== Frequently Asked Questions ==
|
71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
= Can I upload .xxx filetype using the uploader? =
|
73 |
|
74 |
Download Monitor uses the WordPress uploader for uploading files. By default these formats are supported:
|
92 |
|
93 |
Admin hits are not counted, log out and try!
|
94 |
|
95 |
+
= I used this before, so why is this version 1? =
|
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 |
|
103 |
1. The main admin screen lists your downloads using familiar WordPress UI.
|
107 |
|
108 |
== Changelog ==
|
109 |
|
110 |
+
= 1.6.3 =
|
111 |
+
* Fixed an undefined method call 'get_filesize'.
|
112 |
+
* Allow third party extensions to hijack [downloads] shortcode with filter dlm_shortcode_download_content.
|
113 |
+
* Made 'wp_dlm_downloading' cookie only accessible through the HTTP protocol, props [Matt Mower](https://github.com/mdmower).
|
114 |
+
|
115 |
= 1.6.2 =
|
116 |
* Fixed a bug that caused translations not to load.
|
117 |
* Fixed a bug that prevented download versions from being removed.
|
118 |
* Fixed a pagination in 'insert download' shortcode bug.
|
119 |
* Fixed a bug in the template loader when used with a custom directory, a slug and no custom template.
|
120 |
+
* Removed assigning by reference, fixed strict notice when deleting downloads.
|
121 |
* Tweaked template loader to accept arguments.
|
122 |
* Allow downloads shortcode WP_Query arguments to be filtered with 'dlm_shortcode_downloads_args'.
|
123 |
|
276 |
= 1.0.0 =
|
277 |
* Complete rewrite of the plugin making use of custom post types and other best practices. Fresh start version '1' to prevent auto-updates (legacy importer needs to be used to migrate from old versions).
|
278 |
|
279 |
+
== Upgrade Notice ==
|
|
|
|
|
|