Version Description
- Fixed: Unsupported file type regression interferes with some uploads
Download this release
Release Info
Developer | k3davis |
Plugin | Google Doc Embedder |
Version | 2.5.3 |
Comparing to | |
See all releases |
Code changes from version 2.5.2 to 2.5.3
- functions.php +19 -9
- gviewer.php +5 -4
- readme.txt +4 -1
functions.php
CHANGED
@@ -36,13 +36,19 @@ if ( is_admin() ) { require_once( GDE_PLUGIN_DIR . 'functions-admin.php' ); }
|
|
36 |
* @return array List of all supported extensions and their MIME types
|
37 |
*/
|
38 |
function gde_supported_types() {
|
39 |
-
$
|
40 |
-
include_once( GDE_PLUGIN_DIR . 'libs/lib-exts.php');
|
41 |
|
42 |
-
if (
|
43 |
-
return $
|
44 |
} else {
|
45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
}
|
47 |
}
|
48 |
|
@@ -158,10 +164,14 @@ function gde_valid_link( $link ) {
|
|
158 |
}
|
159 |
|
160 |
function gde_valid_type( $link ) {
|
161 |
-
$
|
162 |
|
163 |
-
|
164 |
-
|
|
|
|
|
|
|
|
|
165 |
} else {
|
166 |
return false;
|
167 |
}
|
@@ -203,7 +213,7 @@ function gde_format_bytes( $bytes, $precision = 2 ) {
|
|
203 |
if ( ! is_numeric( $bytes ) || $bytes < 1 ) {
|
204 |
return __('Unknown', 'gde');
|
205 |
} else {
|
206 |
-
$units = array( 'B', 'KB',
|
207 |
|
208 |
$bytes = max( $bytes, 0 );
|
209 |
$pow = floor( ( $bytes ? log( $bytes ) : 0 ) / log( 1024 ) );
|
36 |
* @return array List of all supported extensions and their MIME types
|
37 |
*/
|
38 |
function gde_supported_types() {
|
39 |
+
global $gdetypes;
|
|
|
40 |
|
41 |
+
if ( is_array( $gdetypes ) ) {
|
42 |
+
return $gdetypes;
|
43 |
} else {
|
44 |
+
$no_output = 1;
|
45 |
+
include_once( GDE_PLUGIN_DIR . 'libs/lib-exts.php' );
|
46 |
+
|
47 |
+
if ( isset( $types ) ) {
|
48 |
+
return $types;
|
49 |
+
} else {
|
50 |
+
return false;
|
51 |
+
}
|
52 |
}
|
53 |
}
|
54 |
|
164 |
}
|
165 |
|
166 |
function gde_valid_type( $link ) {
|
167 |
+
global $gdetypes;
|
168 |
|
169 |
+
if ( is_array( $gdetypes ) ) {
|
170 |
+
$supported_exts = implode( "|", array_keys( $gdetypes ) );
|
171 |
+
|
172 |
+
if ( preg_match( "/\.($supported_exts)$/i", $link ) ) {
|
173 |
+
return true;
|
174 |
+
}
|
175 |
} else {
|
176 |
return false;
|
177 |
}
|
213 |
if ( ! is_numeric( $bytes ) || $bytes < 1 ) {
|
214 |
return __('Unknown', 'gde');
|
215 |
} else {
|
216 |
+
$units = array( 'B', 'KB', 'MB', 'GB', 'TB' );
|
217 |
|
218 |
$bytes = max( $bytes, 0 );
|
219 |
$pow = floor( ( $bytes ? log( $bytes ) : 0 ) / log( 1024 ) );
|
gviewer.php
CHANGED
@@ -8,11 +8,11 @@ Author: Kevin Davis
|
|
8 |
Author URI: http://www.davistribe.org/
|
9 |
Text Domain: gde
|
10 |
Domain Path: /languages/
|
11 |
-
Version: 2.5.
|
12 |
License: GPLv2
|
13 |
*/
|
14 |
|
15 |
-
$gde_ver = "2.5.
|
16 |
|
17 |
/**
|
18 |
* LICENSE
|
@@ -42,8 +42,9 @@ $gde_ver = "2.5.2.98";
|
|
42 |
// boring init junk
|
43 |
require_once( plugin_dir_path( __FILE__ ) . 'functions.php' );
|
44 |
$pdata = gde_get_plugin_data();
|
45 |
-
$gdeoptions = get_option('gde_options');
|
46 |
-
$healthy = gde_debug_tables('gde_profiles');
|
|
|
47 |
global $wp_version;
|
48 |
|
49 |
// get global settings
|
8 |
Author URI: http://www.davistribe.org/
|
9 |
Text Domain: gde
|
10 |
Domain Path: /languages/
|
11 |
+
Version: 2.5.3
|
12 |
License: GPLv2
|
13 |
*/
|
14 |
|
15 |
+
$gde_ver = "2.5.3.98";
|
16 |
|
17 |
/**
|
18 |
* LICENSE
|
42 |
// boring init junk
|
43 |
require_once( plugin_dir_path( __FILE__ ) . 'functions.php' );
|
44 |
$pdata = gde_get_plugin_data();
|
45 |
+
$gdeoptions = get_option( 'gde_options' );
|
46 |
+
$healthy = gde_debug_tables( 'gde_profiles' );
|
47 |
+
$gdetypes = gde_supported_types();
|
48 |
global $wp_version;
|
49 |
|
50 |
// get global settings
|
readme.txt
CHANGED
@@ -137,6 +137,9 @@ More common questions are answered on the GDE web site [here](http://www.davistr
|
|
137 |
|
138 |
(E) Enhanced Viewer
|
139 |
|
|
|
|
|
|
|
140 |
= 2.5.2 =
|
141 |
* Fixed: Fatal error with certain plugins and themes
|
142 |
* Changed: Network activation halted for now (multisite single activation OK)
|
@@ -224,5 +227,5 @@ More common questions are answered on the GDE web site [here](http://www.davistr
|
|
224 |
|
225 |
== Upgrade Notice ==
|
226 |
|
227 |
-
= 2.5.
|
228 |
Bug fix release
|
137 |
|
138 |
(E) Enhanced Viewer
|
139 |
|
140 |
+
= 2.5.3 =
|
141 |
+
* Fixed: Unsupported file type regression interferes with some uploads
|
142 |
+
|
143 |
= 2.5.2 =
|
144 |
* Fixed: Fatal error with certain plugins and themes
|
145 |
* Changed: Network activation halted for now (multisite single activation OK)
|
227 |
|
228 |
== Upgrade Notice ==
|
229 |
|
230 |
+
= 2.5.3 =
|
231 |
Bug fix release
|