Embed Any Document - Version 2.1

Version Description

Download this release

Release Info

Developer awsmin
Plugin Icon Embed Any Document
Version 2.1
Comparing to
See all releases

Code changes from version 1.0.1 to 2.1

aswm-embed.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Embed Any Document
4
  Plugin URI: http://awsm.in/embed-any-documents
5
  Description: Embed Any Document WordPress plugin lets you upload and embed your documents easily in your WordPress website without any additional browser plugins like Flash or Acrobat reader. The plugin lets you choose between Google Docs Viewer and Microsoft Office Online to display your documents.
6
- Version: 1.0.1
7
  Author: Awsm Innovations
8
  Author URI: http://awsm.in
9
  License: GPL V3
@@ -15,6 +15,7 @@ class Awsm_embed {
15
  private $plugin_url;
16
  private $plugin_base;
17
  private $plugin_file;
 
18
  private $settings_slug;
19
  private $text_domain = 'ead';
20
  /**
@@ -38,6 +39,7 @@ class Awsm_embed {
38
  $this->plugin_base = dirname( plugin_basename( __FILE__ ) );
39
  $this->plugin_file = __FILE__ ;
40
  $this->settings_slug = 'ead-settings';
 
41
 
42
  load_plugin_textdomain($this->text_domain, false,$this->plugin_base . '/language' );
43
 
@@ -54,13 +56,15 @@ class Awsm_embed {
54
  add_action( 'wp_ajax_validateurl',array( $this, 'validateurl' ));
55
  //ajax Contact Form
56
  add_action( 'wp_ajax_supportform',array( $this, 'supportform' ));
 
 
57
  $this->run_plugin();
58
  }
59
  /**
60
  * Register admin Settings style
61
  */
62
  function setting_styles(){
63
- wp_register_style( 'embed-settings', plugins_url( 'css/settings.css', $this->plugin_file ), false, '1.0', 'all' );
64
  wp_enqueue_style('embed-settings');
65
  }
66
  /**
@@ -107,9 +111,6 @@ class Awsm_embed {
107
  * Embed Form popup
108
  */
109
  function embedpopup(){
110
- if (!current_user_can('manage_options')) {
111
- wp_die(__('You do not have sufficient permissions to access this page.'));
112
- }
113
  include($this->plugin_path.'inc/popup.php');
114
  }
115
  /**
@@ -117,16 +118,18 @@ class Awsm_embed {
117
  */
118
  function embed_helper(){
119
  wp_register_style( 'magnific-popup', plugins_url( 'css/magnific-popup.css', $this->plugin_file ), false, '0.9.9', 'all' );
120
- wp_register_style( 'embed-css', plugins_url( 'css/embed.css', $this->plugin_file ), false, '1.0', 'all' );
121
  wp_register_script( 'magnific-popup', plugins_url( 'js/magnific-popup.js', $this->plugin_file ), array( 'jquery' ), '0.9.9', true );
122
- wp_register_script( 'embed', plugins_url( 'js/embed.js', $this->plugin_file ), array( 'jquery' ), '0.9.9', true );
123
  wp_localize_script('embed','emebeder', array(
124
- 'default_height' => get_option('ead_height', '500px' ),
125
- 'default_width' => get_option('ead_width', '100%' ),
126
- 'download' => get_option('ead_download', 'none' ),
127
- 'provider' => get_option('ead_provider', 'none' ),
128
  'ajaxurl' => admin_url( 'admin-ajax.php' ),
129
  'validtypes' => ead_validembedtypes(),
 
 
130
  'nocontent' => __('Nothing to insert', $this->text_domain),
131
  'addurl' => __('Add URL', $this->text_domain),
132
  'verify' => __('Verifying...', $this->text_domain),
@@ -139,11 +142,71 @@ class Awsm_embed {
139
  /**
140
  * Shortcode Functionality
141
  */
142
- function embed_shortcode( $atts){
143
- $embedcode = "";
144
- $embedcode = ead_getprovider($atts);
145
- return $embedcode;
146
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
147
 
148
  /**
149
  * Admin menu setup
@@ -164,16 +227,14 @@ class Awsm_embed {
164
  function register_eadsettings() {
165
  register_setting( 'ead-settings-group', 'ead_width' ,'ead_sanitize_dims');
166
  register_setting( 'ead-settings-group', 'ead_height','ead_sanitize_dims' );
167
- register_setting( 'ead-settings-group', 'ead_download' );
168
  register_setting( 'ead-settings-group', 'ead_provider' );
 
 
169
  }
170
  /**
171
  * Ajax validate file url
172
  */
173
  function validateurl(){
174
- if (!current_user_can('manage_options')) {
175
- wp_die(__('You do not have sufficient permissions to access this page.'));
176
- }
177
  $fileurl = $_POST['furl'];
178
  echo json_encode(ead_validateurl($fileurl));
179
  die(0);
@@ -198,20 +259,9 @@ class Awsm_embed {
198
  */
199
  function adminfunctions(){
200
  if(is_admin()){
201
- add_filter('media_send_to_editor', array($this,'ead_media_insert'), 10, 3 );
202
  add_filter('upload_mimes', array($this,'additional_mimes'));
203
  }
204
  }
205
- /**
206
- * Adds shortcode for supported media
207
- */
208
- function ead_media_insert( $html, $id, $attachment ) {
209
- if ( ead_validType( $attachment['url'] )) {
210
- return '[embeddoc url="' . $attachment['url'] . '"]';
211
- } else {
212
- return $html;
213
- }
214
- }
215
  /**
216
  * Adds additional mimetype for meadi uploader
217
  */
@@ -221,6 +271,34 @@ class Awsm_embed {
221
  'ai' => 'application/postscript',
222
  ));
223
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
224
  }
225
 
226
  Awsm_embed::get_instance();
3
  Plugin Name: Embed Any Document
4
  Plugin URI: http://awsm.in/embed-any-documents
5
  Description: Embed Any Document WordPress plugin lets you upload and embed your documents easily in your WordPress website without any additional browser plugins like Flash or Acrobat reader. The plugin lets you choose between Google Docs Viewer and Microsoft Office Online to display your documents.
6
+ Version: 2.1
7
  Author: Awsm Innovations
8
  Author URI: http://awsm.in
9
  License: GPL V3
15
  private $plugin_url;
16
  private $plugin_base;
17
  private $plugin_file;
18
+ private $plugin_version;
19
  private $settings_slug;
20
  private $text_domain = 'ead';
21
  /**
39
  $this->plugin_base = dirname( plugin_basename( __FILE__ ) );
40
  $this->plugin_file = __FILE__ ;
41
  $this->settings_slug = 'ead-settings';
42
+ $this->plugin_version = '2.1';
43
 
44
  load_plugin_textdomain($this->text_domain, false,$this->plugin_base . '/language' );
45
 
56
  add_action( 'wp_ajax_validateurl',array( $this, 'validateurl' ));
57
  //ajax Contact Form
58
  add_action( 'wp_ajax_supportform',array( $this, 'supportform' ));
59
+ //default options
60
+ register_activation_hook($this->plugin_file, array( $this, 'ead_defaults' ));
61
  $this->run_plugin();
62
  }
63
  /**
64
  * Register admin Settings style
65
  */
66
  function setting_styles(){
67
+ wp_register_style( 'embed-settings', plugins_url( 'css/settings.css', $this->plugin_file ), false,$this->plugin_version, 'all' );
68
  wp_enqueue_style('embed-settings');
69
  }
70
  /**
111
  * Embed Form popup
112
  */
113
  function embedpopup(){
 
 
 
114
  include($this->plugin_path.'inc/popup.php');
115
  }
116
  /**
118
  */
119
  function embed_helper(){
120
  wp_register_style( 'magnific-popup', plugins_url( 'css/magnific-popup.css', $this->plugin_file ), false, '0.9.9', 'all' );
121
+ wp_register_style( 'embed-css', plugins_url( 'css/embed.css', $this->plugin_file ), false, $this->plugin_version, 'all' );
122
  wp_register_script( 'magnific-popup', plugins_url( 'js/magnific-popup.js', $this->plugin_file ), array( 'jquery' ), '0.9.9', true );
123
+ wp_register_script( 'embed', plugins_url( 'js/embed.js', $this->plugin_file ), array( 'jquery' ),$this->plugin_version, true );
124
  wp_localize_script('embed','emebeder', array(
125
+ 'height' => get_option('ead_height', '500px'),
126
+ 'width' => get_option('ead_width', '100%'),
127
+ 'download' => get_option('ead_download', 'none'),
128
+ 'provider' => get_option('ead_provider', 'google'),
129
  'ajaxurl' => admin_url( 'admin-ajax.php' ),
130
  'validtypes' => ead_validembedtypes(),
131
+ 'msextension' => ead_validextensions('ms'),
132
+ 'drextension' => ead_validextensions('all'),
133
  'nocontent' => __('Nothing to insert', $this->text_domain),
134
  'addurl' => __('Add URL', $this->text_domain),
135
  'verify' => __('Verifying...', $this->text_domain),
142
  /**
143
  * Shortcode Functionality
144
  */
145
+ function embed_shortcode($atts) {
146
+ $embed = "";
147
+ $durl = "";
148
+ $default_width = ead_sanitize_dims(get_option('ead_width', '100%'));
149
+ $default_height = ead_sanitize_dims(get_option('ead_height', '500px'));
150
+ $default_provider = get_option('ead_provider', 'google');
151
+ $default_download = get_option('ead_download', 'none');
152
+ $show = false;
153
+ extract(shortcode_atts(array('url' => '',
154
+ 'drive' => '',
155
+ 'width' => $default_width,
156
+ 'height' => $default_height,
157
+ 'language' => 'en',
158
+ 'viewer' => $default_provider,
159
+ 'download' => $default_download), $atts));
160
+ if(isset($atts['provider']))
161
+ $viewer = $atts['provider'];
162
+ if(!isset($atts['provider']) AND !isset($atts['viewer']))
163
+ $viewer = 'google';
164
+ if ($url):
165
+ $filedata = wp_remote_head($url);
166
+ $durl = '';
167
+ $privatefile = '';
168
+ if (ead_allowdownload($viewer)) if ($download == 'alluser' or $download == 'all') {
169
+ $show = true;
170
+ } elseif ($download == 'logged' AND is_user_logged_in()) {
171
+ $show = true;
172
+ }
173
+ if ($show) {
174
+ $filesize = 0;
175
+ $url = esc_url($url, array('http', 'https'));
176
+ if (!is_wp_error($filedata) && isset($filedata['headers']['content-length'])) {
177
+ $filesize = ead_human_filesize($filedata['headers']['content-length']);
178
+ } else {
179
+ $filesize = 0;
180
+ }
181
+ $fileHtml = '';
182
+ if ($filesize) $fileHtml = ' [' . $filesize . ']';
183
+ $durl = '<p class="embed_download"><a href="' . $url . '" download >' . __('Download', 'ead') . $fileHtml . ' </a></p>';
184
+ }
185
+
186
+ $url = esc_url($url, array('http', 'https'));
187
+ $providerList = array('google', 'microsoft');
188
+ if (!in_array($viewer, $providerList)) $viewer = 'google';
189
+ switch ($viewer) {
190
+ case 'google':
191
+ $embedsrc = '//docs.google.com/viewer?url=%1$s&embedded=true&hl=%2$s';
192
+ $iframe = sprintf($embedsrc, urlencode($url), esc_attr($language));
193
+ break;
194
+
195
+ case 'microsoft':
196
+ $embedsrc = '//view.officeapps.live.com/op/embed.aspx?src=%1$s';
197
+ $iframe = sprintf($embedsrc, urlencode($url));
198
+ break;
199
+ }
200
+ $style = 'style="width:%1$s; height:%2$s; border: none;"';
201
+ $stylelink = sprintf($style, ead_sanitize_dims($width), ead_sanitize_dims($height));
202
+ $iframe = '<iframe src="' . $iframe . '" ' . $stylelink . '></iframe>';
203
+ $show = false;
204
+ $embed = '<div class="ead-document">' . $iframe . $privatefile . $durl . '</div>';
205
+ else:
206
+ $embed = __('No Url Found', 'ead');
207
+ endif;
208
+ return $embed;
209
+ }
210
 
211
  /**
212
  * Admin menu setup
227
  function register_eadsettings() {
228
  register_setting( 'ead-settings-group', 'ead_width' ,'ead_sanitize_dims');
229
  register_setting( 'ead-settings-group', 'ead_height','ead_sanitize_dims' );
 
230
  register_setting( 'ead-settings-group', 'ead_provider' );
231
+ register_setting( 'ead-settings-group', 'ead_download' );
232
+ register_setting( 'ead-settings-group', 'ead_mediainsert' );
233
  }
234
  /**
235
  * Ajax validate file url
236
  */
237
  function validateurl(){
 
 
 
238
  $fileurl = $_POST['furl'];
239
  echo json_encode(ead_validateurl($fileurl));
240
  die(0);
259
  */
260
  function adminfunctions(){
261
  if(is_admin()){
 
262
  add_filter('upload_mimes', array($this,'additional_mimes'));
263
  }
264
  }
 
 
 
 
 
 
 
 
 
 
265
  /**
266
  * Adds additional mimetype for meadi uploader
267
  */
271
  'ai' => 'application/postscript',
272
  ));
273
  }
274
+ /**
275
+ * To get Overlay link
276
+ */
277
+ function providerlink($keys, $id, $provider) {
278
+ $link = 'http://goo.gl/wJTQlc';
279
+ $id = "";
280
+ $configure = '<span class="overlay"><strong>' . __('Buy Pro Version', $this->text_domain) . '</strong><i></i></span>';
281
+ $target = 'target="_blank"';
282
+ echo '<a href="' . $link . '" id="' . $id . '" ' . $target . '><span><img src="' . $this->plugin_url . 'images/icon-' . strtolower($provider) . '.png" alt="Add From ' . $provider . '" />' . __('Add from ' . $provider, $this->text_domain) . $configure . '</span></a>';
283
+ }
284
+ /**
285
+ * To initialize default options
286
+ */
287
+ function ead_defaults()
288
+ {
289
+ $o = array(
290
+ 'ead_width' => '100%',
291
+ 'ead_height' => '500px',
292
+ 'ead_download' => 'none',
293
+ 'ead_provider' => 'google',
294
+ 'ead_mediainsert' => '1',
295
+ );
296
+ foreach ( $o as $k => $v )
297
+ {
298
+ if(!get_option($k)) update_option($k, $v);
299
+ }
300
+ return;
301
+ }
302
  }
303
 
304
  Awsm_embed::get_instance();
css/embed.css CHANGED
@@ -1,140 +1,244 @@
1
- .clear{
2
- clear: both;
 
 
3
  }
4
- #embed-popup-wrap { display: none;
5
- width: 85%;
6
- margin:0 auto; }
7
  #embed-popup {
8
- position: relative;
9
- width: 100%;
10
- max-width: 1000px;
11
- margin: 28px auto 100px;
12
- padding: 20px;
13
- background: #fff;
14
- -webkit-box-shadow: 0 2px 25px #000;
15
- -moz-box-shadow: 0 2px 25px #000;
16
- box-shadow: 0 2px 25px #000;
17
- -webkit-transition: max-width .2s;
18
- -moz-transition: max-width .2s;
19
- transition: max-width .2s;
20
- -moz-box-sizing: border-box;
21
- -webkit-box-sizing: border-box;
22
- box-sizing: border-box;
23
- }
24
-
25
  .section {
26
- margin: 0 0 30px;
27
- }
28
- ul.tabs {
29
- height: 33px;
30
- line-height: 25px;
31
- list-style: none;
32
- border-bottom: 1px solid #DDD;
33
- background: none;
34
- padding: 0px;
35
- margin: 20px 0 0;
36
- }
37
- .tabs li {
38
- float: left;
39
- display: inline;
40
- margin: 0 1px 0 0;
41
- padding: 4px 13px;
42
- color: #777;
43
- cursor: pointer;
44
- background: #F9F9F9;
45
- border: 1px solid #E4E4E4;
46
- border-bottom: 0 solid #F9F9F9;
47
- position: relative;
48
- height: auto !important ;
49
- line-height: inherit !important;
50
- }
51
- .tabs li:hover,
52
- .vertical .tabs li:hover {
53
- }
54
- .tabs li.current {
55
- color: #444;
56
- background: #EFEFEF;
57
- border: 1px solid #D4D4D4;
58
- border-bottom: 0 solid #EFEFEF;
59
- }
60
- .upload-success{border: 1px solid #D4D4D4;background: #EFEFEF;
61
-
62
- min-height: 70px;}
63
- .upload-success .inner{padding: 30px;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  .box {
65
- display: none;
66
- border: 1px solid #D4D4D4;
67
- border-width: 0 1px 1px;
68
- background: #EFEFEF;
69
- padding: 30px;
70
- min-height: 70px;
71
- }
72
- .box.visible {
73
- display: block;
74
- }
75
- .box label{
76
- display: block;
77
- font-size: 12px;
78
- margin-bottom: 5px;
79
- }
80
- .uploaded-doccument{
81
- padding:5px 0 5px 70px;
82
- background: url(../images/icon-success.png) no-repeat 0 0;
83
- color: #454545;
84
- font-size: 13px;
85
- float: left; margin-right: 20px;
86
- }
87
- .wp-core-ui .button#adv_options{ float: right; height: 40px; line-height: 38px; font-size: 13px; padding:0 20px; }
88
- .uploaded-doccument p{
89
- font-weight: bold; font-size: 16px; margin: 0 0 3px;
90
- }
91
- input.input-group-text{ padding:5px 8px; height: 40px; min-width: 60%; }
92
- .wp-core-ui .button-primary.input-group-btn{ padding:5px 10px; height: 40px; }
93
- .advanced_options{display: none; border-top:1px solid #ccc; padding: 0 30px }
94
- body.mfp-shown .mfp-bg { z-index: 101000 !important; }
95
- body.mfp-shown .mfp-wrap { z-index: 101001 !important; }
96
- body.mfp-shown .mfp-preloader { z-index: 101002 !important; }
97
- body.mfp-shown .mfp-content { z-index: 101003 !important; }
98
- body.mfp-shown button.mfp-close,
99
- body.mfp-shown button.mfp-arrow { z-index: 101004 !important; }
100
- .wp-core-ui .ead-btn.button-large{
101
- padding: 0 30px;
102
- height: 54px;
103
- line-height: 52px;
104
- font-size: 16px;
105
- }
106
- .wp-core-ui .ead-btn.button-medium{
107
- padding:0 15px;
108
- height: 36px;
109
- line-height: 34px;
110
- font-size: 14px;
111
- }
112
- .text-center{
113
- text-align: center;
114
- }
115
- .mfp-close{
116
- position: absolute;
117
- right: 10px;
118
- top:10px;
119
- font-weight: bold;
120
- background: url(../images/icon-close.png)!important;
121
- width: 22px;
122
- height: 22px;
123
- display: block;
124
- text-indent: -9999999px;
125
- }
126
- .mfp-close{
127
-
128
- }
129
- .upload-success{
130
- display: none;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
  }
132
  div.awsm-error, div.awsm-updated {
133
  margin: 5px 0 2px;
134
  border-width: 1px 1px 1px 4px;
135
  border-style: solid;
136
  -webkit-border-radius: 4px;
137
- border-radius: 4px;
138
  }
139
  div.awsm-updated {
140
  background-color: #fff;
@@ -150,28 +254,68 @@ div.awsm-error p, div.awsm-updated p {
150
  margin: 0.5em 0;
151
  padding: 2px;
152
  }
153
- .hidden{
154
- display:none;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
155
  }
156
- .mceActionPanel{ margin:20px 0 0;}
157
-
158
- .option-fields{
159
- list-style-type: none;
160
- margin:0;
161
- padding:30px 0 0;
162
  }
163
- .option-fields li{
164
- padding-bottom: 15px;
165
  }
166
- .option-fields label{ display:block; margin-bottom: 5px; font-weight: bold;}
167
- .f-left{
168
- float:left;
169
  }
170
- .f-left.middle{ margin:0 25px; }
171
- .clear{ clear:both;}
172
- .input-small{ width:60px;}
173
- .box .urlerror{
174
  border-color: #D95B5B;
175
  -webkit-box-shadow: 0 0 2px rgba(190, 30, 30, 0.8);
176
  box-shadow: 0 0 2px rgba(190, 30, 30, 0.8);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
  }
1
+ #embed-popup-wrap {
2
+ display: none;
3
+ width: 85%;
4
+ margin: 0 auto;
5
  }
 
 
 
6
  #embed-popup {
7
+ position: relative;
8
+ width: 100%;
9
+ max-width: 1000px;
10
+ margin: 28px auto 100px;
11
+ padding: 20px 30px;
12
+ background: #fff;
13
+ -webkit-box-shadow: 0 2px 25px #000;
14
+ -moz-box-shadow: 0 2px 25px #000;
15
+ box-shadow: 0 2px 25px #000;
16
+ -webkit-transition: max-width .2s;
17
+ -moz-transition: max-width .2s;
18
+ transition: max-width .2s;
19
+ -moz-box-sizing: border-box;
20
+ -webkit-box-sizing: border-box;
21
+ box-sizing: border-box;
22
+ }
 
23
  .section {
24
+ margin: 0 0 30px;
25
+ }
26
+ ul.ead-options {
27
+ padding: 30px 0;
28
+ overflow: hidden;
29
+ margin: 0px;
30
+ }
31
+ .ead-options li {
32
+ float: left;
33
+ width: 20%;
34
+ padding: 0 10px;
35
+ -moz-box-sizing: border-box;
36
+ -webkit-box-sizing: border-box;
37
+ box-sizing: border-box;
38
+ }
39
+ ul.ead-options li:first-child {
40
+ padding-left: 0;
41
+ }
42
+ ul.ead-options li:last-child {
43
+ padding-right: 0;
44
+ }
45
+ .ead-options li a {
46
+ display: block;
47
+ text-decoration: none;
48
+ color: rgb(33, 33, 33);
49
+ }
50
+ .ead-options li span {
51
+ border: 2px dotted #ccc;
52
+ -webkit-border-radius: 4px;
53
+ border-radius: 4px;
54
+ display: block;
55
+ padding: 30px 10px 20px;
56
+ text-align: center;
57
+ position: relative;
58
+ }
59
+ .ead-options li img {
60
+ display: block;
61
+ margin: 0 auto 10px;
62
+ }
63
+ .ead-options li span span.overlay {
64
+ border: none;
65
+ -webkit-border-radius: 0;
66
+ border-radius: 0;
67
+ padding: 0;
68
+ width: 100%;
69
+ height: 100%;
70
+ position: absolute;
71
+ left: 0;
72
+ top: 0;
73
+ background: rgba(255, 255, 255, 0.7);
74
+ }
75
+ .ead-options .overlay strong {
76
+ display: inline-block;
77
+ max-width: 97%;
78
+ vertical-align: middle;
79
+ opacity: 0;
80
+ -webkit-transition: all 0.3s ease;
81
+ -moz-transition: all 0.3s ease;
82
+ -ms-transition: all 0.3s ease;
83
+ -o-transition: all 0.3s ease;
84
+ transition: all 0.3s ease;
85
+ }
86
+ .ead-options li span:hover {
87
+ box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
88
+ -webkit-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
89
+ }
90
+ .ead-options li:hover .overlay strong {
91
+ opacity: 1;
92
+ }
93
+ .ead-options .overlay i {
94
+ display: inline-block;
95
+ height: 100%;
96
+ width: 1px;
97
+ vertical-align: middle;
98
+ }
99
+ .upload-success {
100
+ border: 2px dotted #ccc;
101
+ -webkit-border-radius: 4px;
102
+ border-radius: 4px;
103
+ min-height: 70px;
104
+ margin: 30px 0;
105
+ overflow: hidden;
106
+ }
107
+ .upload-success .inner {
108
+ padding: 30px 10px;
109
+ -moz-box-sizing: border-box;
110
+ -webkit-box-sizing: border-box;
111
+ box-sizing: border-box;
112
+ float: left;
113
+ width: 20%;
114
+ }
115
  .box {
116
+ display: none;
117
+ border: 2px dotted #ccc;
118
+ -webkit-border-radius: 4px;
119
+ border-radius: 4px;
120
+ padding: 20px;
121
+ margin: 30px 0;
122
+ }
123
+ a.go-back {
124
+ display: block;
125
+ margin-top: 20px;
126
+ text-decoration: none;
127
+ }
128
+ .box label {
129
+ display: block;
130
+ font-size: 12px;
131
+ margin-bottom: 5px;
132
+ }
133
+ .uploaded-doccument {
134
+ padding: 75px 0 5px;
135
+ color: #454545;
136
+ font-size: 13px;
137
+ word-wrap: break-word;
138
+ text-align: center;
139
+ }
140
+ .uploaded-doccument.ead-link {
141
+ background: url(../images/icon-link.png) no-repeat center 5px / 36px 49px;
142
+ }
143
+ .uploaded-doccument.ead-upload {
144
+ background: url(../images/icon-upload.png) no-repeat center 5px / 54px 49px;
145
+ }
146
+ .uploaded-doccument.ead-dropbox {
147
+ background: url(../images/icon-dropbox.png) no-repeat center 5px / 51px 49px;
148
+ }
149
+ .uploaded-doccument.ead-drive {
150
+ background: url(../images/icon-drive.png) no-repeat center 5px / 48px 49px;
151
+ }
152
+ .uploaded-doccument.ead-box {
153
+ background: url(../images/icon-box.png) no-repeat center 5px / 54px 49px;
154
+ }
155
+ .wp-core-ui .button#adv_options {
156
+ float: right;
157
+ height: 40px;
158
+ line-height: 38px;
159
+ font-size: 13px;
160
+ padding: 0 20px;
161
+ }
162
+ .uploaded-doccument p {
163
+ font-weight: bold;
164
+ font-size: 16px;
165
+ margin: 0 0 3px;
166
+ }
167
+ input.input-group-text {
168
+ padding: 5px 8px;
169
+ height: 40px;
170
+ min-width: 88%;
171
+ }
172
+ .wp-core-ui .button-primary.input-group-btn {
173
+ padding: 5px 10px;
174
+ height: 40px;
175
+ }
176
+ .advanced_options {
177
+ padding: 30px;
178
+ -moz-box-sizing: border-box;
179
+ -webkit-box-sizing: border-box;
180
+ box-sizing: border-box;
181
+ float: left;
182
+ width: 70%;
183
+ border-left: 2px dotted #ccc;
184
+ }
185
+ .advanced_options h3 {
186
+ margin-top: 0px
187
+ }
188
+ .advanced_options h3 span {
189
+ color: #aaa;
190
+ font-weight: normal;
191
+ }
192
+ body.mfp-shown .mfp-bg {
193
+ z-index: 1010;
194
+ }
195
+ body.mfp-shown .mfp-wrap {
196
+ z-index: 1011;
197
+ }
198
+ body.mfp-shown .mfp-preloader {
199
+ z-index: 1012;
200
+ }
201
+ body.mfp-shown .mfp-content {
202
+ z-index: 1013;
203
+ }
204
+ body.mfp-shown button.mfp-close, body.mfp-shown button.mfp-arrow {
205
+ z-index: 1014;
206
+ }
207
+ .wp-core-ui .ead-btn.button-large {
208
+ padding: 0 30px;
209
+ height: 54px;
210
+ line-height: 52px;
211
+ font-size: 16px;
212
+ }
213
+ .wp-core-ui .ead-btn.button-medium {
214
+ padding: 0 15px;
215
+ height: 36px;
216
+ line-height: 34px;
217
+ font-size: 14px;
218
+ }
219
+ .text-center {
220
+ text-align: center;
221
+ }
222
+ .mfp-close {
223
+ position: absolute;
224
+ right: 30px;
225
+ top: 30px;
226
+ font-weight: bold;
227
+ background: url(../images/icon-close.png)!important;
228
+ width: 22px;
229
+ height: 22px;
230
+ display: block;
231
+ text-indent: -9999999px;
232
+ }
233
+ .mfp-close {} .upload-success {
234
+ display: none;
235
  }
236
  div.awsm-error, div.awsm-updated {
237
  margin: 5px 0 2px;
238
  border-width: 1px 1px 1px 4px;
239
  border-style: solid;
240
  -webkit-border-radius: 4px;
241
+ border-radius: 4px;
242
  }
243
  div.awsm-updated {
244
  background-color: #fff;
254
  margin: 0.5em 0;
255
  padding: 2px;
256
  }
257
+ .hidden {
258
+ display: none;
259
+ }
260
+ .mceActionPanel {
261
+ margin: 0;
262
+ }
263
+ .option-fields {
264
+ list-style-type: none;
265
+ margin: 0;
266
+ padding: 20px 0 0;
267
+ }
268
+ .option-fields li {
269
+ padding-bottom: 15px;
270
+ }
271
+ .option-fields label {
272
+ display: block;
273
+ margin-bottom: 5px;
274
+ font-weight: bold;
275
+ }
276
+ .f-left {
277
+ float: left;
278
  }
279
+ .option-fields .f-left {
280
+ margin-right: 25px;
 
 
 
 
281
  }
282
+ .option-fields .f-left.last {
283
+ margin: 0;
284
  }
285
+ .clear {
286
+ clear: both;
 
287
  }
288
+ .input-small {
289
+ width: 60px;
290
+ }
291
+ .box .urlerror {
292
  border-color: #D95B5B;
293
  -webkit-box-shadow: 0 0 2px rgba(190, 30, 30, 0.8);
294
  box-shadow: 0 0 2px rgba(190, 30, 30, 0.8);
295
+ }
296
+ .picker-dialog {
297
+ z-index: 1091;
298
+ }
299
+ .picker-dialog-bg {
300
+ z-index: 1090;
301
+ }
302
+ .ead-popon #adminmenuwrap{
303
+ z-index: 999!important;
304
+ }
305
+ @media (max-width: 820px) {
306
+ .ead-options li {
307
+ width: 33.33%;
308
+ padding-bottom: 20px;
309
+ margin-bottom: 0;
310
+ }
311
+ }
312
+ @media (max-width: 600px) {
313
+ .ead-options li {
314
+ width: 50%;
315
+ }
316
+ }
317
+ @media (max-width: 400px) {
318
+ .ead-options li {
319
+ width: 100%;
320
+ }
321
  }
css/settings.css CHANGED
@@ -5,10 +5,10 @@ img {
5
  .clear {
6
  clear: both;
7
  }
8
- .f-left{
9
  float: left;
10
  }
11
- .fl-right{
12
  float: right;
13
  }
14
  .tabs {
@@ -23,8 +23,8 @@ img {
23
  background: none;
24
  border: none;
25
  }
26
- .nav-tab-wrapper a:hover{
27
- border: none;
28
  }
29
  .nav-tab-wrapper a.nav-tab-active {
30
  background: #fff;
@@ -46,20 +46,22 @@ h2.ead-title {
46
  float: left;
47
  width: 100%;
48
  -moz-box-sizing: border-box;
49
- -webkit-box-sizing: border-box;
50
- box-sizing: border-box;
51
- padding-right:340px;
52
- margin-right: -340px;
53
  }
54
  .ead-right-wrap {
55
  float: right;
56
  max-width: 300px;
57
- background: #fff;
58
- padding-bottom: 15px;
59
  color: #372e2e;
60
  }
 
 
 
 
61
  .author-info {
62
- padding: 25px 15px;
63
  text-align: center;
64
  }
65
  .awsm-social {
@@ -68,13 +70,13 @@ margin-right: -340px;
68
  padding: 15px;
69
  border-top: 1px solid #dadada;
70
  border-bottom: 1px solid #dadada;
71
- margin-bottom: 20px;
72
  }
73
  .awsm-social li {
74
  display: inline-block;
75
  margin: 0 6px;
76
  }
77
- .awsm-icon{
78
  background: url(../images/ead-icon-sprite.jpg) no-repeat;
79
  display: block;
80
  width: 21px;
@@ -82,50 +84,53 @@ margin-right: -340px;
82
  text-indent: -999999px;
83
  opacity: 0.46;
84
  }
85
- .awsm-icon:hover{
86
  opacity: 1;
87
  }
88
- .awsm-icon-facebook{
89
-
90
- }
91
- .awsm-icon-twitter{
92
  background-position: -26px 0;
93
  }
94
- .awsm-icon-github{
95
  background-position: -52px 0;
96
  }
97
- .awsm-icon-behance{
98
  background-position: -78px 0;
99
  width: 28px;
100
  }
101
- .awsm-icon-dribbble{
102
  background-position: right 0;
103
  }
104
-
105
- .paypal{ text-align: center;}
106
- .paypal input.small{ vertical-align:top; margin-right: 20px;}
107
- .paypal .donate-btn{ vertical-align: top; padding:0; }
 
 
 
 
 
 
 
108
  input.small {
109
  max-width: 60px;
110
  }
111
- .ead-frame-width{
112
  margin-right: 15px;
113
  margin-bottom: 10px;
114
  }
115
- .ead-frame-height{
116
  margin-bottom: 10px;
117
  }
118
- span.note, .ead_supported {
119
  font-size: 12px;
120
  color: #999;
121
  }
122
-
123
  div.awsm-error, div.awsm-updated {
124
  margin: 5px 0 2px;
125
  border-width: 1px 1px 1px 4px;
126
  border-style: solid;
127
  -webkit-border-radius: 4px;
128
- border-radius: 4px;
129
  }
130
  div.awsm-updated {
131
  background-color: #fff;
@@ -141,27 +146,65 @@ div.awsm-error p, div.awsm-updated p {
141
  margin: 0.5em 0;
142
  padding: 2px;
143
  }
144
- .ead_doller{
145
  display: inline-block;
146
  vertical-align: top;
147
  margin: 5px 5px 0 0;
148
  font-weight: bold;
149
  }
150
- #supportform label{ display: block; margin-bottom: 5px; font-weight: bold;}
151
- .text-input{ width: 100%; height: 40px; -moz-box-sizing: border-box;
152
- -webkit-box-sizing: border-box;
153
- box-sizing: border-box;}
154
- #supportform textarea{-moz-box-sizing: border-box;
155
- -webkit-box-sizing: border-box;
156
- box-sizing: border-box; width:100%;}
157
- .ead_supported span{ display:block; font-weight: bold; margin-top: 10px;}
158
- .supportedlist ul{ margin-top: 5px;}
159
- .supportedlist li{ padding-left:17px; position: relative; }
160
- .supportedlist li span{ position:absolute; left:0; top:3px; width:11px; height:11px; margin: 0;}
161
- .supportedlist li span.ead-check{ background:url(../images/icon-yes.png) no-repeat;}
162
- .supportedlist li span.ead-close{ background:url(../images/icon-no.png) no-repeat;}
163
- .col-left{float: left;width: 47%;margin-right: 6%;}
164
- .col-right{float: right;width: 47%;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
165
  @media (max-width: 800px) {
166
  .ead-left-wrap {
167
  float: none;
@@ -169,14 +212,16 @@ box-sizing: border-box; width:100%;}
169
  margin-bottom: 30px;
170
  padding-right: 0;
171
  margin-right: 0;
172
- }
173
- .ead-right-wrap {
174
- float: none;
175
- width: 100%;
176
- }
177
-
178
  }
179
  @media (max-width: 980px) {
180
- .col-left,.col-right{float: none;width:100%;margin-right:0%;}
181
-
182
- }
 
 
 
5
  .clear {
6
  clear: both;
7
  }
8
+ .f-left {
9
  float: left;
10
  }
11
+ .fl-right {
12
  float: right;
13
  }
14
  .tabs {
23
  background: none;
24
  border: none;
25
  }
26
+ .nav-tab-wrapper a:hover {
27
+ border: none;
28
  }
29
  .nav-tab-wrapper a.nav-tab-active {
30
  background: #fff;
46
  float: left;
47
  width: 100%;
48
  -moz-box-sizing: border-box;
49
+ -webkit-box-sizing: border-box;
50
+ box-sizing: border-box;
51
+ padding-right: 340px;
52
+ margin-right: -340px;
53
  }
54
  .ead-right-wrap {
55
  float: right;
56
  max-width: 300px;
 
 
57
  color: #372e2e;
58
  }
59
+ .ead-right-inner {
60
+ background: #fff;
61
+ margin-top: 10px;
62
+ }
63
  .author-info {
64
+ padding: 10px 15px;
65
  text-align: center;
66
  }
67
  .awsm-social {
70
  padding: 15px;
71
  border-top: 1px solid #dadada;
72
  border-bottom: 1px solid #dadada;
73
+ margin-bottom: 0;
74
  }
75
  .awsm-social li {
76
  display: inline-block;
77
  margin: 0 6px;
78
  }
79
+ .awsm-icon {
80
  background: url(../images/ead-icon-sprite.jpg) no-repeat;
81
  display: block;
82
  width: 21px;
84
  text-indent: -999999px;
85
  opacity: 0.46;
86
  }
87
+ .awsm-icon:hover {
88
  opacity: 1;
89
  }
90
+ .awsm-icon-facebook {} .awsm-icon-twitter {
 
 
 
91
  background-position: -26px 0;
92
  }
93
+ .awsm-icon-github {
94
  background-position: -52px 0;
95
  }
96
+ .awsm-icon-behance {
97
  background-position: -78px 0;
98
  width: 28px;
99
  }
100
+ .awsm-icon-dribbble {
101
  background-position: right 0;
102
  }
103
+ .paypal {
104
+ text-align: center;
105
+ }
106
+ .paypal input.small {
107
+ vertical-align: top;
108
+ margin-right: 20px;
109
+ }
110
+ .paypal .donate-btn {
111
+ vertical-align: top;
112
+ padding: 0;
113
+ }
114
  input.small {
115
  max-width: 60px;
116
  }
117
+ .ead-frame-width {
118
  margin-right: 15px;
119
  margin-bottom: 10px;
120
  }
121
+ .ead-frame-height {
122
  margin-bottom: 10px;
123
  }
124
+ span.note, .ead_supported {
125
  font-size: 12px;
126
  color: #999;
127
  }
 
128
  div.awsm-error, div.awsm-updated {
129
  margin: 5px 0 2px;
130
  border-width: 1px 1px 1px 4px;
131
  border-style: solid;
132
  -webkit-border-radius: 4px;
133
+ border-radius: 4px;
134
  }
135
  div.awsm-updated {
136
  background-color: #fff;
146
  margin: 0.5em 0;
147
  padding: 2px;
148
  }
149
+ .ead_doller {
150
  display: inline-block;
151
  vertical-align: top;
152
  margin: 5px 5px 0 0;
153
  font-weight: bold;
154
  }
155
+ #supportform label {
156
+ display: block;
157
+ margin-bottom: 5px;
158
+ font-weight: bold;
159
+ }
160
+ .text-input {
161
+ width: 100%;
162
+ height: 40px;
163
+ -moz-box-sizing: border-box;
164
+ -webkit-box-sizing: border-box;
165
+ box-sizing: border-box;
166
+ }
167
+ #supportform textarea {
168
+ -moz-box-sizing: border-box;
169
+ -webkit-box-sizing: border-box;
170
+ box-sizing: border-box;
171
+ width: 100%;
172
+ }
173
+ .ead_supported span {
174
+ display: block;
175
+ font-weight: bold;
176
+ margin-top: 10px;
177
+ }
178
+ .supportedlist ul {
179
+ margin-top: 5px;
180
+ }
181
+ .supportedlist li {
182
+ padding-left: 17px;
183
+ position: relative;
184
+ }
185
+ .supportedlist li span {
186
+ position: absolute;
187
+ left: 0;
188
+ top: 3px;
189
+ width: 11px;
190
+ height: 11px;
191
+ margin: 0;
192
+ }
193
+ .supportedlist li span.ead-check {
194
+ background: url(../images/icon-yes.png) no-repeat;
195
+ }
196
+ .supportedlist li span.ead-close {
197
+ background: url(../images/icon-no.png) no-repeat;
198
+ }
199
+ .col-left {
200
+ float: left;
201
+ width: 47%;
202
+ margin-right: 6%;
203
+ }
204
+ .col-right {
205
+ float: right;
206
+ width: 47%;
207
+ }
208
  @media (max-width: 800px) {
209
  .ead-left-wrap {
210
  float: none;
212
  margin-bottom: 30px;
213
  padding-right: 0;
214
  margin-right: 0;
215
+ }
216
+ .ead-right-wrap {
217
+ float: none;
218
+ width: 100%;
219
+ }
 
220
  }
221
  @media (max-width: 980px) {
222
+ .col-left, .col-right {
223
+ float: none;
224
+ width: 100%;
225
+ margin-right: 0%;
226
+ }
227
+ }
images/ead-small.png CHANGED
Binary file
images/icon-box.png ADDED
Binary file
images/icon-drive.png ADDED
Binary file
images/icon-dropbox.png ADDED
Binary file
images/icon-link.png ADDED
Binary file
images/icon-upload.png ADDED
Binary file
inc/functions.php CHANGED
@@ -1,28 +1,29 @@
1
  <?php
 
2
  /**
3
  * Dropdown Builder
4
  *
5
  * @since 1.0
6
  * @return String select html
7
  */
8
- function ead_selectbuilder( $name, $options,$selected="",$class="") {
9
- if(is_array($options)):
10
- echo "<select name=\"$name\" id=\"$name\" class=\"$class\">";
11
- foreach ($options as $key => $option) {
12
- echo "<option value=\"$key\"";
13
- if ( ! empty( $helptext ) ) {
14
- echo " title=\"$helptext\"";
15
- }
16
- if ( $key == $selected ) {
17
- echo ' selected="selected"';
 
 
18
  }
19
- echo ">$option</option>\n";
20
- }
21
- echo '</select>';
22
  else:
23
-
24
  endif;
25
  }
 
26
  /**
27
  * Human Readable filesize
28
  *
@@ -31,7 +32,7 @@ function ead_selectbuilder( $name, $options,$selected="",$class="") {
31
  * @note Replaces old gde_sanitizeOpts function
32
  */
33
  function ead_human_filesize($bytes, $decimals = 2) {
34
- $size = array('B','KB','MB','GB','TB','PB','EB','ZB','YB');
35
  $factor = floor((strlen($bytes) - 1) / 3);
36
  return sprintf("%.{$decimals}f ", $bytes / pow(1024, $factor)) . @$size[$factor];
37
  }
@@ -43,146 +44,92 @@ function ead_human_filesize($bytes, $decimals = 2) {
43
  * @return string Sanitized dimensions, or false if value is invalid
44
  * @note Replaces old gde_sanitizeOpts function
45
  */
46
- function ead_sanitize_dims( $dim ) {
 
47
  // remove any spacing junk
48
- $dim = trim( str_replace( " ", "", $dim ) );
49
 
50
- if ( ! strstr( $dim, '%' ) ) {
51
  $type = "px";
52
- $dim = preg_replace( "/[^0-9]*/", '', $dim );
53
  } else {
54
  $type = "%";
55
- $dim = preg_replace( "/[^0-9]*/", '', $dim );
56
- if ( (int) $dim > 100 ) {
57
  $dim = "100";
58
  }
59
  }
60
 
61
- if ( $dim ) {
62
- return $dim.$type;
63
  } else {
64
  return false;
65
  }
66
  }
67
-
68
  /**
69
  * Validate File url
70
  *
71
  * @since 1.0
72
- * @return string Download link
73
  */
74
- function ead_validateurl($url){
75
- $types = ead_validmimeTypes();
76
- $url = esc_url( $url, array( 'http', 'https' ));
77
- $remote = wp_remote_head($url);
78
- $json['status'] = false;
79
- $json['message'] = '';
80
- if ( is_array( $remote ) ) {
81
- if ( isset( $remote['headers']['content-length'] ) ) {
82
- if(in_array($remote['headers']['content-type'], $types)){
83
- $json['message'] = __("Done",'ead');
84
- $filename = pathinfo($url);
85
- if(isset($filename)){
86
- $json['file']['filename'] = $filename['basename'];
87
- }else{
88
- $json['file']['filename'] = __("Document",'ead');
89
- }
90
- $json['file']['filesizeHumanReadable'] = ead_human_filesize($remote['headers']['content-length']);
91
- $json['status'] =true;
92
- }else{
93
- $json['message'] = __("File format is not supported.",'ead');
94
- $json['status'] = false;
95
- }
96
-
97
  } else {
98
- $json['message'] = __('Not a valid URL. Please try again.','ead');
99
- $json['status'] =false;
100
  }
101
- }elseif(is_wp_error( $result )){
102
- $json['message'] = $result->get_error_message();
103
- $json['status'] =false;
104
- }else{
105
- $json['message'] = __('Sorry, the file URL is not valid.','ead');
106
- $json['status'] =false;
 
 
 
 
107
  }
108
- return $json;
109
  }
 
110
  /**
111
- * Get Provider url
112
  *
113
  * @since 1.0
114
- * @return string iframe embed html
115
  */
116
- function ead_getprovider($atts){
117
- $embed = "";
118
- $durl = "";
119
- $default_width = ead_sanitize_dims( get_option('ead_width','100%') );
120
- $default_height = ead_sanitize_dims( get_option('ead_height','500px') );
121
- $default_provider = get_option('ead_provider','google');
122
- $default_download = get_option('ead_download','none');
123
-
124
- extract(shortcode_atts( array(
125
- 'url' => '',
126
- 'width' => $default_width,
127
- 'height' => $default_height,
128
- 'language' => 'en',
129
- 'provider' => $default_provider,
130
- 'download' => $default_download
131
- ), $atts ) );
132
- if($url):
133
- $filedata = wp_remote_head( $url );
134
- if(isset($filedata['headers']['content-length'])){
135
- if($provider == 'microsoft'){
136
- $micromime = microsoft_mimes();
137
- if(!in_array($filedata['headers']['content-type'], $micromime)){
138
- $provider = 'google';
139
- }
140
- }
141
- $url = esc_url( $url, array( 'http', 'https' ));
142
- switch ($provider) {
143
- case 'google':
144
- $embedsrc = '//docs.google.com/viewer?url=%1$s&embedded=true&hl=%2$s';
145
- $iframe = sprintf( $embedsrc,
146
- urlencode( $url ),
147
- esc_attr( $language )
148
- );
149
- break;
150
- case 'microsoft':
151
- $embedsrc ='//view.officeapps.live.com/op/embed.aspx?src=%1$s';
152
- $iframe = sprintf( $embedsrc,
153
- urlencode( $url )
154
- );
155
- break;
156
- }
157
- $style = 'style="width:%1$s; height:%2$s; border: none;"';
158
- $stylelink = sprintf($style,
159
- ead_sanitize_dims($width) ,
160
- ead_sanitize_dims($height)
161
- );
162
-
163
- $iframe = '<iframe src="'.$iframe.'" '.$stylelink.'></iframe>';
164
- $show = false;
165
- if($download=='alluser'){
166
- $show = true;
167
- }elseif($download=='logged' AND is_user_logged_in()){
168
- $show = true;
169
- }
170
- if($show){
171
- $filesize ="";
172
- $url = esc_url( $url, array( 'http', 'https' ));
173
- if(isset($filedata['headers']['content-length']))
174
- $filesize = ead_human_filesize($filedata['headers']['content-length']);
175
- $durl = '<p class="embed_download"><a href="'.$url.'" download >'.__('Download','ead'). ' ['.$filesize.']</a></p>';
176
- }
177
-
178
- $embed = $iframe.$durl;
179
- }else{
180
- $embed = __('File Not Found','ead');
181
  }
182
- else:
183
- $embed = __('No Url Found','ead');
184
- endif;
185
- return $embed;
186
  }
187
  /**
188
  * Get Email node
@@ -190,77 +137,117 @@ function ead_getprovider($atts){
190
  * @since 1.0
191
  * @return string email html
192
  */
193
- function ead_getemailnode($emaildata,$postdata){
194
  $emailhtml = "";
195
  foreach ($emaildata as $key => $label) {
196
- if($postdata[$key]){
197
- $emailhtml .= '<tr bgcolor="#EAF2FA">
198
- <td colspan="2"><font style="font-family:sans-serif;font-size:12px"><strong>'.$label.'</strong></font></td>
199
  </tr>
200
  <tr bgcolor="#FFFFFF">
201
  <td width="20">&nbsp;</td>
202
- <td><font style="font-family:sans-serif;font-size:12px">'.$postdata[$key] .'</font></td>
203
  </tr>';
 
204
  }
205
- }
206
- return $emailhtml;
207
  }
 
208
  /**
209
  * Validate Source mime type
210
  *
211
  * @since 1.0
212
- * @return boolean
213
  */
214
- function ead_validmimeTypes(){
215
- include('mime_types.php');
216
  return $mimetypes;
217
  }
 
218
  /**
219
  * Checks Url Validity
220
  *
221
  * @since 1.0
222
- * @return boolean
223
  */
224
- function ead_validType( $url ) {
225
- $doctypes=ead_validmimeTypes();
226
- if ( is_array( $doctypes ) ) {
227
- $allowed_ext = implode( "|", array_keys( $doctypes ) );
228
- if ( preg_match( "/\.($allowed_ext)$/i", $url ) ) {
229
  return true;
230
  }
231
  } else {
232
  return false;
233
  }
234
  }
 
235
  /**
236
  * Get allowed Mime Types
237
  *
238
  * @since 1.0
239
- * @return array Mimetypes
240
  */
241
- function ead_validembedtypes(){
242
- $doctypes=ead_validmimeTypes();
243
- return $allowedtype = implode(',',$doctypes);
 
244
 
 
 
 
 
 
 
 
 
 
245
  }
 
246
  /**
247
  * Get allowed Mime Types for microsoft
248
  *
249
  * @since 1.0
250
- * @return array Mimetypes
251
  */
252
- function microsoft_mimes(){
253
- $micro_mime=array(
254
- 'doc' => 'application/msword',
255
- 'pot|pps|ppt' => 'application/vnd.ms-powerpoint',
256
- 'xla|xls|xlt|xlw' => 'application/vnd.ms-excel',
257
- 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
258
- 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
259
- 'dotm' => 'application/vnd.ms-word.template.macroEnabled.12',
260
- 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
261
- 'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12',
262
- 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
263
- );
264
- return $micro_mime;
265
  }
266
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
+
3
  /**
4
  * Dropdown Builder
5
  *
6
  * @since 1.0
7
  * @return String select html
8
  */
9
+ function ead_selectbuilder($name, $options, $selected = "", $class = "") {
10
+ if (is_array($options)):
11
+ echo "<select name=\"$name\" id=\"$name\" class=\"$class\">";
12
+ foreach ($options as $key => $option) {
13
+ echo "<option value=\"$key\"";
14
+ if (!empty($helptext)) {
15
+ echo " title=\"$helptext\"";
16
+ }
17
+ if ($key == $selected) {
18
+ echo ' selected="selected"';
19
+ }
20
+ echo ">$option</option>\n";
21
  }
22
+ echo '</select>';
 
 
23
  else:
 
24
  endif;
25
  }
26
+
27
  /**
28
  * Human Readable filesize
29
  *
32
  * @note Replaces old gde_sanitizeOpts function
33
  */
34
  function ead_human_filesize($bytes, $decimals = 2) {
35
+ $size = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');
36
  $factor = floor((strlen($bytes) - 1) / 3);
37
  return sprintf("%.{$decimals}f ", $bytes / pow(1024, $factor)) . @$size[$factor];
38
  }
44
  * @return string Sanitized dimensions, or false if value is invalid
45
  * @note Replaces old gde_sanitizeOpts function
46
  */
47
+ function ead_sanitize_dims($dim) {
48
+
49
  // remove any spacing junk
50
+ $dim = trim(str_replace(" ", "", $dim));
51
 
52
+ if (!strstr($dim, '%')) {
53
  $type = "px";
54
+ $dim = preg_replace("/[^0-9]*/", '', $dim);
55
  } else {
56
  $type = "%";
57
+ $dim = preg_replace("/[^0-9]*/", '', $dim);
58
+ if ((int)$dim > 100) {
59
  $dim = "100";
60
  }
61
  }
62
 
63
+ if ($dim) {
64
+ return $dim . $type;
65
  } else {
66
  return false;
67
  }
68
  }
69
+
70
  /**
71
  * Validate File url
72
  *
73
  * @since 1.0
74
+ * @return string Download link
75
  */
76
+ function ead_validateurl($url) {
77
+ $types = ead_validmimeTypes();
78
+ $url = esc_url($url, array('http', 'https'));
79
+ $remote = wp_remote_head($url);
80
+ $json['status'] = false;
81
+ $json['message'] = '';
82
+ if (wp_remote_retrieve_response_code($remote) == 200) {
83
+
84
+ //Gzip Support
85
+ $filename = pathinfo($url);
86
+ $doctypes = ead_validmimeTypes();
87
+ if (ead_validType($url, $doctypes)) {
88
+ $json['status'] = true;
89
+ $json['message'] = __("Done", 'ead');
90
+ $json['file']['url'] = $url;
91
+ if (isset($filename)) {
92
+ $json['file']['filename'] = $filename['basename'];
93
+ } else {
94
+ $json['file']['filename'] = __("Document", 'ead');
95
+ }
96
+ if (!is_wp_error($filedata) && isset($filedata['headers']['content-length'])) {
97
+ $json['file']['filesizeHumanReadable'] = ead_human_filesize($remote['headers']['content-length']);
 
98
  } else {
99
+ $json['file']['filesizeHumanReadable'] = 0;
 
100
  }
101
+ } else {
102
+ $json['message'] = __("File format is not supported.", 'ead');
103
+ $json['status'] = false;
104
+ }
105
+ } elseif (is_wp_error($remote)) {
106
+ $json['message'] = $remote->get_error_message();
107
+ $json['status'] = false;
108
+ } else {
109
+ $json['message'] = __('Sorry, the file URL is not valid.', 'ead');
110
+ $json['status'] = false;
111
  }
112
+ return $json;
113
  }
114
+
115
  /**
116
+ * Validate google url
117
  *
118
  * @since 1.0
119
+ * @return string Download link
120
  */
121
+ function ead_ValidateDriveUrl($url) {
122
+ $remote = wp_remote_head($url);
123
+ $json['status'] = false;
124
+ $json['message'] = '';
125
+ if (wp_remote_retrieve_response_code($remote) == 200) {
126
+ $json['message'] = __("Done", 'ead');
127
+ $json['status'] = true;
128
+ } else {
129
+ $json['message'] = __('The document you have chosen is a not public.', 'ead') . __(' Only the owner and explicitly shared collaborators will be able to view it.', 'ead');
130
+ $json['status'] = false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
  }
132
+ return $json;
 
 
 
133
  }
134
  /**
135
  * Get Email node
137
  * @since 1.0
138
  * @return string email html
139
  */
140
+ function ead_getemailnode($emaildata, $postdata) {
141
  $emailhtml = "";
142
  foreach ($emaildata as $key => $label) {
143
+ if ($postdata[$key]) {
144
+ $emailhtml.= '<tr bgcolor="#EAF2FA">
145
+ <td colspan="2"><font style="font-family:sans-serif;font-size:12px"><strong>' . $label . '</strong></font></td>
146
  </tr>
147
  <tr bgcolor="#FFFFFF">
148
  <td width="20">&nbsp;</td>
149
+ <td><font style="font-family:sans-serif;font-size:12px">' . $postdata[$key] . '</font></td>
150
  </tr>';
151
+ }
152
  }
153
+ return $emailhtml;
 
154
  }
155
+
156
  /**
157
  * Validate Source mime type
158
  *
159
  * @since 1.0
160
+ * @return boolean
161
  */
162
+ function ead_validmimeTypes() {
163
+ include ('mime_types.php');
164
  return $mimetypes;
165
  }
166
+
167
  /**
168
  * Checks Url Validity
169
  *
170
  * @since 1.0
171
+ * @return boolean
172
  */
173
+ function ead_validType($url) {
174
+ $doctypes = ead_validmimeTypes();
175
+ if (is_array($doctypes)) {
176
+ $allowed_ext = implode("|", array_keys($doctypes));
177
+ if (preg_match("/\.($allowed_ext)$/i", $url)) {
178
  return true;
179
  }
180
  } else {
181
  return false;
182
  }
183
  }
184
+
185
  /**
186
  * Get allowed Mime Types
187
  *
188
  * @since 1.0
189
+ * @return string Mimetypes
190
  */
191
+ function ead_validembedtypes() {
192
+ $doctypes = ead_validmimeTypes();
193
+ return $allowedtype = implode(',', $doctypes);
194
+ }
195
 
196
+ /**
197
+ * Get allowed Extensions
198
+ *
199
+ * @since 1.0
200
+ * @return string Extenstion
201
+ */
202
+ function ead_validextensions($list = 'all') {
203
+ include ('mime_types.php');
204
+ return $allowedtype = implode(',', $extensions[$list]);
205
  }
206
+
207
  /**
208
  * Get allowed Mime Types for microsoft
209
  *
210
  * @since 1.0
211
+ * @return array Mimetypes
212
  */
213
+ function ead_microsoft_mimes() {
214
+ $micro_mime = array(
215
+ 'doc' => 'application/msword',
216
+ 'pot|pps|ppt' => 'application/vnd.ms-powerpoint',
217
+ 'xla|xls|xlt|xlw' => 'application/vnd.ms-excel',
218
+ 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
219
+ 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
220
+ 'dotm' => 'application/vnd.ms-word.template.macroEnabled.12',
221
+ 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
222
+ 'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12',
223
+ 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
224
+ );
225
+ return $micro_mime;
226
  }
227
+
228
+ /**
229
+ * Check Allow Download
230
+ *
231
+ * @since 1.0
232
+ * @return Boolean
233
+ */
234
+ function ead_allowdownload($provider) {
235
+ $blacklist = array('drive', 'box');
236
+ if (in_array($provider, $blacklist)) {
237
+ return false;
238
+ } else {
239
+ return true;
240
+ }
241
+ }
242
+
243
+ /**
244
+ * Get Active Menu Class
245
+ *
246
+ * @since 1.0
247
+ * @return string Class name
248
+ */
249
+ function ead_getactiveMenu($tab, $needle) {
250
+ if ($tab == $needle) {
251
+ echo 'nav-tab-active';
252
+ }
253
+ }
inc/mime_types.php CHANGED
@@ -24,5 +24,7 @@
24
  'pages' => 'application/vnd.apple.pages',
25
  //Additional Mime Types
26
  'svg' => 'image/svg+xml',
27
- );
28
- ?>
 
 
24
  'pages' => 'application/vnd.apple.pages',
25
  //Additional Mime Types
26
  'svg' => 'image/svg+xml',
27
+ );
28
+ $extensions['all'] = array('.css','.js','.pdf','.ai','.tif','.tiff','.doc','.txt','.asc','.c','.cc','.h','.pot','.pps','.ppt','.xla','.xls','.xlt','.xlw','.docx','.dotx','.dotm','.xlsx','.xlsm','.pptx','.pages','.svg');
29
+ $extensions['ms'] = array('.doc','.pot','.pps','.ppt','.xla','.xls','.xlt','.xlw','.docx','.dotx','.dotm','.xlsx','.xlsm','.pptx');
30
+ ?>
inc/popup.php CHANGED
@@ -8,20 +8,21 @@
8
  <div class="section">
9
  <div id="embed_message" class="awsm-error" style="display:none;"><p></p></div>
10
  <div class="ead_container">
11
- <ul class="tabs">
12
- <li class="current"><?php _e('Upload and Embed','ead');?></li>
13
- <li><?php _e('Add From URL','ead');?></li>
14
- </ul>
15
  <form action="" onSubmit="return false" method="post" enctype="multipart/form-data" id="Docuploader">
16
- <div class="box visible">
17
- <div class="text-center"><input type="button" value="Upload Document" class="ead-btn button-primary button-large" id="upload_doc"/></div>
18
-
19
- </div>
20
- <div class="box">
 
 
 
21
  <label for="awsm_url"><?php _e('Enter document URL','ead');?></label>
22
  <input name="awsm_url" type="text" class="opt dwl input-group-text" id="awsm_url"/>
23
  <input type="button" value="Add URL" class="ead-btn button-primary input-group-btn" id="add_url"/>
24
- </div>
 
 
25
  </form>
26
  </div><!--ead_container-->
27
  <div class="upload-success">
@@ -30,36 +31,50 @@
30
  <p id="ead_filename"></p>
31
  <span id="ead_filesize"></span>
32
  </div>
33
- <a class="ead-btn button" id="adv_options"><?php _e('Advanced Options','ead');?></a>
34
  <div class="clear"></div>
35
- </div>
36
- <div class="advanced_options">
37
- <ul class="option-fields">
38
-
39
- <li>
40
- <div class="f-left"><label>Width</label> <input type="text" name="width" class="embedval input-small" id="ead_width" value="<?php echo get_option('ead_width', '100%' );?>"></div>
41
- <div class="f-left middle"><label>Height</label> <input type="text" name="height" class="embedval input-small" id="ead_height" value="<?php echo get_option('ead_height', '500px' );?>"></div>
42
- <div class="f-left">
43
- <label><?php _e('Show Download Link','ead');?></label>
44
- <?php
45
- $downoptions= array('alluser' => __('For all users',$this->text_domain),'logged' => __('For Logged-in users',$this->text_domain),'none' => __('None',$this->text_domain));
46
- ead_selectbuilder('ead_download', $downoptions,esc_attr( get_option('ead_download')),'embed_download');
47
- ?>
48
- </div>
49
- <div class="clear"></div>
50
- </li>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
 
52
- <li>
53
- <label><?php _e('Shortcode Preview', 'ead'); ?></label>
54
- <textarea name="shortcode" style="width:100%" id="shortcode" readonly="readonly"></textarea>
55
- </li>
56
  </ul>
57
  </div>
58
- </div>
59
 
60
  <div class="mceActionPanel">
61
  <div style="float: right">
62
- <input type="button" id="insert_doc" name="insert" class="ead-btn button button-primary button-medium" value="<?php _e('Insert', 'ead'); ?>" disabled/>
63
  </div>
64
 
65
  <div style="float: left">
@@ -69,4 +84,4 @@
69
  </div>
70
  </div>
71
  </div>
72
- </div>
8
  <div class="section">
9
  <div id="embed_message" class="awsm-error" style="display:none;"><p></p></div>
10
  <div class="ead_container">
 
 
 
 
11
  <form action="" onSubmit="return false" method="post" enctype="multipart/form-data" id="Docuploader">
12
+ <ul class="ead-options">
13
+ <li><a href="#" id="upload_doc"><span><img src="<?php echo $this->plugin_url;?>images/icon-upload.png" alt="Upload document" /><?php _e('Upload Document','ead');?></span></a></li>
14
+ <li><a href="#" id="addDocUrl"><span><img src="<?php echo $this->plugin_url;?>images/icon-link.png" alt="Add From URL" /><?php _e('Add from URL','ead');?></span></a></li>
15
+ <li><?php echo $this->providerlink('ead_dropbox','DropBoxUpload','Dropbox') ;?></li>
16
+ <li><?php echo $this->providerlink(array('ead_drivekey','ead_driveClient'),'GooglePicker','Drive') ;?></li>
17
+ <li><?php echo $this->providerlink('ead_box','boxPicker','Box') ;?></li>
18
+ </ul>
19
+ <div class="box addurl_box">
20
  <label for="awsm_url"><?php _e('Enter document URL','ead');?></label>
21
  <input name="awsm_url" type="text" class="opt dwl input-group-text" id="awsm_url"/>
22
  <input type="button" value="Add URL" class="ead-btn button-primary input-group-btn" id="add_url"/>
23
+ <div class="clear"></div>
24
+ <a href="#" class="go-back">back</a>
25
+ </div>
26
  </form>
27
  </div><!--ead_container-->
28
  <div class="upload-success">
31
  <p id="ead_filename"></p>
32
  <span id="ead_filesize"></span>
33
  </div>
34
+ <!-- <a class="ead-btn button" id="adv_options"><?php _e('Advanced Options','ead');?></a> -->
35
  <div class="clear"></div>
36
+ </div>
37
+ <div class="advanced_options">
38
+ <h3>Advanced Options <span>(Leave blank for default settings)</span></h3>
39
+ <ul class="option-fields">
40
+ <li>
41
+ <div class="f-left"><label>Width</label> <input type="text" name="width" class="embedval input-small" id="ead_width" value="<?php echo get_option('ead_width', '100%' );?>"></div>
42
+ <div class="f-left"><label>Height</label> <input type="text" name="height" class="embedval input-small" id="ead_height" value="<?php echo get_option('ead_height', '500px' );?>"></div>
43
+ <div class="f-left" id="ead_downloadc">
44
+ <label><?php _e('Show Download Link','ead');?></label>
45
+ <?php
46
+ $downoptions= array('all' => __('For all users',$this->text_domain),'logged' => __('For Logged-in users',$this->text_domain),'none' => __('No Download',$this->text_domain));
47
+ ead_selectbuilder('ead_download', $downoptions,esc_attr( get_option('ead_download')),'ead_usc');
48
+ ?>
49
+ </div>
50
+ <div class="f-left last" id="new_provider">
51
+ <label><?php _e('Viewer','ead');?></label>
52
+ <?php
53
+ $providers = array('google' => __('Google Docs Viewer',$this->text_domain),'microsoft' => __('Microsoft Office Online',$this->text_domain));
54
+ ead_selectbuilder('ead_provider', $providers,esc_attr( get_option('ead_provider','google')),'ead_usc');
55
+ ?>
56
+ </div>
57
+ <div class="f-left last" id="ead_pseudo" style="display:none">
58
+ <label><?php _e('Viewer','ead');?></label>
59
+ <select name="ead_pseudo" disabled>
60
+ <option value="box">Box</option>
61
+ <option value="drive">Drive</option>
62
+ </select>
63
+ </div>
64
+ <div class="clear"></div>
65
+ </li>
66
 
67
+ <li>
68
+ <label><?php _e('Shortcode Preview', 'ead'); ?></label>
69
+ <textarea name="shortcode" style="width:100%" id="shortcode" readonly="readonly"></textarea>
70
+ </li>
71
  </ul>
72
  </div>
73
+ </div>
74
 
75
  <div class="mceActionPanel">
76
  <div style="float: right">
77
+ <input type="button" id="insert_doc" name="insert" data-txt="<?php _e('Insert', 'ead'); ?>" data-loading="<?php _e('Loading...', 'ead'); ?>" class="ead-btn button button-primary button-medium" value="<?php _e('Insert', 'ead'); ?>" disabled/>
78
  </div>
79
 
80
  <div style="float: left">
84
  </div>
85
  </div>
86
  </div>
87
+ </div>
inc/settings.php CHANGED
@@ -2,8 +2,9 @@
2
  <div class="wrap">
3
  <h2 class="ead-title"><?php _e('Embed Any Document by AWSM.in',$this->text_domain);?></h2>
4
  <h2 class="nav-tab-wrapper">
5
- <a class="nav-tab nav-tab-active" href="#" data-tab="general"><?php _e( 'General Settings', $this->text_domain); ?></a>
6
- <a class="nav-tab " href="#" data-tab="support"><?php _e( 'Support', $this->text_domain); ?></a>
 
7
  </h2>
8
  <div class="ead-left-wrap">
9
 
@@ -11,42 +12,6 @@
11
  <form method="post" action="options.php">
12
  <?php settings_fields( 'ead-settings-group' ); ?>
13
  <table class="form-table">
14
- <tr valign="top">
15
- <th scope="row"><?php _e('Embed Using',$this->text_domain);?></th>
16
- <td>
17
- <?php
18
- $providers= array('google' => __('Google Docs Viewer',$this->text_domain),'microsoft' => __('Microsoft Office Online',$this->text_domain));
19
- ead_selectbuilder('ead_provider', $providers,esc_attr( get_option('ead_provider','google')));
20
- ?>
21
- <div class="ead_supported">
22
- <span><?php _e('Supported file formats',$this->text_domain);?></span>
23
- <div class="supportedlist hidden" id="ead_google">
24
- <ul>
25
- <li><span class="ead-check"></span>Microsoft Word (docx, docm, dotm, dotx)</li>
26
- <li><span class="ead-check"></span>Microsoft Excel (xlsx, xlsb, xls, xlsm)</li>
27
- <li><span class="ead-check"></span>Microsoft PowerPoint (pptx, ppsx, ppt, pps, pptm, potm, ppam, potx, ppsm)</li>
28
- <li><span class="ead-check"></span>Adobe Portable Document Format (pdf)</li>
29
- <li><span class="ead-check"></span>Text files (txt)</li>
30
- <li><span class="ead-check"></span>TIFF Images (tif, tiff)</li>
31
- <li><span class="ead-check"></span>Adobe Illustrator (ai)</li>
32
- <li><span class="ead-check"></span>Scalable Vector Graphics (svg)</li>
33
- </ul>
34
- </div>
35
- <div class="supportedlist hidden" id="ead_microsoft">
36
- <ul>
37
- <li><span class="ead-check"></span>Microsoft Word (docx, docm, dotm, dotx)</li>
38
- <li><span class="ead-check"></span>Microsoft Excel (xlsx, xlsb, xls, xlsm)</li>
39
- <li><span class="ead-check"></span>Microsoft PowerPoint (pptx, ppsx, ppt, pps, pptm, potm, ppam, potx, ppsm)</li>
40
- <li><span class="ead-close"></span>Adobe Portable Document Format (pdf)</li>
41
- <li><span class="ead-close"></span>Text files (txt)</li>
42
- <li><span class="ead-close"></span>TIFF Images (tif, tiff)</li>
43
- <li><span class="ead-close"></span>Adobe Illustrator (ai)</li>
44
- <li><span class="ead-close"></span>Scalable Vector Graphics (svg)</li>
45
- </ul>
46
- </div>
47
- </div>
48
- </td>
49
- </tr>
50
  <tr valign="top">
51
  <th scope="row"><?php _e('Default Size', $this->text_domain); ?></th>
52
  <td>
@@ -65,7 +30,7 @@
65
  <th scope="row"><?php _e('Show Download Link',$this->text_domain);?></th>
66
  <td>
67
  <?php
68
- $downoptions= array('alluser' => __('For all users',$this->text_domain),'logged' => __('For Logged-in users',$this->text_domain),'none' => __('None',$this->text_domain));
69
  ead_selectbuilder('ead_download', $downoptions,esc_attr( get_option('ead_download','none')));
70
  ?>
71
  </td>
@@ -111,6 +76,8 @@
111
  </div><!-- #support-->
112
  </div><!-- .ead-left-wrap -->
113
  <div class="ead-right-wrap">
 
 
114
  <a href="http://awsm.in" target="_blank" title="AWSM Innovations"><img src="http://awsm.in/innovations/ead/logo.png" alt="AWSM!"></a>
115
  <div class="author-info">
116
  This plugin is developed <br/>by <a href="http://awsm.in" target="_blank" title="AWSM Innovations">AWSM Innovations.</a>
@@ -121,24 +88,6 @@
121
  <li><a href="https://github.com/awsmin" target="_blank" title="AWSM Innovations"><span class="awsm-icon awsm-icon-github">Github</span></a></li>
122
  <li><a href="https://www.behance.net/awsmin" target="_blank" title="AWSM Innovations"><span class="awsm-icon awsm-icon-behance">Behance</span></a></li>
123
  </ul>
124
- <div class="paypal">
125
- <p>Liked the plugin? You can support our Open Source projects with a donation</p>
126
-
127
- <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
128
- <input type="hidden" name="cmd" value="_xclick">
129
- <input type="hidden" name="business" value="pay@fidiz.com">
130
- <input type="hidden" name="lc" value="IN">
131
- <input type="hidden" name="item_name" value="Donation For Embed Any Document">
132
- <input type="hidden" name="currency_code" value="USD">
133
- <input type="hidden" name="button_subtype" value="services">
134
- <input type="hidden" name="no_note" value="0">
135
- <input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHostedGuest">
136
- <span class="ead_doller">$</span><input type="text" name="amount" value="10.00" class="small">
137
- <input type='hidden' name='cancel_return' value='<?php echo admin_url('options-general.php?page='.$this->settings_slug);?>'>
138
- <input type='hidden' name='return' value='http://awsm.in/paypal/thankyou'>
139
- <input type="image" src="<?php echo $this->plugin_url . 'images/donate.gif';?>" border="0" name="submit" alt="PayPal – The safer, easier way to pay online.">
140
- <img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1">
141
- </form>
142
  </div>
143
  </div><!-- .ead-right-wrap -->
144
  <div class="clear"></div>
@@ -146,9 +95,9 @@
146
  <script type="text/javascript">
147
  jQuery(document).ready(function ($) {
148
 
149
- jQuery( ".nav-tab" ).click(function(event) {
150
  event.preventDefault();
151
- $('.nav-tab').removeClass('nav-tab-active');
152
  $(this).addClass('nav-tab-active');
153
  var tab = '#'+ $(this).data('tab');
154
  $(".tabs").hide();
2
  <div class="wrap">
3
  <h2 class="ead-title"><?php _e('Embed Any Document by AWSM.in',$this->text_domain);?></h2>
4
  <h2 class="nav-tab-wrapper">
5
+ <a class="ead-tabs nav-tab nav-tab-active" href="#" data-tab="general"><?php _e( 'General Settings', $this->text_domain); ?></a>
6
+ <a class="ead-tabs nav-tab " href="#" data-tab="support"><?php _e( 'Support', $this->text_domain); ?></a>
7
+ <a class="nav-tab " href="http://goo.gl/wJTQlc" target="_blank"><?php _e( 'Get Plus Version', $this->text_domain); ?></a>
8
  </h2>
9
  <div class="ead-left-wrap">
10
 
12
  <form method="post" action="options.php">
13
  <?php settings_fields( 'ead-settings-group' ); ?>
14
  <table class="form-table">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  <tr valign="top">
16
  <th scope="row"><?php _e('Default Size', $this->text_domain); ?></th>
17
  <td>
30
  <th scope="row"><?php _e('Show Download Link',$this->text_domain);?></th>
31
  <td>
32
  <?php
33
+ $downoptions= array('alluser' => __('For all users',$this->text_domain),'logged' => __('For Logged-in users',$this->text_domain),'none' => __('No Download',$this->text_domain));
34
  ead_selectbuilder('ead_download', $downoptions,esc_attr( get_option('ead_download','none')));
35
  ?>
36
  </td>
76
  </div><!-- #support-->
77
  </div><!-- .ead-left-wrap -->
78
  <div class="ead-right-wrap">
79
+ <a href="http://goo.gl/wJTQlc" target="_blank" title="Embed Any Document Plus"><img src="http://awsm.in/innovations/ead/ead-plus-banner.png" alt="AWSM!"></a>
80
+ <div class="ead-right-inner">
81
  <a href="http://awsm.in" target="_blank" title="AWSM Innovations"><img src="http://awsm.in/innovations/ead/logo.png" alt="AWSM!"></a>
82
  <div class="author-info">
83
  This plugin is developed <br/>by <a href="http://awsm.in" target="_blank" title="AWSM Innovations">AWSM Innovations.</a>
88
  <li><a href="https://github.com/awsmin" target="_blank" title="AWSM Innovations"><span class="awsm-icon awsm-icon-github">Github</span></a></li>
89
  <li><a href="https://www.behance.net/awsmin" target="_blank" title="AWSM Innovations"><span class="awsm-icon awsm-icon-behance">Behance</span></a></li>
90
  </ul>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  </div>
92
  </div><!-- .ead-right-wrap -->
93
  <div class="clear"></div>
95
  <script type="text/javascript">
96
  jQuery(document).ready(function ($) {
97
 
98
+ jQuery( ".ead-tabs" ).click(function(event) {
99
  event.preventDefault();
100
+ $('.ead-tabs').removeClass('nav-tab-active');
101
  $(this).addClass('nav-tab-active');
102
  var tab = '#'+ $(this).data('tab');
103
  $(".tabs").hide();
inc/support-mail.php CHANGED
@@ -23,7 +23,7 @@ if ( 'POST' == $_SERVER['REQUEST_METHOD']) {
23
  </table>';
24
  add_filter('wp_mail_content_type',create_function('', 'return "text/html"; '));
25
  $tomail='hello@awsm.in';
26
- $subject = "[EAD] Support Request From ". get_option('blogname');
27
  $headers = "Reply-To: <" . $email_id . ">\n";
28
  if (wp_mail( $tomail, $subject, $mailmessage, $headers )) {
29
  $json['status'] = true;
23
  </table>';
24
  add_filter('wp_mail_content_type',create_function('', 'return "text/html"; '));
25
  $tomail='hello@awsm.in';
26
+ $subject = "[EAD-free] Support Request From ". get_option('blogname');
27
  $headers = "Reply-To: <" . $email_id . ">\n";
28
  if (wp_mail( $tomail, $subject, $mailmessage, $headers )) {
29
  $json['status'] = true;
js/embed.js CHANGED
@@ -1,174 +1,298 @@
1
- jQuery(document).ready(function ($) {
2
- var $popup = $('#embed-popup'),
3
- $wrap = $('#embed-popup-wrap'),
4
- $embedurl = $('#awsm_url'),
5
- $shortcode = $('#shortcode');
6
- $message = $('#embed_message p');
7
- $ActionPanel = $('.mceActionPanel');
8
- $container = $('.ead_container');
9
- var fileurl="";
10
- //Opens Embed popup
11
- $('body').on('click', '.awsm-embed', function (e) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  ead_reset();
13
- e.preventDefault();
14
- $wrap.show();
15
- window.embed_target = $(this).data('target');
16
- $(this).magnificPopup({
17
- type: 'inline',
18
- alignTop: true,
19
- callbacks: {
20
- open: function () {
21
- // Change z-index
22
- $('body').addClass('mfp-shown');
23
- // Save selection
24
- mce_selection = (typeof tinyMCE !== 'undefined' && tinyMCE.activeEditor != null && tinyMCE.activeEditor.hasOwnProperty('selection')) ? tinyMCE.activeEditor.selection.getContent({
25
- format: "text"
26
- }) : '';
27
- },
28
- close: function () {
29
- // Remove narrow class
30
- $popup.removeClass('generator-narrow');
31
- // Clear selection
32
- mce_selection = '';
33
- // Change z-index
34
- $('body').removeClass('mfp-shown');
35
- }
36
- }
37
- }).magnificPopup('open');
38
- });
39
- //Update shortcode on change
40
- $( ".embed_download" ).change(function() {
41
- updateshortcode();
42
- });
43
- $('.embedval').blur(function(){
44
- updateshortcode();
45
- });
46
-
47
- //Tabs Support
48
- $('ul.tabs').delegate('li:not(.current)', 'click', function () {
49
- $(this).addClass('current').siblings().removeClass('current')
50
- .parents('div.section').find('div.box').eq($(this).index()).fadeIn(150).siblings('div.box').hide();
 
 
 
 
 
 
 
 
51
  });
52
 
53
- //Toggle advanced options
54
- $("#adv_options").click(function(){
55
- $(".advanced_options").toggle();
56
- });
57
  //Wordpress Uploader
58
  $('#upload_doc').click(open_media_window);
59
 
60
- //Insert Media window
61
- function open_media_window() {
62
- if (this.window === undefined) {
63
- this.window = wp.media({
 
64
  title: 'Embed Any Documet',
65
  multiple: false,
66
  library: {
67
- type: emebeder.validtypes,
68
- },
69
- button: {text: 'Insert'}
 
 
70
  });
71
-
72
- var self = this; // Needed to retrieve our variable in the anonymous function below
73
- this.window.on('select', function() {
74
  var file = self.window.state().get('selection').first().toJSON();
75
- fileurl=file.url;
76
- $shortcode.text(getshortcode(file.url));
77
- uploaddetails(file);
78
  });
79
- }
80
- this.window.open();
81
- return false;
 
 
 
 
 
 
 
 
82
  }
 
83
  //to getshortcode
84
- function getshortcode(url){
85
- var height=$('#ead_height').val(),width=$('#ead_width').val(),download=$('#ead_download').val(),heightstr="",widthstr="",downloadstr="";
86
- if(height!=emebeder.default_height) { heightstr = ' height="'+height+'"'; }
87
- if(width!=emebeder.default_width) { widthstr = ' width="'+width+'"'; }
88
- if(download!=emebeder.download) { downloadstr = ' download="'+download+'"'; }
89
- return '[embeddoc url="' + url + '"' + widthstr + heightstr + downloadstr +']';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
 
 
 
 
 
 
 
 
 
 
 
91
  }
 
92
  //Print uploaded file details
93
- function uploaddetails(file){
94
  $('#insert_doc').removeAttr('disabled');
95
- $('#ead_filename').html(file.filename)
96
- $('#ead_filesize').html(file.filesizeHumanReadable);
97
- $('.upload-success').fadeIn();
 
 
 
 
98
  $container.hide();
 
99
  }
 
100
  //Add url
101
  $('#add_url').click(awsm_embded_url);
102
- function awsm_embded_url(){
103
- var checkurl = $embedurl.val();
104
- if (checkurl!='') {
105
- validateurl(checkurl);
106
- } else {
107
- $embedurl.addClass('urlerror');
108
- updateshortcode();
109
- }
110
-
 
111
  }
 
112
  //Validate file url
113
- function validateurl(url){
 
114
  $('#embed_message').hide();
115
  $('#add_url').val(emebeder.verify);
116
- $.ajax({
117
- type: 'POST',
118
- url: emebeder.ajaxurl,
119
- dataType: 'json',
120
- data: { action: 'validateurl',
121
- furl:url },
122
- success: function(data) {
123
- if(data.status){
124
- $embedurl.removeClass('urlerror');
125
- fileurl =url;
126
- updateshortcode();
127
- uploaddetails(data.file);
128
- }else{
129
- showmsg(data.message);
130
- }
131
- $('#add_url').val(emebeder.addurl);
132
- },
133
- });
134
  }
 
135
  //Show Message
136
- function showmsg(msg){
137
  $('#embed_message').fadeIn();
138
- $message.text(msg);
139
  }
 
140
  //insert Shortcode
141
  $('#insert_doc').click(awsm_shortcode);
142
- function awsm_shortcode(){
143
- if(fileurl){
144
- wp.media.editor.insert($shortcode.text());
145
- $.magnificPopup.close();
146
- }else{
147
- showmsg(emebeder.nocontent);
148
- }
149
-
150
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
151
  //Update ShortCode
152
- function updateshortcode(){
153
- if(fileurl){
154
- $shortcode.text(getshortcode(fileurl));
155
- }else{
156
- $shortcode.text('');
157
- }
 
158
  }
159
- // Close Embed dialog
160
- $('#embed-popup').on('click', '.cancel_embed', function (e) {
161
- // Close popup
162
- $.magnificPopup.close();
163
- // Prevent default action
164
- e.preventDefault();
165
- });
166
- function ead_reset(){
167
- $container.show();
168
- $embedurl.val('');
169
- $('.upload-success').hide();
170
- $(".advanced_options").hide();
171
- $('#embed_message').hide();
172
- $('#insert_doc').attr('disabled','disabled');
173
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
  });
1
+ jQuery(document).ready(function($) {
2
+ var $popup = $('#embed-popup'),
3
+ $wrap = $('#embed-popup-wrap'),
4
+ $embedurl = $('#awsm_url'),
5
+ $shortcode = $('#shortcode'),
6
+ $message = $('#embed_message p'),
7
+ $ActionPanel = $('.mceActionPanel'),
8
+ $container = $('.ead_container'),
9
+ fileurl = "",
10
+ newprovider = "",
11
+ msextension = emebeder.msextension,
12
+ drextension = emebeder.drextension;
13
+
14
+ //Reset form data
15
+ function ead_reset() {
16
+ $container.show();
17
+ $embedurl.val('');
18
+ $('.ead-options').fadeIn();
19
+ $('.addurl_box').hide();
20
+ $('.upload-success').hide();
21
+ $('#embed_message').hide();
22
+ $('#insert_doc').attr('disabled', 'disabled');
23
+ $('#new_provider').show();
24
+ $('#ead_pseudo').hide();
25
+ newprovider = "";
26
+ $("#new_provider option[value='microsoft']").attr('disabled', false);
27
+ $('#ead_downloadc').show();
28
+ }
29
+
30
+ //Opens Embed popup
31
+ $('body').on('click', '.awsm-embed', function(e) {
32
  ead_reset();
33
+ e.preventDefault();
34
+ $wrap.show();
35
+ window.embed_target = $(this).data('target');
36
+ $(this).magnificPopup({
37
+ type: 'inline',
38
+ alignTop: false,
39
+ callbacks: {
40
+ open: function() {
41
+ // Change z-index
42
+ $('body').addClass('mfp-shown ead-popon');
43
+ // Save selection
44
+ mce_selection = (typeof tinyMCE !== 'undefined' && tinyMCE.activeEditor !== null && tinyMCE.activeEditor.hasOwnProperty('selection')) ? tinyMCE.activeEditor.selection.getContent({
45
+ format: "text"
46
+ }) : '';
47
+ },
48
+ close: function() {
49
+ // Remove narrow class
50
+ $popup.removeClass('generator-narrow');
51
+ // Clear selection
52
+ mce_selection = '';
53
+ // Change z-index
54
+ $('body').removeClass('mfp-shown ead-popon');
55
+ }
56
+ }
57
+ }).magnificPopup('open');
58
+ });
59
+
60
+ //sanitize width and height
61
+ function sanitize(dim) {
62
+ if (dim.indexOf("%") == -1) {
63
+ dim = dim.replace(/[^0-9]/g, '');
64
+ dim += "px";
65
+ } else {
66
+ dim = dim.replace(/[^0-9]/g, '');
67
+ dim += "%";
68
+ }
69
+
70
+ return dim;
71
+ }
72
+ //Update shortcode on change
73
+ $(".ead_usc").change(function() {
74
+ newprovider = "";
75
+ updateshortcode($(this).attr('id'));
76
+ });
77
+ $('.embedval').keyup(function() {
78
+ updateshortcode($(this).attr('id'));
79
  });
80
 
 
 
 
 
81
  //Wordpress Uploader
82
  $('#upload_doc').click(open_media_window);
83
 
84
+ //Insert Media window
85
+ function open_media_window() {
86
+ var uClass = 'upload';
87
+ if (this.window === undefined) {
88
+ this.window = wp.media({
89
  title: 'Embed Any Documet',
90
  multiple: false,
91
  library: {
92
+ type: emebeder.validtypes,
93
+ },
94
+ button: {
95
+ text: 'Insert'
96
+ }
97
  });
98
+
99
+ var self = this; // Needed to retrieve our variable in the anonymous function below
100
+ this.window.on('select', function() {
101
  var file = self.window.state().get('selection').first().toJSON();
102
+ updateprovider(file, uClass);
 
 
103
  });
104
+ }
105
+ this.window.open();
106
+ return false;
107
+ }
108
+
109
+ //update provider
110
+ function updateprovider(file, uClass) {
111
+ fileurl = file.url;
112
+ validViewer(file, uClass);
113
+ updateshortcode();
114
+ uploaddetails(file, uClass);
115
  }
116
+
117
  //to getshortcode
118
+ function getshortcode(url, item) {
119
+ var height = sanitize($('#ead_height').val()),
120
+ width = sanitize($('#ead_width').val()),
121
+ download = $('#ead_download').val(),
122
+ provider = $('#ead_provider').val(),
123
+ heightstr = "",
124
+ widthstr = "",
125
+ downloadstr = "",
126
+ providerstr = "",
127
+ drivestr = "";
128
+ if (itemcheck('height', item)) {
129
+ heightstr = ' height="' + height + '"';
130
+ }
131
+ if (itemcheck('width', item)) {
132
+ widthstr = ' width="' + width + '"';
133
+ }
134
+ if (itemcheck('download', item)) {
135
+ downloadstr = ' download="' + download + '"';
136
+ }
137
+ if (itemcheck('provider', item)) {
138
+ providerstr = ' viewer="' + provider + '"';
139
+ }
140
+ if (newprovider) {
141
+ providerstr = ' viewer="' + newprovider + '"';
142
+ }
143
+ return '[embeddoc url="' + url + '"' + widthstr + heightstr + downloadstr + providerstr + drivestr + ']';
144
+
145
+ }
146
 
147
+ // Checks with default setting value
148
+ function itemcheck(item, dataitem) {
149
+ var check = $('#ead_' + item).val();
150
+ var datacheck = 'ead_' + item;
151
+ if (datacheck == dataitem) {
152
+ return true;
153
+ } else if (check != emebeder[item]) {
154
+ return true;
155
+ }
156
+ return false;
157
  }
158
+
159
  //Print uploaded file details
160
+ function uploaddetails(file, uClass) {
161
  $('#insert_doc').removeAttr('disabled');
162
+ $('#ead_filename').html(file.filename);
163
+ if (file.filesizeHumanReadable) {
164
+ $('#ead_filesize').html(file.filesizeHumanReadable);
165
+ } else {
166
+ $('#ead_filesize').html('&nbsp;');
167
+ }
168
+ $('.upload-success').fadeIn();
169
  $container.hide();
170
+ UploadClass(uClass);
171
  }
172
+
173
  //Add url
174
  $('#add_url').click(awsm_embded_url);
175
+
176
+ function awsm_embded_url() {
177
+ var checkurl = $embedurl.val();
178
+ if (checkurl !== '') {
179
+ validateurl(checkurl);
180
+ } else {
181
+ $embedurl.addClass('urlerror');
182
+ updateshortcode();
183
+ }
184
+
185
  }
186
+
187
  //Validate file url
188
+ function validateurl(url) {
189
+ var uClass = 'link';
190
  $('#embed_message').hide();
191
  $('#add_url').val(emebeder.verify);
192
+ $.ajax({
193
+ type: 'POST',
194
+ url: emebeder.ajaxurl,
195
+ dataType: 'json',
196
+ data: {
197
+ action: 'validateurl',
198
+ furl: url
199
+ },
200
+ success: function(data) {
201
+ if (data.status) {
202
+ $embedurl.removeClass('urlerror');
203
+ updateprovider(data.file, uClass);
204
+ } else {
205
+ showmsg(data.message);
206
+ }
207
+ $('#add_url').val(emebeder.addurl);
208
+ },
209
+ });
210
  }
211
+
212
  //Show Message
213
+ function showmsg(msg) {
214
  $('#embed_message').fadeIn();
215
+ $message.text(msg);
216
  }
217
+
218
  //insert Shortcode
219
  $('#insert_doc').click(awsm_shortcode);
220
+
221
+ function awsm_shortcode() {
222
+ if (fileurl) {
223
+ wp.media.editor.insert($shortcode.text());
224
+ $.magnificPopup.close();
225
+ } else {
226
+ showmsg(emebeder.nocontent);
227
+ }
228
  }
229
+
230
+ // Add from URL support
231
+ $('#addDocUrl').on('click', function(e) {
232
+ e.preventDefault();
233
+ $('.addurl_box').fadeIn();
234
+ $('.ead-options').hide();
235
+ });
236
+
237
+ //Add fromrom URL cancel handler
238
+ $('.go-back').on('click', function(e) {
239
+ e.preventDefault();
240
+ $('.addurl_box').hide();
241
+ $('.ead-options').fadeIn();
242
+ });
243
+
244
  //Update ShortCode
245
+ function updateshortcode(item) {
246
+ item = typeof item !== 'undefined' ? item : false;
247
+ if (fileurl) {
248
+ $shortcode.text(getshortcode(fileurl, item));
249
+ } else {
250
+ $shortcode.text('');
251
+ }
252
  }
253
+
254
+ // Close embed dialog
255
+ $('#embed-popup').on('click', '.cancel_embed', function(e) {
256
+ // Close popup
257
+ $.magnificPopup.close();
258
+ // Prevent default action
259
+ e.preventDefault();
260
+ });
261
+
262
+ //UploadClass
263
+ function UploadClass(uPclass) {
264
+ $(".uploaded-doccument").removeClass("ead-link ead-upload ead-dropbox ead-drive ead-box");
265
+ $('.uploaded-doccument').addClass('ead-' + uPclass);
 
266
  }
267
+
268
+ //Convert Filesize to human Readable filesize
269
+ function humanFileSize(bytes) {
270
+ var thresh = 1024;
271
+ if (bytes < thresh) return bytes + ' B';
272
+ var units = ['KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
273
+ var u = -1;
274
+ do {
275
+ bytes /= thresh;
276
+ ++u;
277
+ } while (bytes >= thresh);
278
+ return bytes.toFixed(1) + ' ' + units[u];
279
+ }
280
+ // Viewer Check
281
+ function validViewer(file, provider) {
282
+ var cprovider = ["link", "upload"];
283
+ var validext = msextension.split(',');
284
+ var ext = '.' + file.filename.split('.').pop();
285
+ $("#new_provider option[value='microsoft']").attr('disabled', false);
286
+ if ($.inArray(provider, cprovider) != -1) {
287
+ if ($.inArray(ext, validext) == -1) {
288
+ newprovider = "google";
289
+ $("#new_provider option[value='google']").attr("selected", "selected");
290
+ $("#new_provider option[value='microsoft']").attr('disabled', true);
291
+ } else {
292
+ newprovider = "microsoft";
293
+ $("#new_provider option[value='microsoft']").attr("selected", "selected");
294
+ }
295
+ }
296
+ }
297
+
298
  });
language/ead-en.mo ADDED
Binary file
language/ead-en.po ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Embed Any Document\n"
4
+ "POT-Creation-Date: 2014-12-31 14:58+0530\n"
5
+ "PO-Revision-Date: 2014-12-31 14:58+0530\n"
6
+ "Last-Translator: \n"
7
+ "Language-Team: Awsm Innovations <hello@awsm.in>\n"
8
+ "Language: en\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.6.10\n"
13
+ "X-Poedit-Basepath: .\n"
14
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
+ "X-Poedit-SourceCharset: UTF-8\n"
16
+ "X-Poedit-KeywordsList: __;_e\n"
17
+ "X-Poedit-SearchPath-0: .\n"
18
+ "X-Poedit-SearchPath-1: ..\n"
19
+
20
+ #: ../aswm-embed.php:81 ../inc/popup.php:6
21
+ msgid "Add Document"
22
+ msgstr ""
23
+
24
+ #: ../aswm-embed.php:106
25
+ msgid "Settings"
26
+ msgstr ""
27
+
28
+ #: ../aswm-embed.php:133
29
+ msgid "Nothing to insert"
30
+ msgstr ""
31
+
32
+ #: ../aswm-embed.php:134
33
+ msgid "Add URL"
34
+ msgstr ""
35
+
36
+ #: ../aswm-embed.php:135
37
+ msgid "Verifying..."
38
+ msgstr ""
39
+
40
+ #: ../aswm-embed.php:184
41
+ msgid "Download"
42
+ msgstr ""
43
+
44
+ #: ../aswm-embed.php:207
45
+ msgid "No Url Found"
46
+ msgstr ""
47
+
48
+ #: ../aswm-embed.php:221 ../aswm-embed.php:248
49
+ msgid "You do not have sufficient permissions to access this page."
50
+ msgstr ""
51
+
52
+ #: ../aswm-embed.php:281
53
+ msgid "Buy Pro Version"
54
+ msgstr ""
55
+
56
+ #: ../aswm-embed.php:283
57
+ msgid "Add from "
58
+ msgstr ""
59
+
60
+ #: ../inc/functions.php:89 ../inc/functions.php:126
61
+ msgid "Done"
62
+ msgstr ""
63
+
64
+ #: ../inc/functions.php:94
65
+ msgid "Document"
66
+ msgstr ""
67
+
68
+ #: ../inc/functions.php:102
69
+ msgid "File format is not supported."
70
+ msgstr ""
71
+
72
+ #: ../inc/functions.php:109
73
+ msgid "Sorry, the file URL is not valid."
74
+ msgstr ""
75
+
76
+ #: ../inc/functions.php:129
77
+ msgid "The document you have chosen is a not public."
78
+ msgstr ""
79
+
80
+ #: ../inc/functions.php:129
81
+ msgid ""
82
+ " Only the owner and explicitly shared collaborators will be able to view it."
83
+ msgstr ""
84
+
85
+ #: ../inc/popup.php:13
86
+ msgid "Upload Document"
87
+ msgstr ""
88
+
89
+ #: ../inc/popup.php:14
90
+ msgid "Add from URL"
91
+ msgstr ""
92
+
93
+ #: ../inc/popup.php:20
94
+ msgid "Enter document URL"
95
+ msgstr ""
96
+
97
+ #: ../inc/popup.php:34
98
+ msgid "Advanced Options"
99
+ msgstr ""
100
+
101
+ #: ../inc/popup.php:44 ../inc/settings.php:30
102
+ msgid "Show Download Link"
103
+ msgstr ""
104
+
105
+ #: ../inc/popup.php:46 ../inc/settings.php:33
106
+ msgid "For all users"
107
+ msgstr ""
108
+
109
+ #: ../inc/popup.php:46 ../inc/settings.php:33
110
+ msgid "For Logged-in users"
111
+ msgstr ""
112
+
113
+ #: ../inc/popup.php:46 ../inc/settings.php:33
114
+ msgid "No Download"
115
+ msgstr ""
116
+
117
+ #: ../inc/popup.php:51 ../inc/popup.php:58
118
+ msgid "Viewer"
119
+ msgstr ""
120
+
121
+ #: ../inc/popup.php:53
122
+ msgid "Google Docs Viewer"
123
+ msgstr ""
124
+
125
+ #: ../inc/popup.php:53
126
+ msgid "Microsoft Office Online"
127
+ msgstr ""
128
+
129
+ #: ../inc/popup.php:68
130
+ msgid "Shortcode Preview"
131
+ msgstr ""
132
+
133
+ #: ../inc/popup.php:77
134
+ msgid "Insert"
135
+ msgstr ""
136
+
137
+ #: ../inc/popup.php:77
138
+ msgid "Loading..."
139
+ msgstr ""
140
+
141
+ #: ../inc/popup.php:81
142
+ msgid "Cancel"
143
+ msgstr ""
144
+
145
+ #: ../inc/settings.php:3
146
+ msgid "Embed Any Document by AWSM.in"
147
+ msgstr ""
148
+
149
+ #: ../inc/settings.php:5
150
+ msgid "General Settings"
151
+ msgstr ""
152
+
153
+ #: ../inc/settings.php:6
154
+ msgid "Support"
155
+ msgstr ""
156
+
157
+ #: ../inc/settings.php:7
158
+ msgid "Get Plus Version"
159
+ msgstr ""
160
+
161
+ #: ../inc/settings.php:16
162
+ msgid "Default Size"
163
+ msgstr ""
164
+
165
+ #: ../inc/settings.php:18
166
+ msgid "Width"
167
+ msgstr ""
168
+
169
+ #: ../inc/settings.php:22
170
+ msgid "Height"
171
+ msgstr ""
172
+
173
+ #: ../inc/settings.php:26
174
+ msgid "Enter values in pixels or percentage (Example: 500px or 100%)"
175
+ msgstr ""
176
+
177
+ #: ../inc/settings.php:48
178
+ msgid "Name"
179
+ msgstr ""
180
+
181
+ #: ../inc/settings.php:52
182
+ msgid "Email ID"
183
+ msgstr ""
184
+
185
+ #: ../inc/settings.php:56
186
+ msgid "Problem"
187
+ msgstr ""
188
+
189
+ #: ../inc/settings.php:60
190
+ msgid "Submit"
191
+ msgstr ""
192
+
193
+ #: ../inc/support-mail.php:8
194
+ msgid "Please Fill Required Fields"
195
+ msgstr ""
196
+
197
+ #: ../inc/support-mail.php:30
198
+ msgid "We will get back to you soon"
199
+ msgstr ""
200
+
201
+ #: ../inc/support-mail.php:33
202
+ msgid "Something went wrong"
203
+ msgstr ""
204
+
205
+ #: ../inc/support-mail.php:38
206
+ msgid "Cheating ?"
207
+ msgstr ""
language/ead.pot CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Embed Any Document\n"
4
- "POT-Creation-Date: 2014-11-07 14:45+0530\n"
5
- "PO-Revision-Date: 2014-11-07 14:45+0530\n"
6
  "Last-Translator: \n"
7
  "Language-Team: Awsm Innovations <hello@awsm.in>\n"
8
  "Language: en\n"
@@ -10,185 +10,198 @@ msgstr ""
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "X-Generator: Poedit 1.6.10\n"
13
-
14
- #: aswm-embed.php:77
15
- #: inc/popup.php:6
 
 
 
 
 
16
  msgid "Add Document"
17
  msgstr ""
18
 
19
- #: aswm-embed.php:102
20
  msgid "Settings"
21
  msgstr ""
22
 
23
- #: aswm-embed.php:111
24
- #: aswm-embed.php:156
25
- #: aswm-embed.php:174
26
- #: aswm-embed.php:185
27
- msgid "You do not have sufficient permissions to access this page."
28
- msgstr ""
29
-
30
- #: aswm-embed.php:129
31
  msgid "Nothing to insert"
32
  msgstr ""
33
 
34
- #: aswm-embed.php:130
35
  msgid "Add URL"
36
  msgstr ""
37
 
38
- #: aswm-embed.php:131
39
  msgid "Verifying..."
40
  msgstr ""
41
 
42
- #: inc/functions.php:87
43
  msgid "Download"
44
  msgstr ""
45
 
46
- #: inc/functions.php:105
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  msgid "Done"
48
  msgstr ""
49
 
50
- #: inc/functions.php:110
51
  msgid "Document"
52
  msgstr ""
53
 
54
- #: inc/functions.php:115
55
  msgid "File format is not supported."
56
  msgstr ""
57
 
58
- #: inc/functions.php:120
59
- msgid "Not a valid URL. Please try again."
60
  msgstr ""
61
 
62
- #: inc/functions.php:127
63
- msgid "Sorry, the file URL is not valid."
64
  msgstr ""
65
 
66
- #: inc/functions.php:175
67
- msgid "No Url Found"
 
68
  msgstr ""
69
 
70
- #: inc/popup.php:12
71
- msgid "Upload and Embed"
72
  msgstr ""
73
 
74
- #: inc/popup.php:13
75
- msgid "Add From URL"
76
  msgstr ""
77
 
78
- #: inc/popup.php:21
79
  msgid "Enter document URL"
80
  msgstr ""
81
 
82
- #: inc/popup.php:33
83
  msgid "Advanced Options"
84
  msgstr ""
85
 
86
- #: inc/popup.php:43
87
- #: inc/settings.php:38
88
  msgid "Show Download Link"
89
  msgstr ""
90
 
91
- #: inc/popup.php:45
92
- #: inc/settings.php:41
93
  msgid "For all users"
94
  msgstr ""
95
 
96
- #: inc/popup.php:45
97
- #: inc/settings.php:41
98
  msgid "For Logged-in users"
99
  msgstr ""
100
 
101
- #: inc/popup.php:45
102
- #: inc/settings.php:41
103
- msgid "None"
 
 
 
 
 
 
 
 
 
 
 
104
  msgstr ""
105
 
106
- #: inc/popup.php:53
107
  msgid "Shortcode Preview"
108
  msgstr ""
109
 
110
- #: inc/popup.php:62
111
  msgid "Insert"
112
  msgstr ""
113
 
114
- #: inc/popup.php:66
 
 
 
 
115
  msgid "Cancel"
116
  msgstr ""
117
 
118
- #: inc/settings.php:3
119
  msgid "Embed Any Document by AWSM.in"
120
  msgstr ""
121
 
122
- #: inc/settings.php:5
123
  msgid "General Settings"
124
  msgstr ""
125
 
126
- #: inc/settings.php:6
127
  msgid "Support"
128
  msgstr ""
129
 
130
- #: inc/settings.php:15
131
- msgid "Embed Using"
132
  msgstr ""
133
 
134
- #: inc/settings.php:18
135
- msgid "Google Docs Viewer"
136
- msgstr ""
137
-
138
- #: inc/settings.php:18
139
- msgid "Microsoft Office Online"
140
- msgstr ""
141
-
142
- #: inc/settings.php:24
143
  msgid "Default Size"
144
  msgstr ""
145
 
146
- #: inc/settings.php:26
147
  msgid "Width"
148
  msgstr ""
149
 
150
- #: inc/settings.php:30
151
  msgid "Height"
152
  msgstr ""
153
 
154
- #: inc/settings.php:34
155
- msgid "Enter values in pixels or percentage (Example: 300px or 100%)"
156
  msgstr ""
157
 
158
- #: inc/settings.php:55
159
  msgid "Name"
160
  msgstr ""
161
 
162
- #: inc/settings.php:62
163
  msgid "Email ID"
164
  msgstr ""
165
 
166
- #: inc/settings.php:69
167
  msgid "Problem"
168
  msgstr ""
169
 
170
- #: inc/settings.php:77
171
  msgid "Submit"
172
  msgstr ""
173
 
174
- #: inc/support-mail.php:8
175
  msgid "Please Fill Required Fields"
176
  msgstr ""
177
 
178
- #: inc/support-mail.php:30
179
  msgid "We will get back to you soon"
180
  msgstr ""
181
 
182
- #: inc/support-mail.php:33
183
  msgid "Something went wrong"
184
  msgstr ""
185
 
186
- #: inc/support-mail.php:38
187
  msgid "Cheating ?"
188
  msgstr ""
189
-
190
- #: inc/functions.php:180
191
- msgid "File Not Found"
192
- msgstr ""
193
-
194
-
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Embed Any Document\n"
4
+ "POT-Creation-Date: 2014-12-31 14:58+0530\n"
5
+ "PO-Revision-Date: 2014-12-31 14:58+0530\n"
6
  "Last-Translator: \n"
7
  "Language-Team: Awsm Innovations <hello@awsm.in>\n"
8
  "Language: en\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "X-Generator: Poedit 1.6.10\n"
13
+ "X-Poedit-Basepath: .\n"
14
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
+ "X-Poedit-SourceCharset: UTF-8\n"
16
+ "X-Poedit-KeywordsList: __;_e\n"
17
+ "X-Poedit-SearchPath-0: .\n"
18
+ "X-Poedit-SearchPath-1: ..\n"
19
+
20
+ #: ../aswm-embed.php:81 ../inc/popup.php:6
21
  msgid "Add Document"
22
  msgstr ""
23
 
24
+ #: ../aswm-embed.php:106
25
  msgid "Settings"
26
  msgstr ""
27
 
28
+ #: ../aswm-embed.php:133
 
 
 
 
 
 
 
29
  msgid "Nothing to insert"
30
  msgstr ""
31
 
32
+ #: ../aswm-embed.php:134
33
  msgid "Add URL"
34
  msgstr ""
35
 
36
+ #: ../aswm-embed.php:135
37
  msgid "Verifying..."
38
  msgstr ""
39
 
40
+ #: ../aswm-embed.php:184
41
  msgid "Download"
42
  msgstr ""
43
 
44
+ #: ../aswm-embed.php:207
45
+ msgid "No Url Found"
46
+ msgstr ""
47
+
48
+ #: ../aswm-embed.php:221 ../aswm-embed.php:248
49
+ msgid "You do not have sufficient permissions to access this page."
50
+ msgstr ""
51
+
52
+ #: ../aswm-embed.php:281
53
+ msgid "Buy Pro Version"
54
+ msgstr ""
55
+
56
+ #: ../aswm-embed.php:283
57
+ msgid "Add from "
58
+ msgstr ""
59
+
60
+ #: ../inc/functions.php:89 ../inc/functions.php:126
61
  msgid "Done"
62
  msgstr ""
63
 
64
+ #: ../inc/functions.php:94
65
  msgid "Document"
66
  msgstr ""
67
 
68
+ #: ../inc/functions.php:102
69
  msgid "File format is not supported."
70
  msgstr ""
71
 
72
+ #: ../inc/functions.php:109
73
+ msgid "Sorry, the file URL is not valid."
74
  msgstr ""
75
 
76
+ #: ../inc/functions.php:129
77
+ msgid "The document you have chosen is a not public."
78
  msgstr ""
79
 
80
+ #: ../inc/functions.php:129
81
+ msgid ""
82
+ " Only the owner and explicitly shared collaborators will be able to view it."
83
  msgstr ""
84
 
85
+ #: ../inc/popup.php:13
86
+ msgid "Upload Document"
87
  msgstr ""
88
 
89
+ #: ../inc/popup.php:14
90
+ msgid "Add from URL"
91
  msgstr ""
92
 
93
+ #: ../inc/popup.php:20
94
  msgid "Enter document URL"
95
  msgstr ""
96
 
97
+ #: ../inc/popup.php:34
98
  msgid "Advanced Options"
99
  msgstr ""
100
 
101
+ #: ../inc/popup.php:44 ../inc/settings.php:30
 
102
  msgid "Show Download Link"
103
  msgstr ""
104
 
105
+ #: ../inc/popup.php:46 ../inc/settings.php:33
 
106
  msgid "For all users"
107
  msgstr ""
108
 
109
+ #: ../inc/popup.php:46 ../inc/settings.php:33
 
110
  msgid "For Logged-in users"
111
  msgstr ""
112
 
113
+ #: ../inc/popup.php:46 ../inc/settings.php:33
114
+ msgid "No Download"
115
+ msgstr ""
116
+
117
+ #: ../inc/popup.php:51 ../inc/popup.php:58
118
+ msgid "Viewer"
119
+ msgstr ""
120
+
121
+ #: ../inc/popup.php:53
122
+ msgid "Google Docs Viewer"
123
+ msgstr ""
124
+
125
+ #: ../inc/popup.php:53
126
+ msgid "Microsoft Office Online"
127
  msgstr ""
128
 
129
+ #: ../inc/popup.php:68
130
  msgid "Shortcode Preview"
131
  msgstr ""
132
 
133
+ #: ../inc/popup.php:77
134
  msgid "Insert"
135
  msgstr ""
136
 
137
+ #: ../inc/popup.php:77
138
+ msgid "Loading..."
139
+ msgstr ""
140
+
141
+ #: ../inc/popup.php:81
142
  msgid "Cancel"
143
  msgstr ""
144
 
145
+ #: ../inc/settings.php:3
146
  msgid "Embed Any Document by AWSM.in"
147
  msgstr ""
148
 
149
+ #: ../inc/settings.php:5
150
  msgid "General Settings"
151
  msgstr ""
152
 
153
+ #: ../inc/settings.php:6
154
  msgid "Support"
155
  msgstr ""
156
 
157
+ #: ../inc/settings.php:7
158
+ msgid "Get Plus Version"
159
  msgstr ""
160
 
161
+ #: ../inc/settings.php:16
 
 
 
 
 
 
 
 
162
  msgid "Default Size"
163
  msgstr ""
164
 
165
+ #: ../inc/settings.php:18
166
  msgid "Width"
167
  msgstr ""
168
 
169
+ #: ../inc/settings.php:22
170
  msgid "Height"
171
  msgstr ""
172
 
173
+ #: ../inc/settings.php:26
174
+ msgid "Enter values in pixels or percentage (Example: 500px or 100%)"
175
  msgstr ""
176
 
177
+ #: ../inc/settings.php:48
178
  msgid "Name"
179
  msgstr ""
180
 
181
+ #: ../inc/settings.php:52
182
  msgid "Email ID"
183
  msgstr ""
184
 
185
+ #: ../inc/settings.php:56
186
  msgid "Problem"
187
  msgstr ""
188
 
189
+ #: ../inc/settings.php:60
190
  msgid "Submit"
191
  msgstr ""
192
 
193
+ #: ../inc/support-mail.php:8
194
  msgid "Please Fill Required Fields"
195
  msgstr ""
196
 
197
+ #: ../inc/support-mail.php:30
198
  msgid "We will get back to you soon"
199
  msgstr ""
200
 
201
+ #: ../inc/support-mail.php:33
202
  msgid "Something went wrong"
203
  msgstr ""
204
 
205
+ #: ../inc/support-mail.php:38
206
  msgid "Cheating ?"
207
  msgstr ""
 
 
 
 
 
 
language/en_US.mo ADDED
Binary file
language/en_US.po ADDED
@@ -0,0 +1,209 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Embed Any Document\n"
4
+ "POT-Creation-Date: 2014-11-24 13:11+0530\n"
5
+ "PO-Revision-Date: 2014-11-24 13:13+0530\n"
6
+ "Last-Translator: \n"
7
+ "Language-Team: Awsm Innovations <hello@awsm.in>\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "X-Generator: Poedit 1.6.10\n"
12
+ "X-Poedit-Basepath: ../\n"
13
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
14
+ "X-Poedit-SourceCharset: UTF-8\n"
15
+ "X-Poedit-KeywordsList: __;_e;esc_attr_e\n"
16
+ "Language: en_US\n"
17
+ "X-Poedit-SearchPath-0: .\n"
18
+
19
+ #: aswm-embed.php:77 inc/popup.php:6
20
+ msgid "Add Document"
21
+ msgstr ""
22
+
23
+ #: aswm-embed.php:102
24
+ msgid "Settings"
25
+ msgstr ""
26
+
27
+ #: aswm-embed.php:127
28
+ msgid "Nothing to insert"
29
+ msgstr ""
30
+
31
+ #: aswm-embed.php:128
32
+ msgid "Add URL"
33
+ msgstr ""
34
+
35
+ #: aswm-embed.php:129
36
+ msgid "Verifying..."
37
+ msgstr ""
38
+
39
+ #: aswm-embed.php:154 aswm-embed.php:181
40
+ msgid "You do not have sufficient permissions to access this page."
41
+ msgstr ""
42
+
43
+ #: inc/functions.php:96
44
+ msgid "Done"
45
+ msgstr ""
46
+
47
+ #: inc/functions.php:101
48
+ msgid "Document"
49
+ msgstr ""
50
+
51
+ #: inc/functions.php:106
52
+ msgid "File format is not supported."
53
+ msgstr ""
54
+
55
+ #: inc/functions.php:111
56
+ msgid "Not a valid URL. Please try again."
57
+ msgstr ""
58
+
59
+ #: inc/functions.php:118
60
+ msgid "Sorry, the file URL is not valid."
61
+ msgstr ""
62
+
63
+ #: inc/functions.php:190
64
+ msgid "Download"
65
+ msgstr ""
66
+
67
+ #: inc/functions.php:195
68
+ msgid "File Not Found"
69
+ msgstr ""
70
+
71
+ #: inc/functions.php:198
72
+ msgid "No Url Found"
73
+ msgstr ""
74
+
75
+ #: inc/popup.php:12
76
+ msgid "Upload and Embed"
77
+ msgstr ""
78
+
79
+ #: inc/popup.php:13
80
+ msgid "Add From URL"
81
+ msgstr ""
82
+
83
+ #: inc/popup.php:21
84
+ msgid "Enter document URL"
85
+ msgstr ""
86
+
87
+ #: inc/popup.php:33
88
+ msgid "Advanced Options"
89
+ msgstr ""
90
+
91
+ #: inc/popup.php:43 inc/settings.php:65
92
+ msgid "Show Download Link"
93
+ msgstr ""
94
+
95
+ #: inc/popup.php:45 inc/settings.php:68
96
+ msgid "For all users"
97
+ msgstr ""
98
+
99
+ #: inc/popup.php:45 inc/settings.php:68
100
+ msgid "For Logged-in users"
101
+ msgstr ""
102
+
103
+ #: inc/popup.php:45 inc/settings.php:68
104
+ msgid "None"
105
+ msgstr ""
106
+
107
+ #: inc/popup.php:50
108
+ msgid "Provider"
109
+ msgstr ""
110
+
111
+ #: inc/popup.php:52 inc/settings.php:18
112
+ msgid "Google Docs Viewer"
113
+ msgstr ""
114
+
115
+ #: inc/popup.php:52 inc/settings.php:18
116
+ msgid "Microsoft Office Online"
117
+ msgstr ""
118
+
119
+ #: inc/popup.php:60
120
+ msgid "Shortcode Preview"
121
+ msgstr ""
122
+
123
+ #: inc/popup.php:69
124
+ msgid "Insert"
125
+ msgstr ""
126
+
127
+ #: inc/popup.php:73
128
+ msgid "Cancel"
129
+ msgstr ""
130
+
131
+ #: inc/settings.php:3
132
+ msgid "Embed Any Document by AWSM.in"
133
+ msgstr ""
134
+
135
+ #: inc/settings.php:5
136
+ msgid "General Settings"
137
+ msgstr ""
138
+
139
+ #: inc/settings.php:6
140
+ msgid "Support"
141
+ msgstr ""
142
+
143
+ #: inc/settings.php:15
144
+ msgid "Embed Using"
145
+ msgstr ""
146
+
147
+ #: inc/settings.php:22
148
+ msgid "Supported file formats"
149
+ msgstr ""
150
+
151
+ #: inc/settings.php:51
152
+ msgid "Default Size"
153
+ msgstr ""
154
+
155
+ #: inc/settings.php:53
156
+ msgid "Width"
157
+ msgstr ""
158
+
159
+ #: inc/settings.php:57
160
+ msgid "Height"
161
+ msgstr ""
162
+
163
+ #: inc/settings.php:61
164
+ msgid "Enter values in pixels or percentage (Example: 500px or 100%)"
165
+ msgstr ""
166
+
167
+ #: inc/settings.php:74
168
+ msgid "Override Default Media Insert?"
169
+ msgstr ""
170
+
171
+ #: inc/settings.php:77
172
+ msgid "Auto-embed supported documents"
173
+ msgstr ""
174
+
175
+ #: inc/settings.php:77
176
+ msgid "Insert as link (WordPress Default)"
177
+ msgstr ""
178
+
179
+ #: inc/settings.php:92
180
+ msgid "Name"
181
+ msgstr ""
182
+
183
+ #: inc/settings.php:96
184
+ msgid "Email ID"
185
+ msgstr ""
186
+
187
+ #: inc/settings.php:100
188
+ msgid "Problem"
189
+ msgstr ""
190
+
191
+ #: inc/settings.php:104
192
+ msgid "Submit"
193
+ msgstr ""
194
+
195
+ #: inc/support-mail.php:8
196
+ msgid "Please Fill Required Fields"
197
+ msgstr ""
198
+
199
+ #: inc/support-mail.php:30
200
+ msgid "We will get back to you soon"
201
+ msgstr ""
202
+
203
+ #: inc/support-mail.php:33
204
+ msgid "Something went wrong"
205
+ msgstr ""
206
+
207
+ #: inc/support-mail.php:38
208
+ msgid "Cheating ?"
209
+ msgstr ""
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://awsm.in/donate
4
  Tags: embed documents, upload pdf, embed ppt, document viewer, pdf viewer, pdf viewer plugin, display pdf, embed pdf, embed pdf in wordpress, word, word viewer, word document, embed word, word plugin, doc, doc viewer, docx, docx viewer, excel, excel plugin, xls, xlsx, spreadsheet, embed spreadsheet, powerpoint, powerpoint viewer, ppt, ppt viewer, pptx, image viewer
5
  Author URI: http://awsm.in
6
  Requires at least: 3.5
7
- Tested up to: 4.0
8
  Stable tag: trunk
9
  License: GPLv2
10
 
@@ -65,7 +65,7 @@ Upload or link the documents to your site using the ‘Add Document’ button in
65
  1. ‘Add Document’ button integrated into WordPress visual editor
66
  2. Add document popup
67
  3. Inserting Document
68
- 4. Settings panel
69
 
70
 
71
  == Frequently Asked Questions ==
@@ -81,12 +81,49 @@ Great. Send it to ead@awsm.in. We will answer it as soon as we can.
81
 
82
  == Changelog ==
83
 
84
- = V1.0.1 - 2014-11-12 =
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  * Removed unsupported file types.
86
  * Updated support tab.
87
 
 
 
 
 
88
  == Upgrade Notice ==
89
 
90
- = V1.0.1 =
 
 
 
 
 
 
 
 
 
 
 
 
91
  * Removed unsupported file types.
92
- * Updated support tab.
 
 
 
4
  Tags: embed documents, upload pdf, embed ppt, document viewer, pdf viewer, pdf viewer plugin, display pdf, embed pdf, embed pdf in wordpress, word, word viewer, word document, embed word, word plugin, doc, doc viewer, docx, docx viewer, excel, excel plugin, xls, xlsx, spreadsheet, embed spreadsheet, powerpoint, powerpoint viewer, ppt, ppt viewer, pptx, image viewer
5
  Author URI: http://awsm.in
6
  Requires at least: 3.5
7
+ Tested up to: 4.1
8
  Stable tag: trunk
9
  License: GPLv2
10
 
65
  1. ‘Add Document’ button integrated into WordPress visual editor
66
  2. Add document popup
67
  3. Inserting Document
68
+ 4. Add from URL
69
 
70
 
71
  == Frequently Asked Questions ==
81
 
82
  == Changelog ==
83
 
84
+ = V 2.1 - 2015-01-25=
85
+ * Missing image fix.
86
+ * Error handling.
87
+
88
+ = V 2.0 - 2014-12-31 =
89
+ * UI Improvements
90
+ * Various bug fixes
91
+ * Performance improvements
92
+ * Introduced plus version with cloud support
93
+
94
+ = V 1.0.2 - 2014-11-24 =
95
+ * Added option in advanced option to choose viewer.
96
+ * Added option in settings to enable and disable media library insert.
97
+ * Fixed: Editor permission issue.
98
+
99
+ = V 1.1.1- 2014-12-8 =
100
+ * Removed media insert override option.
101
+
102
+ = V 1.0.1 - 2014-11-12 =
103
  * Removed unsupported file types.
104
  * Updated support tab.
105
 
106
+ = V 1.1 - 2014-11-12 =
107
+ * File Not Found fix
108
+
109
+
110
  == Upgrade Notice ==
111
 
112
+ = V 2.1 =
113
+ * Missing image fix.
114
+ * Error handling.
115
+
116
+ = V 2.0 =
117
+ * UI Improvements
118
+ * Various bug fixes
119
+ * Performance improvements
120
+
121
+ = V 1.1.1=
122
+ * Removed media insert override option.
123
+
124
+ = V 1.0.1 =
125
  * Removed unsupported file types.
126
+ * Updated support tab.
127
+
128
+ = V 1.1 =
129
+ * File Not Found fix
screenshot-2.png CHANGED
Binary file
screenshot-3.png CHANGED
Binary file
screenshot-4.png CHANGED
Binary file