Easy Media Download - Version 1.0.6

Version Description

  • Added a feature where the digital media file will download instead of opening in the browser window
Download this release

Release Info

Developer naa986
Plugin Icon 128x128 Easy Media Download
Version 1.0.6
Comparing to
See all releases

Code changes from version 1.0.5 to 1.0.6

Files changed (2) hide show
  1. main.php +7 -3
  2. readme.txt +11 -1
main.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  Plugin Name: Easy Media Download
4
- Version: 1.0.5
5
  Plugin URI: http://noorsplugin.com/easy-media-download-plugin-for-wordpress/
6
  Author: naa986
7
  Author URI: http://noorsplugin.com/
@@ -13,7 +13,7 @@ if(!class_exists('EASY_MEDIA_DOWNLOAD'))
13
  {
14
  class EASY_MEDIA_DOWNLOAD
15
  {
16
- var $plugin_version = '1.0.5';
17
  var $plugin_url;
18
  var $plugin_path;
19
  function __construct()
@@ -78,6 +78,7 @@ function easy_media_download_handler($atts)
78
  'height' => '41',
79
  'color' => 'red_darker',
80
  'target' => '_self',
 
81
  ), $atts));
82
  $class = "emd_dl_".$color;
83
  $inset = "f5978e";
@@ -219,8 +220,11 @@ EOT;
219
  $class = "";
220
  $text = '<img src="'.$text.'">';
221
  }
 
 
 
222
  $output = <<<EOT
223
- <a href="$url" target="$target"{$class}>$text</a>
224
  $styles
225
  EOT;
226
  return $output;
1
  <?php
2
  /*
3
  Plugin Name: Easy Media Download
4
+ Version: 1.0.6
5
  Plugin URI: http://noorsplugin.com/easy-media-download-plugin-for-wordpress/
6
  Author: naa986
7
  Author URI: http://noorsplugin.com/
13
  {
14
  class EASY_MEDIA_DOWNLOAD
15
  {
16
+ var $plugin_version = '1.0.6';
17
  var $plugin_url;
18
  var $plugin_path;
19
  function __construct()
78
  'height' => '41',
79
  'color' => 'red_darker',
80
  'target' => '_self',
81
+ 'force_dl' => '',
82
  ), $atts));
83
  $class = "emd_dl_".$color;
84
  $inset = "f5978e";
220
  $class = "";
221
  $text = '<img src="'.$text.'">';
222
  }
223
+ if($force_dl=="1"){
224
+ $force_dl = " download";
225
+ }
226
  $output = <<<EOT
227
+ <a href="$url" target="$target"{$class}{$force_dl}>$text</a>
228
  $styles
229
  EOT;
230
  return $output;
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://noorsplugin.com/
4
  Tags: download, downloads, media, digital downloads, e-commerce, e-downloads, e-store, ecommerce, eshop, wp ecommerce, donation
5
  Requires at least: 3.0
6
  Tested up to: 3.8
7
- Stable tag: 1.0.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -30,6 +30,7 @@ Easy Media Download allows you to embed download buttons on your WordPress site.
30
  * Free downloads for image file e.g. png, gif, jpg, jpeg, bmp
31
  * Free downloads for e-book e.g. pdf, epub
32
  * Track/Monitor your downloads
 
33
 
34
  For more information please check the [Easy Media Download](http://noorsplugin.com/easy-media-download-plugin-for-wordpress/) documentation page
35
 
@@ -67,6 +68,12 @@ By default the download starts in the same window. But you can choose to modify
67
 
68
  `[easy_media_download url="http://example.com/wp-content/uploads/myfile.zip" target="_blank"]` (opens the download in a new window)
69
 
 
 
 
 
 
 
70
  = Download Button Templates =
71
 
72
  Easy Media Download comes with 21 different download button templates. All you need to do is specify the style and the button will look just like it. For example:
@@ -169,6 +176,9 @@ none
169
 
170
  == Changelog ==
171
 
 
 
 
172
  = 1.0.5 =
173
  * Added translation options in the plugin
174
  * Added more download button templates
4
  Tags: download, downloads, media, digital downloads, e-commerce, e-downloads, e-store, ecommerce, eshop, wp ecommerce, donation
5
  Requires at least: 3.0
6
  Tested up to: 3.8
7
+ Stable tag: 1.0.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
30
  * Free downloads for image file e.g. png, gif, jpg, jpeg, bmp
31
  * Free downloads for e-book e.g. pdf, epub
32
  * Track/Monitor your downloads
33
+ * Ability to force a digital file download
34
 
35
  For more information please check the [Easy Media Download](http://noorsplugin.com/easy-media-download-plugin-for-wordpress/) documentation page
36
 
68
 
69
  `[easy_media_download url="http://example.com/wp-content/uploads/myfile.zip" target="_blank"]` (opens the download in a new window)
70
 
71
+ = Force File Download =
72
+
73
+ Usually when a digital file is recognised by the browser it does not prompt for download. The file just opens in the browser instead. You can choose to modify this behaviour using the `force_dl` parameter in the shortcode.
74
+
75
+ `[easy_media_download url="http://example.com/wp-content/uploads/myfile.mp3" force_dl="1"]`
76
+
77
  = Download Button Templates =
78
 
79
  Easy Media Download comes with 21 different download button templates. All you need to do is specify the style and the button will look just like it. For example:
176
 
177
  == Changelog ==
178
 
179
+ = 1.0.6 =
180
+ * Added a feature where the digital media file will download instead of opening in the browser window
181
+
182
  = 1.0.5 =
183
  * Added translation options in the plugin
184
  * Added more download button templates