Version Description
none
Download this release
Release Info
Developer | naa986 |
Plugin | Easy Media Download |
Version | 1.0.1 |
Comparing to | |
See all releases |
Version 1.0.1
- main.php +117 -0
- readme.txt +76 -0
main.php
ADDED
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: Easy Media Download
|
4 |
+
Version: 1.0.1
|
5 |
+
Plugin URI: http://noorsplugin.com/easy-media-download-plugin-for-wordpress/
|
6 |
+
Author: naa986
|
7 |
+
Author URI: http://noorsplugin.com/
|
8 |
+
Description: Easily embed download buttons for your digital media files
|
9 |
+
*/
|
10 |
+
|
11 |
+
if(!defined('ABSPATH')) exit;
|
12 |
+
if(!class_exists('EASY_MEDIA_DOWNLOAD'))
|
13 |
+
{
|
14 |
+
class EASY_MEDIA_DOWNLOAD
|
15 |
+
{
|
16 |
+
var $plugin_version = '1.0.1';
|
17 |
+
function __construct()
|
18 |
+
{
|
19 |
+
define('EASY_MEDIA_DOWNLOAD_VERSION', $this->plugin_version);
|
20 |
+
$this->plugin_includes();
|
21 |
+
}
|
22 |
+
function plugin_includes()
|
23 |
+
{
|
24 |
+
if(is_admin( ) )
|
25 |
+
{
|
26 |
+
//add_filter('plugin_action_links', array(&$this,'add_plugin_action_links'), 10, 2 );
|
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' ) )
|
39 |
+
{
|
40 |
+
$links[] = '<a href="options-general.php?page=easy-media-download-settings">Settings</a>';
|
41 |
+
}
|
42 |
+
return $links;
|
43 |
+
}
|
44 |
+
|
45 |
+
function add_options_menu()
|
46 |
+
{
|
47 |
+
if(is_admin())
|
48 |
+
{
|
49 |
+
add_options_page('Easy Media Download Settings', 'Easy Media Download', 'manage_options', 'easy-media-download-settings', array(&$this, 'display_options_page'));
|
50 |
+
}
|
51 |
+
}
|
52 |
+
}
|
53 |
+
$GLOBALS['easy_media_download'] = new EASY_MEDIA_DOWNLOAD();
|
54 |
+
}
|
55 |
+
|
56 |
+
function easy_media_download_handler($atts)
|
57 |
+
{
|
58 |
+
extract(shortcode_atts(array(
|
59 |
+
'url' => '',
|
60 |
+
'text' => 'Download Now',
|
61 |
+
'width' => '153',
|
62 |
+
'height' => '41',
|
63 |
+
), $atts));
|
64 |
+
$styles = <<<EOT
|
65 |
+
<style type="text/css">
|
66 |
+
.easy_media_dl_button {
|
67 |
+
-moz-box-shadow:inset 0px 1px 0px 0px #f5978e;
|
68 |
+
-webkit-box-shadow:inset 0px 1px 0px 0px #f5978e;
|
69 |
+
box-shadow:inset 0px 1px 0px 0px #f5978e;
|
70 |
+
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #f24537), color-stop(1, #c62d1f) );
|
71 |
+
background:-moz-linear-gradient( center top, #f24537 5%, #c62d1f 100% );
|
72 |
+
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f24537', endColorstr='#c62d1f');
|
73 |
+
background-color:#f24537;
|
74 |
+
-webkit-border-top-left-radius:0px;
|
75 |
+
-moz-border-radius-topleft:0px;
|
76 |
+
border-top-left-radius:0px;
|
77 |
+
-webkit-border-top-right-radius:0px;
|
78 |
+
-moz-border-radius-topright:0px;
|
79 |
+
border-top-right-radius:0px;
|
80 |
+
-webkit-border-bottom-right-radius:0px;
|
81 |
+
-moz-border-radius-bottomright:0px;
|
82 |
+
border-bottom-right-radius:0px;
|
83 |
+
-webkit-border-bottom-left-radius:0px;
|
84 |
+
-moz-border-radius-bottomleft:0px;
|
85 |
+
border-bottom-left-radius:0px;
|
86 |
+
text-indent:0;
|
87 |
+
border:1px solid #d02718;
|
88 |
+
display:inline-block;
|
89 |
+
color:#ffffff !important;
|
90 |
+
font-family:Georgia;
|
91 |
+
font-size:15px;
|
92 |
+
font-weight:bold;
|
93 |
+
font-style:normal;
|
94 |
+
height:{$height}px;
|
95 |
+
line-height:{$height}px;
|
96 |
+
width:{$width}px;
|
97 |
+
text-decoration:none;
|
98 |
+
text-align:center;
|
99 |
+
text-shadow:1px 1px 0px #810e05;
|
100 |
+
}
|
101 |
+
.easy_media_dl_button:hover {
|
102 |
+
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #c62d1f), color-stop(1, #f24537) );
|
103 |
+
background:-moz-linear-gradient( center top, #c62d1f 5%, #f24537 100% );
|
104 |
+
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#c62d1f', endColorstr='#f24537');
|
105 |
+
background-color:#c62d1f;
|
106 |
+
}.easy_media_dl_button:active {
|
107 |
+
position:relative;
|
108 |
+
top:1px;
|
109 |
+
}
|
110 |
+
</style>
|
111 |
+
EOT;
|
112 |
+
$output = <<<EOT
|
113 |
+
<a href="$url" class="easy_media_dl_button">$text</a>
|
114 |
+
$styles
|
115 |
+
EOT;
|
116 |
+
return $output;
|
117 |
+
}
|
readme.txt
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Easy Media Download ===
|
2 |
+
Contributors: naa986
|
3 |
+
Donate link: http://noorsplugin.com/
|
4 |
+
Tags: download, digital, downloads, ecommerce, media
|
5 |
+
Requires at least: 3.0
|
6 |
+
Tested up to: 3.7
|
7 |
+
Stable tag: 1.0.1
|
8 |
+
License: GPLv2 or later
|
9 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
+
|
11 |
+
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 |
+
= Easy Media Download Plugin Usage =
|
18 |
+
|
19 |
+
*Embedding Shortcodes for the Downloads*
|
20 |
+
|
21 |
+
Create a new post/page and use the following shortcode to create a download button for your digital media file:
|
22 |
+
|
23 |
+
`[easy_media_download url="http://example.com/wp-content/uploads/myfile.zip"]`
|
24 |
+
|
25 |
+
here, url is a shortcode parameter that you need to replace with the actual URL to your digital file
|
26 |
+
|
27 |
+
You can also specify additional optional parameters in the shortcode to customize the free download button.
|
28 |
+
|
29 |
+
*Button Text*
|
30 |
+
|
31 |
+
By default the text for the download button is "Download Now". But you can choose to modify the text using the "text" parameter.
|
32 |
+
|
33 |
+
`[easy_media_download url="http://example.com/wp-content/uploads/myfile.zip" text="Free Download"]`
|
34 |
+
|
35 |
+
*Button Width*
|
36 |
+
|
37 |
+
By default the width for the download button is "153". But you can choose to modify it using the "width" parameter.
|
38 |
+
|
39 |
+
`[easy_media_download url="http://example.com/wp-content/uploads/myfile.zip" text="Free Download" width="100"]`
|
40 |
+
|
41 |
+
*Button Height*
|
42 |
+
|
43 |
+
By default the height for the download button is "41". But you can choose to modify it using the "height" parameter.
|
44 |
+
|
45 |
+
`[easy_media_download url="http://example.com/wp-content/uploads/myfile.zip" text="Free Download" width="100" height="50"]`
|
46 |
+
|
47 |
+
For detailed documentation please visit the [Easy Media Download](http://noorsplugin.com/easy-media-download-plugin-for-wordpress/) plugin page
|
48 |
+
|
49 |
+
== Installation ==
|
50 |
+
|
51 |
+
1. Go to the Add New plugins screen in your WordPress Dashboard
|
52 |
+
1. Click the upload tab
|
53 |
+
1. Browse for the plugin file (easy-media-download.zip) on your computer
|
54 |
+
1. Click "Install Now" and then hit the activate button
|
55 |
+
|
56 |
+
== Frequently Asked Questions ==
|
57 |
+
|
58 |
+
= Can this plugin be used to offer free downloads to my users? =
|
59 |
+
|
60 |
+
Yes.
|
61 |
+
|
62 |
+
= Can this plugin be used to embed free download buttons on my site? =
|
63 |
+
|
64 |
+
Yes.
|
65 |
+
|
66 |
+
== Screenshots ==
|
67 |
+
|
68 |
+
For screenshots please visit the [Easy Media Download](http://noorsplugin.com/easy-media-download-plugin-for-wordpress/) plugin page
|
69 |
+
|
70 |
+
== Upgrade Notice ==
|
71 |
+
none
|
72 |
+
|
73 |
+
== Changelog ==
|
74 |
+
|
75 |
+
= 1.0.1 =
|
76 |
+
* First commit
|