Easy Media Download - Version 1.0.4

Version Description

  • Added donation options for free downloads
Download this release

Release Info

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

Code changes from version 1.0.3 to 1.0.4

Files changed (3) hide show
  1. images/donate.gif +0 -0
  2. main.php +40 -2
  3. readme.txt +35 -3
images/donate.gif ADDED
Binary file
main.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  Plugin Name: Easy Media Download
4
- Version: 1.0.3
5
  Plugin URI: http://noorsplugin.com/easy-media-download-plugin-for-wordpress/
6
  Author: naa986
7
  Author URI: http://noorsplugin.com/
@@ -13,10 +13,15 @@ if(!class_exists('EASY_MEDIA_DOWNLOAD'))
13
  {
14
  class EASY_MEDIA_DOWNLOAD
15
  {
16
- var $plugin_version = '1.0.3';
 
 
17
  function __construct()
18
  {
19
  define('EASY_MEDIA_DOWNLOAD_VERSION', $this->plugin_version);
 
 
 
20
  $this->plugin_includes();
21
  }
22
  function plugin_includes()
@@ -27,12 +32,17 @@ if(!class_exists('EASY_MEDIA_DOWNLOAD'))
27
  }
28
  //add_action('admin_menu', array( &$this, 'add_options_menu' ));
29
  add_shortcode('easy_media_download','easy_media_download_handler');
 
30
  }
31
  function plugin_url()
32
  {
33
  if($this->plugin_url) return $this->plugin_url;
34
  return $this->plugin_url = plugins_url( basename( plugin_dir_path(__FILE__) ), basename( __FILE__ ) );
35
  }
 
 
 
 
36
  function add_plugin_action_links($links, $file)
37
  {
38
  if ( $file == plugin_basename( dirname( __FILE__ ) . '/main.php' ) )
@@ -116,3 +126,31 @@ EOT;
116
  EOT;
117
  return $output;
118
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
  /*
3
  Plugin Name: Easy Media Download
4
+ Version: 1.0.4
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.4';
17
+ var $plugin_url;
18
+ var $plugin_path;
19
  function __construct()
20
  {
21
  define('EASY_MEDIA_DOWNLOAD_VERSION', $this->plugin_version);
22
+ define('EASY_MEDIA_DOWNLOAD_SITE_URL',site_url());
23
+ define('EASY_MEDIA_DOWNLOAD_URL', $this->plugin_url());
24
+ define('EASY_MEDIA_DOWNLOAD_PATH', $this->plugin_path());
25
  $this->plugin_includes();
26
  }
27
  function plugin_includes()
32
  }
33
  //add_action('admin_menu', array( &$this, 'add_options_menu' ));
34
  add_shortcode('easy_media_download','easy_media_download_handler');
35
+ add_shortcode('emd_donation','easy_media_download_donation_handler');
36
  }
37
  function plugin_url()
38
  {
39
  if($this->plugin_url) return $this->plugin_url;
40
  return $this->plugin_url = plugins_url( basename( plugin_dir_path(__FILE__) ), basename( __FILE__ ) );
41
  }
42
+ function plugin_path(){
43
+ if ( $this->plugin_path ) return $this->plugin_path;
44
+ return $this->plugin_path = untrailingslashit( plugin_dir_path( __FILE__ ) );
45
+ }
46
  function add_plugin_action_links($links, $file)
47
  {
48
  if ( $file == plugin_basename( dirname( __FILE__ ) . '/main.php' ) )
126
  EOT;
127
  return $output;
128
  }
129
+
130
+ function easy_media_download_donation_handler($atts)
131
+ {
132
+ extract(shortcode_atts(array(
133
+ 'email' => '',
134
+ 'currency' => 'USD',
135
+ 'image' => '',
136
+ 'locale' => 'US',
137
+ ), $atts));
138
+ if(empty($email)){
139
+ return "Please specify the PayPal email address which will receive the payments";
140
+ }
141
+ if(empty($image)){
142
+ $image = EASY_MEDIA_DOWNLOAD_URL."/images/donate.gif";
143
+ }
144
+ $output = <<<EOT
145
+ <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
146
+ <input type="hidden" name="cmd" value="_donations">
147
+ <input type="hidden" name="business" value="$email">
148
+ <input type="hidden" name="lc" value="$locale">
149
+ <input type="hidden" name="no_note" value="0">
150
+ <input type="hidden" name="currency_code" value="$currency">
151
+ <input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest">
152
+ <input type="image" src="$image" name="submit">
153
+ </form>
154
+ EOT;
155
+ return $output;
156
+ }
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Easy Media Download ===
2
  Contributors: naa986
3
  Donate link: http://noorsplugin.com/
4
- Tags: download, downloads, media, digital downloads, e-commerce, e-downloads, e-store, ecommerce, eshop, wp ecommerce
5
  Requires at least: 3.0
6
  Tested up to: 3.8
7
- Stable tag: 1.0.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -12,7 +12,7 @@ Easy Media Download allows you to embed download buttons on your WordPress site.
12
 
13
  == Description ==
14
 
15
- Easy Media Download allows your users to download digital media files from your website. You can create beautiful download button which instantly starts the download once clicked.
16
 
17
  = Features =
18
 
@@ -20,6 +20,7 @@ Easy Media Download allows your users to download digital media files from your
20
  * Insert download button on your landing page
21
  * Allow users to directly download in all file formats
22
  * Allow large file download (No limit on the file size)
 
23
  * Free downloads for music or audio files e.g. mp3, aac, m4a, wav
24
  * Free downloads for video files e.g. mp4, mov, qt (QuickTime), mpg, mpeg, flv, m4v, swf, flash, avi, wma, ogg, webm
25
  * Free downloads for document file e.g. doc, docx (OpenOffice, Microsoft Word), odt (OpenDocument), htm, html, ps, tex, xml, txt, csv
@@ -66,6 +67,30 @@ By default the download starts in the same window. But you can choose to modify
66
 
67
  `[easy_media_download url="http://example.com/wp-content/uploads/myfile.zip" target="_blank"]` (opens the download in a new window)
68
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  For detailed documentation please visit the [Easy Media Download](http://noorsplugin.com/easy-media-download-plugin-for-wordpress/) plugin page
70
 
71
  == Installation ==
@@ -85,6 +110,10 @@ Yes.
85
 
86
  Yes.
87
 
 
 
 
 
88
  == Screenshots ==
89
 
90
  For screenshots please visit the [Easy Media Download](http://noorsplugin.com/easy-media-download-plugin-for-wordpress/) plugin page
@@ -94,6 +123,9 @@ none
94
 
95
  == Changelog ==
96
 
 
 
 
97
  = 1.0.3 =
98
  * Easy media download is now compatible with WordPress 3.8
99
 
1
  === Easy Media Download ===
2
  Contributors: naa986
3
  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.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
12
 
13
  == Description ==
14
 
15
+ Easy Media Download allows your users to download digital media files from your website. It's lightweight and makes downloading easier. You can create beautiful download button which instantly starts the download once clicked.
16
 
17
  = Features =
18
 
20
  * Insert download button on your landing page
21
  * Allow users to directly download in all file formats
22
  * Allow large file download (No limit on the file size)
23
+ * Accept donations for your free digital downloads using PayPal
24
  * Free downloads for music or audio files e.g. mp3, aac, m4a, wav
25
  * Free downloads for video files e.g. mp4, mov, qt (QuickTime), mpg, mpeg, flv, m4v, swf, flash, avi, wma, ogg, webm
26
  * Free downloads for document file e.g. doc, docx (OpenOffice, Microsoft Word), odt (OpenDocument), htm, html, ps, tex, xml, txt, csv
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
+ *Embedding a Donation Button for Free Download*
71
+
72
+ You can accept donations from users visiting your site for your free downloads. Simply use the following shortcode with your PayPal email address in it.
73
+
74
+ `[emd_donation email="abc123@hotmail.com"]`
75
+
76
+ *Donation Currency*
77
+
78
+ The default currency is "USD". But you can also accept payments in your preferred currency using the "currency" parameter.
79
+
80
+ `[emd_donation email="abc123@hotmail.com" currency="CAD"]` (This will set the currency to Canadian Dollar)
81
+
82
+ *Payment Page Language*
83
+
84
+ The default locale for the payment page is "US". But you can set it to your preferred language using the "locale" parameter.
85
+
86
+ `[emd_donation email="abc123@hotmail.com" locale="BE"]` (This will set the locale to Belgium)
87
+
88
+ *Donation Button Image*
89
+
90
+ You can customize the donation button by specifying your preferred image in the shortcode.
91
+
92
+ `[emd_donation email="abc123@hotmail.com" image="http://example.com/wp-content/uploads/images/donate.jpg"]`
93
+
94
  For detailed documentation please visit the [Easy Media Download](http://noorsplugin.com/easy-media-download-plugin-for-wordpress/) plugin page
95
 
96
  == Installation ==
110
 
111
  Yes.
112
 
113
+ = Can I accept donations for my digital downloads? =
114
+
115
+ Yes.
116
+
117
  == Screenshots ==
118
 
119
  For screenshots please visit the [Easy Media Download](http://noorsplugin.com/easy-media-download-plugin-for-wordpress/) plugin page
123
 
124
  == Changelog ==
125
 
126
+ = 1.0.4 =
127
+ * Added donation options for free downloads
128
+
129
  = 1.0.3 =
130
  * Easy media download is now compatible with WordPress 3.8
131