Version Description
Download this release
Release Info
Developer | awsmin |
Plugin | Embed Any Document |
Version | 1.1.1 |
Comparing to | |
See all releases |
Code changes from version 1.0.1 to 1.1.1
- aswm-embed.php +29 -23
- css/embed.css +2 -1
- inc/functions.php +81 -52
- inc/mime_types.php +6 -2
- inc/popup.php +11 -4
- inc/settings.php +1 -1
- js/embed.js +105 -101
- language/ead.pot +70 -55
- language/en_US.mo +0 -0
- language/en_US.po +209 -0
- readme.txt +22 -4
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.
|
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, '
|
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,14 +118,14 @@ 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,
|
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' ),
|
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', '
|
128 |
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
129 |
'validtypes' => ead_validembedtypes(),
|
130 |
'nocontent' => __('Nothing to insert', $this->text_domain),
|
@@ -164,16 +165,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', '
|
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 +197,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 +209,24 @@ 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: 1.1.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 = '1.1.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 |
'default_height' => get_option('ead_height', '500px' ),
|
126 |
'default_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 |
'nocontent' => __('Nothing to insert', $this->text_domain),
|
165 |
function register_eadsettings() {
|
166 |
register_setting( 'ead-settings-group', 'ead_width' ,'ead_sanitize_dims');
|
167 |
register_setting( 'ead-settings-group', 'ead_height','ead_sanitize_dims' );
|
168 |
+
register_setting( 'ead-settings-group', 'ead_provider','ead_sanitize_provider' );
|
169 |
register_setting( 'ead-settings-group', 'ead_download' );
|
170 |
+
register_setting( 'ead-settings-group', 'ead_mediainsert' );
|
171 |
}
|
172 |
/**
|
173 |
* Ajax validate file url
|
174 |
*/
|
175 |
function validateurl(){
|
|
|
|
|
|
|
176 |
$fileurl = $_POST['furl'];
|
177 |
echo json_encode(ead_validateurl($fileurl));
|
178 |
die(0);
|
197 |
*/
|
198 |
function adminfunctions(){
|
199 |
if(is_admin()){
|
|
|
200 |
add_filter('upload_mimes', array($this,'additional_mimes'));
|
201 |
}
|
202 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
203 |
/**
|
204 |
* Adds additional mimetype for meadi uploader
|
205 |
*/
|
209 |
'ai' => 'application/postscript',
|
210 |
));
|
211 |
}
|
212 |
+
/**
|
213 |
+
* To initialize default options
|
214 |
+
*/
|
215 |
+
function ead_defaults()
|
216 |
+
{
|
217 |
+
$o = array(
|
218 |
+
'ead_width' => '100%',
|
219 |
+
'ead_height' => '500px',
|
220 |
+
'ead_download' => 'none',
|
221 |
+
'ead_provider' => 'google',
|
222 |
+
'ead_mediainsert' => '1',
|
223 |
+
);
|
224 |
+
foreach ( $o as $k => $v )
|
225 |
+
{
|
226 |
+
if(!get_option($k)) update_option($k, $v);
|
227 |
+
}
|
228 |
+
return;
|
229 |
+
}
|
230 |
}
|
231 |
|
232 |
Awsm_embed::get_instance();
|
css/embed.css
CHANGED
@@ -167,7 +167,8 @@ div.awsm-error p, div.awsm-updated p {
|
|
167 |
.f-left{
|
168 |
float:left;
|
169 |
}
|
170 |
-
.f-left
|
|
|
171 |
.clear{ clear:both;}
|
172 |
.input-small{ width:60px;}
|
173 |
.box .urlerror{
|
167 |
.f-left{
|
168 |
float:left;
|
169 |
}
|
170 |
+
.option-fields .f-left{ margin-right: 25px; }
|
171 |
+
.f-left.last{ margin:0; }
|
172 |
.clear{ clear:both;}
|
173 |
.input-small{ width:60px;}
|
174 |
.box .urlerror{
|
inc/functions.php
CHANGED
@@ -64,7 +64,20 @@ function ead_sanitize_dims( $dim ) {
|
|
64 |
return false;
|
65 |
}
|
66 |
}
|
67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
/**
|
69 |
* Validate File url
|
70 |
*
|
@@ -72,34 +85,33 @@ function ead_sanitize_dims( $dim ) {
|
|
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 (
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
$json['file']['
|
91 |
-
|
|
|
|
|
92 |
}else{
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
$json['message'] = __('Not a valid URL. Please try again.','ead');
|
99 |
-
$json['status'] =false;
|
100 |
}
|
101 |
-
}elseif(is_wp_error( $
|
102 |
-
$json['message'] = $
|
103 |
$json['status'] =false;
|
104 |
}else{
|
105 |
$json['message'] = __('Sorry, the file URL is not valid.','ead');
|
@@ -120,26 +132,45 @@ function ead_getprovider($atts){
|
|
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 |
-
'
|
130 |
'download' => $default_download
|
131 |
), $atts ) );
|
|
|
132 |
if($url):
|
133 |
$filedata = wp_remote_head( $url );
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
}
|
141 |
-
|
142 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
case 'google':
|
144 |
$embedsrc = '//docs.google.com/viewer?url=%1$s&embedded=true&hl=%2$s';
|
145 |
$iframe = sprintf( $embedsrc,
|
@@ -162,28 +193,27 @@ function ead_getprovider($atts){
|
|
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
|
189 |
*
|
@@ -221,8 +251,7 @@ function ead_validmimeTypes(){
|
|
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 ) ) {
|
@@ -249,7 +278,7 @@ function ead_validembedtypes(){
|
|
249 |
* @since 1.0
|
250 |
* @return array Mimetypes
|
251 |
*/
|
252 |
-
function
|
253 |
$micro_mime=array(
|
254 |
'doc' => 'application/msword',
|
255 |
'pot|pps|ppt' => 'application/vnd.ms-powerpoint',
|
64 |
return false;
|
65 |
}
|
66 |
}
|
67 |
+
/**
|
68 |
+
* Sanitize provider
|
69 |
+
*
|
70 |
+
* @since 1.0.2
|
71 |
+
* @return string Sanitized provider
|
72 |
+
*/
|
73 |
+
function ead_sanitize_provider( $provider ) {
|
74 |
+
$providerList = array('google','microsoft');
|
75 |
+
if (in_array($provider, $providerList) ) {
|
76 |
+
return $provider;
|
77 |
+
} else {
|
78 |
+
return 'google';
|
79 |
+
}
|
80 |
+
}
|
81 |
/**
|
82 |
* Validate File url
|
83 |
*
|
85 |
* @return string Download link
|
86 |
*/
|
87 |
function ead_validateurl($url){
|
|
|
88 |
$url = esc_url( $url, array( 'http', 'https' ));
|
89 |
$remote = wp_remote_head($url);
|
90 |
$json['status'] = false;
|
91 |
$json['message'] = '';
|
92 |
+
if (wp_remote_retrieve_response_code($remote) ==200) {
|
93 |
+
//Gzip Support
|
94 |
+
$filename = pathinfo($url);
|
95 |
+
$doctypes = ead_validmimeTypes();
|
96 |
+
if(ead_validType($url,$doctypes)){
|
97 |
+
$json['status'] =true;
|
98 |
+
$json['message'] = __("Done",'ead');
|
99 |
+
if(isset($filename)){
|
100 |
+
$json['file']['filename'] = $filename['basename'];
|
101 |
+
}else{
|
102 |
+
$json['file']['filename'] = __("Document",'ead');
|
103 |
+
}
|
104 |
+
if(isset($remote['headers']['content-length'])){
|
105 |
+
$json['file']['filesizeHumanReadable'] = ead_human_filesize($remote['headers']['content-length']);
|
106 |
}else{
|
107 |
+
$json['file']['filesizeHumanReadable'] = 0;
|
108 |
+
}
|
109 |
+
}else{
|
110 |
+
$json['message'] = __("File format is not supported.",'ead');
|
111 |
+
$json['status'] = false;
|
|
|
|
|
112 |
}
|
113 |
+
}elseif(is_wp_error( $remote )){
|
114 |
+
$json['message'] = $remote->get_error_message();
|
115 |
$json['status'] =false;
|
116 |
}else{
|
117 |
$json['message'] = __('Sorry, the file URL is not valid.','ead');
|
132 |
$default_height = ead_sanitize_dims( get_option('ead_height','500px') );
|
133 |
$default_provider = get_option('ead_provider','google');
|
134 |
$default_download = get_option('ead_download','none');
|
135 |
+
$show = false;
|
136 |
extract(shortcode_atts( array(
|
137 |
'url' => '',
|
138 |
'width' => $default_width,
|
139 |
'height' => $default_height,
|
140 |
'language' => 'en',
|
141 |
+
'viewer' => $default_provider,
|
142 |
'download' => $default_download
|
143 |
), $atts ) );
|
144 |
+
|
145 |
if($url):
|
146 |
$filedata = wp_remote_head( $url );
|
147 |
+
$durl = '';
|
148 |
+
|
149 |
+
if($download=='alluser' or $download=='all'){
|
150 |
+
$show = true;
|
151 |
+
}elseif($download=='logged' AND is_user_logged_in()){
|
152 |
+
$show = true;
|
153 |
}
|
154 |
+
if($show){
|
155 |
+
$filesize = 0;
|
156 |
+
$url = esc_url( $url, array( 'http', 'https' ));
|
157 |
+
|
158 |
+
if (isset($filedata['headers']['content-length'])) {
|
159 |
+
$filesize = ead_human_filesize($filedata['headers']['content-length']);
|
160 |
+
}else{
|
161 |
+
$filesize = 0;
|
162 |
+
}
|
163 |
+
$fileHtml = '';
|
164 |
+
if($filesize)
|
165 |
+
$fileHtml = ' ['.$filesize.']';
|
166 |
+
$durl = '<p class="embed_download"><a href="'.$url.'" download >'.__('Download','ead'). $fileHtml .' </a></p>';
|
167 |
+
}
|
168 |
+
|
169 |
+
$url = esc_url( $url, array( 'http', 'https' ));
|
170 |
+
$providerList = array('google','microsoft');
|
171 |
+
if(!in_array($viewer, $providerList)) $viewer = 'google';
|
172 |
+
$viewer = ead_autoviewer($url,$viewer) ;
|
173 |
+
switch ($viewer) {
|
174 |
case 'google':
|
175 |
$embedsrc = '//docs.google.com/viewer?url=%1$s&embedded=true&hl=%2$s';
|
176 |
$iframe = sprintf( $embedsrc,
|
193 |
|
194 |
$iframe = '<iframe src="'.$iframe.'" '.$stylelink.'></iframe>';
|
195 |
$show = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
$embed = $iframe.$durl;
|
|
|
|
|
|
|
197 |
else:
|
198 |
$embed = __('No Url Found','ead');
|
199 |
endif;
|
200 |
return $embed;
|
201 |
}
|
202 |
+
/**
|
203 |
+
* Select Supported Viewer
|
204 |
+
*
|
205 |
+
* @since 1.1
|
206 |
+
* @return string email html
|
207 |
+
*/
|
208 |
+
function ead_autoviewer($url,$viewer){
|
209 |
+
$autoviewer = $viewer;
|
210 |
+
if($viewer == 'microsoft'){
|
211 |
+
$doctypes = ead_microsoft_mimes();
|
212 |
+
if(!ead_validType($url ,$doctypes))
|
213 |
+
$autoviewer = 'google';
|
214 |
+
}
|
215 |
+
return $autoviewer;
|
216 |
+
}
|
217 |
/**
|
218 |
* Get Email node
|
219 |
*
|
251 |
* @since 1.0
|
252 |
* @return boolean
|
253 |
*/
|
254 |
+
function ead_validType( $url ,$doctypes) {
|
|
|
255 |
if ( is_array( $doctypes ) ) {
|
256 |
$allowed_ext = implode( "|", array_keys( $doctypes ) );
|
257 |
if ( preg_match( "/\.($allowed_ext)$/i", $url ) ) {
|
278 |
* @since 1.0
|
279 |
* @return array Mimetypes
|
280 |
*/
|
281 |
+
function ead_microsoft_mimes(){
|
282 |
$micro_mime=array(
|
283 |
'doc' => 'application/msword',
|
284 |
'pot|pps|ppt' => 'application/vnd.ms-powerpoint',
|
inc/mime_types.php
CHANGED
@@ -24,5 +24,9 @@
|
|
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 |
+
|
29 |
+
$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');
|
30 |
+
// Microsoft Supported extensions
|
31 |
+
$extensions['ms'] = array('.doc','.pot','.pps','.ppt','.xla','.xls','.xlt','.xlw','.docx','.dotx','.dotm','.xlsx','.xlsm','.pptx');
|
32 |
+
?>
|
inc/popup.php
CHANGED
@@ -38,12 +38,19 @@
|
|
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
|
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' => __('
|
46 |
-
ead_selectbuilder('ead_download', $downoptions,esc_attr( get_option('ead_download')),'embed_download');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
?>
|
48 |
</div>
|
49 |
<div class="clear"></div>
|
@@ -54,7 +61,7 @@
|
|
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">
|
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"><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' => __('No Download',$this->text_domain));
|
46 |
+
ead_selectbuilder('ead_download', $downoptions,esc_attr( get_option('ead_download')),'embed_download ead_usc');
|
47 |
+
?>
|
48 |
+
</div>
|
49 |
+
<div class="f-left last">
|
50 |
+
<label><?php _e('Provider','ead');?></label>
|
51 |
+
<?php
|
52 |
+
$providers = array('google' => __('Google Docs Viewer',$this->text_domain),'microsoft' => __('Microsoft Office Online',$this->text_domain));
|
53 |
+
ead_selectbuilder('ead_provider', $providers,esc_attr( get_option('ead_provider','google')),'ead_provider ead_usc');
|
54 |
?>
|
55 |
</div>
|
56 |
<div class="clear"></div>
|
61 |
<textarea name="shortcode" style="width:100%" id="shortcode" readonly="readonly"></textarea>
|
62 |
</li>
|
63 |
</ul>
|
64 |
+
</div>
|
65 |
</div>
|
66 |
|
67 |
<div class="mceActionPanel">
|
inc/settings.php
CHANGED
@@ -65,7 +65,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' => __('
|
69 |
ead_selectbuilder('ead_download', $downoptions,esc_attr( get_option('ead_download','none')));
|
70 |
?>
|
71 |
</td>
|
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' => __('No Download',$this->text_domain));
|
69 |
ead_selectbuilder('ead_download', $downoptions,esc_attr( get_option('ead_download','none')));
|
70 |
?>
|
71 |
</td>
|
js/embed.js
CHANGED
@@ -1,71 +1,70 @@
|
|
1 |
jQuery(document).ready(function ($) {
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
$ActionPanel = $('.mceActionPanel');
|
8 |
$container = $('.ead_container');
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
ead_reset();
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
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 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
//Wordpress Uploader
|
58 |
$('#upload_doc').click(open_media_window);
|
59 |
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
this.window = wp.media({
|
64 |
title: 'Embed Any Documet',
|
65 |
multiple: false,
|
66 |
library: {
|
67 |
-
|
68 |
-
|
69 |
button: {text: 'Insert'}
|
70 |
});
|
71 |
|
@@ -76,93 +75,98 @@ jQuery(document).ready(function ($) {
|
|
76 |
$shortcode.text(getshortcode(file.url));
|
77 |
uploaddetails(file);
|
78 |
});
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
}
|
83 |
//to getshortcode
|
84 |
function getshortcode(url){
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
|
|
90 |
|
91 |
}
|
92 |
//Print uploaded file details
|
93 |
function uploaddetails(file){
|
94 |
$('#insert_doc').removeAttr('disabled');
|
95 |
-
|
96 |
-
|
97 |
-
|
|
|
|
|
|
|
|
|
98 |
$container.hide();
|
99 |
}
|
100 |
//Add url
|
101 |
$('#add_url').click(awsm_embded_url);
|
102 |
function awsm_embded_url(){
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
$embedurl.addClass('urlerror');
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
}
|
112 |
//Validate file url
|
113 |
function validateurl(url){
|
114 |
$('#embed_message').hide();
|
115 |
$('#add_url').val(emebeder.verify);
|
116 |
-
|
117 |
type: 'POST',
|
118 |
url: emebeder.ajaxurl,
|
119 |
-
|
120 |
data: { action: 'validateurl',
|
121 |
-
|
122 |
success: function(data) {
|
123 |
-
|
124 |
$embedurl.removeClass('urlerror');
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
},
|
133 |
});
|
134 |
}
|
135 |
//Show Message
|
136 |
function showmsg(msg){
|
137 |
$('#embed_message').fadeIn();
|
138 |
-
|
139 |
}
|
140 |
//insert Shortcode
|
141 |
$('#insert_doc').click(awsm_shortcode);
|
142 |
function awsm_shortcode(){
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
}
|
151 |
//Update ShortCode
|
152 |
function updateshortcode(){
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
}
|
159 |
// Close Embed dialog
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
function ead_reset(){
|
167 |
$container.show();
|
168 |
$embedurl.val('');
|
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 |
+
$( ".ead_usc" ).change(function() {
|
41 |
+
updateshortcode();
|
42 |
+
});
|
43 |
+
$('.embedval').keyup(function(){
|
44 |
+
updateshortcode();
|
45 |
+
});
|
46 |
+
//Tabs Support
|
47 |
+
$('ul.tabs').delegate('li:not(.current)', 'click', function () {
|
|
|
48 |
$(this).addClass('current').siblings().removeClass('current')
|
49 |
.parents('div.section').find('div.box').eq($(this).index()).fadeIn(150).siblings('div.box').hide();
|
50 |
});
|
51 |
|
52 |
+
//Toggle advanced options
|
53 |
+
$("#adv_options").click(function(){
|
54 |
+
$(".advanced_options").toggle();
|
55 |
+
});
|
56 |
//Wordpress Uploader
|
57 |
$('#upload_doc').click(open_media_window);
|
58 |
|
59 |
+
//Insert Media window
|
60 |
+
function open_media_window() {
|
61 |
+
if (this.window === undefined) {
|
62 |
this.window = wp.media({
|
63 |
title: 'Embed Any Documet',
|
64 |
multiple: false,
|
65 |
library: {
|
66 |
+
type: emebeder.validtypes,
|
67 |
+
},
|
68 |
button: {text: 'Insert'}
|
69 |
});
|
70 |
|
75 |
$shortcode.text(getshortcode(file.url));
|
76 |
uploaddetails(file);
|
77 |
});
|
78 |
+
}
|
79 |
+
this.window.open();
|
80 |
+
return false;
|
81 |
}
|
82 |
//to getshortcode
|
83 |
function getshortcode(url){
|
84 |
+
var height=$('#ead_height').val(),width=$('#ead_width').val(),download=$('#ead_download').val(),provider=$('#ead_provider').val(),heightstr="",widthstr="",downloadstr="",providerstr="";
|
85 |
+
if(height!=emebeder.default_height) { heightstr = ' height="'+height+'"'; }
|
86 |
+
if(width!=emebeder.default_width) { widthstr = ' width="'+width+'"'; }
|
87 |
+
if(download!=emebeder.download) { downloadstr = ' download="'+download+'"'; }
|
88 |
+
if(provider!=emebeder.provider) { providerstr = ' provider="'+provider+'"'; }
|
89 |
+
return '[embeddoc url="' + url + '"' + widthstr + heightstr + downloadstr + providerstr +']';
|
90 |
|
91 |
}
|
92 |
//Print uploaded file details
|
93 |
function uploaddetails(file){
|
94 |
$('#insert_doc').removeAttr('disabled');
|
95 |
+
$('#ead_filename').html(file.filename);
|
96 |
+
if(file.filesizeHumanReadable){
|
97 |
+
$('#ead_filesize').html(file.filesizeHumanReadable);
|
98 |
+
}else{
|
99 |
+
$('#ead_filesize').html(' ');
|
100 |
+
}
|
101 |
+
$('.upload-success').fadeIn();
|
102 |
$container.hide();
|
103 |
}
|
104 |
//Add url
|
105 |
$('#add_url').click(awsm_embded_url);
|
106 |
function awsm_embded_url(){
|
107 |
+
var checkurl = $embedurl.val();
|
108 |
+
if (checkurl!='') {
|
109 |
+
validateurl(checkurl);
|
110 |
+
} else {
|
111 |
$embedurl.addClass('urlerror');
|
112 |
+
updateshortcode();
|
113 |
+
}
|
114 |
+
|
115 |
}
|
116 |
//Validate file url
|
117 |
function validateurl(url){
|
118 |
$('#embed_message').hide();
|
119 |
$('#add_url').val(emebeder.verify);
|
120 |
+
$.ajax({
|
121 |
type: 'POST',
|
122 |
url: emebeder.ajaxurl,
|
123 |
+
dataType: 'json',
|
124 |
data: { action: 'validateurl',
|
125 |
+
furl:url },
|
126 |
success: function(data) {
|
127 |
+
if(data.status){
|
128 |
$embedurl.removeClass('urlerror');
|
129 |
+
fileurl =url;
|
130 |
+
updateshortcode();
|
131 |
+
uploaddetails(data.file);
|
132 |
+
}else{
|
133 |
+
showmsg(data.message);
|
134 |
+
}
|
135 |
+
$('#add_url').val(emebeder.addurl);
|
136 |
},
|
137 |
});
|
138 |
}
|
139 |
//Show Message
|
140 |
function showmsg(msg){
|
141 |
$('#embed_message').fadeIn();
|
142 |
+
$message.text(msg);
|
143 |
}
|
144 |
//insert Shortcode
|
145 |
$('#insert_doc').click(awsm_shortcode);
|
146 |
function awsm_shortcode(){
|
147 |
+
if(fileurl){
|
148 |
+
wp.media.editor.insert($shortcode.text());
|
149 |
+
$.magnificPopup.close();
|
150 |
+
}else{
|
151 |
+
showmsg(emebeder.nocontent);
|
152 |
+
}
|
153 |
+
|
154 |
}
|
155 |
//Update ShortCode
|
156 |
function updateshortcode(){
|
157 |
+
if(fileurl){
|
158 |
+
$shortcode.text(getshortcode(fileurl));
|
159 |
+
}else{
|
160 |
+
$shortcode.text('');
|
161 |
+
}
|
162 |
}
|
163 |
// Close Embed dialog
|
164 |
+
$('#embed-popup').on('click', '.cancel_embed', function (e) {
|
165 |
+
// Close popup
|
166 |
+
$.magnificPopup.close();
|
167 |
+
// Prevent default action
|
168 |
+
e.preventDefault();
|
169 |
+
});
|
170 |
function ead_reset(){
|
171 |
$container.show();
|
172 |
$embedurl.val('');
|
language/ead.pot
CHANGED
@@ -1,18 +1,22 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Embed Any Document\n"
|
4 |
-
"POT-Creation-Date: 2014-11-
|
5 |
-
"PO-Revision-Date: 2014-11-
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: Awsm Innovations <hello@awsm.in>\n"
|
8 |
-
"Language:
|
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 |
|
14 |
-
#: aswm-embed.php:77
|
15 |
-
#: inc/popup.php:6
|
16 |
msgid "Add Document"
|
17 |
msgstr ""
|
18 |
|
@@ -20,50 +24,51 @@ msgstr ""
|
|
20 |
msgid "Settings"
|
21 |
msgstr ""
|
22 |
|
23 |
-
#: aswm-embed.php:
|
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:
|
35 |
msgid "Add URL"
|
36 |
msgstr ""
|
37 |
|
38 |
-
#: aswm-embed.php:
|
39 |
msgid "Verifying..."
|
40 |
msgstr ""
|
41 |
|
42 |
-
#:
|
43 |
-
msgid "
|
44 |
msgstr ""
|
45 |
|
46 |
-
#: inc/functions.php:
|
47 |
msgid "Done"
|
48 |
msgstr ""
|
49 |
|
50 |
-
#: inc/functions.php:
|
51 |
msgid "Document"
|
52 |
msgstr ""
|
53 |
|
54 |
-
#: inc/functions.php:
|
55 |
msgid "File format is not supported."
|
56 |
msgstr ""
|
57 |
|
58 |
-
#: inc/functions.php:
|
59 |
msgid "Not a valid URL. Please try again."
|
60 |
msgstr ""
|
61 |
|
62 |
-
#: inc/functions.php:
|
63 |
msgid "Sorry, the file URL is not valid."
|
64 |
msgstr ""
|
65 |
|
66 |
-
#: inc/functions.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
msgid "No Url Found"
|
68 |
msgstr ""
|
69 |
|
@@ -83,35 +88,43 @@ msgstr ""
|
|
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:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
msgid "Shortcode Preview"
|
108 |
msgstr ""
|
109 |
|
110 |
-
#: inc/popup.php:
|
111 |
msgid "Insert"
|
112 |
msgstr ""
|
113 |
|
114 |
-
#: inc/popup.php:
|
115 |
msgid "Cancel"
|
116 |
msgstr ""
|
117 |
|
@@ -131,43 +144,51 @@ msgstr ""
|
|
131 |
msgid "Embed Using"
|
132 |
msgstr ""
|
133 |
|
134 |
-
#: inc/settings.php:
|
135 |
-
msgid "
|
136 |
-
msgstr ""
|
137 |
-
|
138 |
-
#: inc/settings.php:18
|
139 |
-
msgid "Microsoft Office Online"
|
140 |
msgstr ""
|
141 |
|
142 |
-
#: inc/settings.php:
|
143 |
msgid "Default Size"
|
144 |
msgstr ""
|
145 |
|
146 |
-
#: inc/settings.php:
|
147 |
msgid "Width"
|
148 |
msgstr ""
|
149 |
|
150 |
-
#: inc/settings.php:
|
151 |
msgid "Height"
|
152 |
msgstr ""
|
153 |
|
154 |
-
#: inc/settings.php:
|
155 |
-
msgid "Enter values in pixels or percentage (Example:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
msgstr ""
|
157 |
|
158 |
-
#: inc/settings.php:
|
|
|
|
|
|
|
|
|
159 |
msgid "Name"
|
160 |
msgstr ""
|
161 |
|
162 |
-
#: inc/settings.php:
|
163 |
msgid "Email ID"
|
164 |
msgstr ""
|
165 |
|
166 |
-
#: inc/settings.php:
|
167 |
msgid "Problem"
|
168 |
msgstr ""
|
169 |
|
170 |
-
#: inc/settings.php:
|
171 |
msgid "Submit"
|
172 |
msgstr ""
|
173 |
|
@@ -186,9 +207,3 @@ msgstr ""
|
|
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-11-24 13:11+0530\n"
|
5 |
+
"PO-Revision-Date: 2014-11-24 13:12+0530\n"
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: Awsm Innovations <hello@awsm.in>\n"
|
8 |
+
"Language: en_US\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;esc_attr_e\n"
|
17 |
+
"X-Poedit-SearchPath-0: .\n"
|
18 |
|
19 |
+
#: aswm-embed.php:77 inc/popup.php:6
|
|
|
20 |
msgid "Add Document"
|
21 |
msgstr ""
|
22 |
|
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 |
|
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 |
|
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 |
|
207 |
#: inc/support-mail.php:38
|
208 |
msgid "Cheating ?"
|
209 |
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.
|
8 |
Stable tag: trunk
|
9 |
License: GPLv2
|
10 |
|
@@ -81,12 +81,30 @@ Great. Send it to ead@awsm.in. We will answer it as soon as we can.
|
|
81 |
|
82 |
== Changelog ==
|
83 |
|
84 |
-
=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
* Removed unsupported file types.
|
86 |
* Updated support tab.
|
87 |
|
|
|
|
|
|
|
|
|
88 |
== Upgrade Notice ==
|
89 |
|
90 |
-
=
|
|
|
|
|
|
|
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 |
|
81 |
|
82 |
== Changelog ==
|
83 |
|
84 |
+
= V 1.0.2 - 2014-11-24 =
|
85 |
+
* Added option in advanced option to choose viewer.
|
86 |
+
* Added option in settings to enable and disable media library insert.
|
87 |
+
* Fixed: Editor permission issue.
|
88 |
+
|
89 |
+
= V 1.1.1- 2014-12-8 =
|
90 |
+
* Removed media insert override option.
|
91 |
+
|
92 |
+
= V 1.0.1 - 2014-11-12 =
|
93 |
* Removed unsupported file types.
|
94 |
* Updated support tab.
|
95 |
|
96 |
+
= V 1.1 - 2014-11-12 =
|
97 |
+
* File Not Found fix
|
98 |
+
|
99 |
+
|
100 |
== Upgrade Notice ==
|
101 |
|
102 |
+
= V 1.1.1=
|
103 |
+
* Removed media insert override option.
|
104 |
+
|
105 |
+
= V 1.0.1 =
|
106 |
* Removed unsupported file types.
|
107 |
+
* Updated support tab.
|
108 |
+
|
109 |
+
= V 1.1 =
|
110 |
+
* File Not Found fix
|