Version Description
- Fixed warning checking when retrieving serialized data.
- Tested up to WordPress 6.1
- Changed the supported version of WordPress from 4.0 to 5.4 or higher.
Download this release
Release Info
Developer | kimipooh |
Plugin | WP Add Mime Types |
Version | 3.0.3 |
Comparing to | |
See all releases |
Code changes from version 3.0.2 to 3.0.3
- readme.txt +8 -3
- wp-add-mime-types.php +4 -5
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== WP Add Mime Types ===
|
2 |
Contributors: Kimiya Kitani
|
3 |
Tags: mime,file extention
|
4 |
-
Requires at least: 4
|
5 |
Requires PHP: 5.6
|
6 |
-
Tested up to: 6.
|
7 |
-
Stable tag: 3.0.
|
8 |
License: GPL v2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -88,6 +88,11 @@ The files which has "bmp" file extention becomes not to be able to upload.
|
|
88 |
4. Security Options
|
89 |
|
90 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
91 |
= 3.0.2 =
|
92 |
- Enhanced error checking when retrieving serialized data.
|
93 |
|
1 |
=== WP Add Mime Types ===
|
2 |
Contributors: Kimiya Kitani
|
3 |
Tags: mime,file extention
|
4 |
+
Requires at least: 5.4
|
5 |
Requires PHP: 5.6
|
6 |
+
Tested up to: 6.1
|
7 |
+
Stable tag: 3.0.3
|
8 |
License: GPL v2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
88 |
4. Security Options
|
89 |
|
90 |
== Changelog ==
|
91 |
+
= 3.0.3 =
|
92 |
+
- Fixed warning checking when retrieving serialized data.
|
93 |
+
- Tested up to WordPress 6.1
|
94 |
+
- Changed the supported version of WordPress from 4.0 to 5.4 or higher.
|
95 |
+
|
96 |
= 3.0.2 =
|
97 |
- Enhanced error checking when retrieving serialized data.
|
98 |
|
wp-add-mime-types.php
CHANGED
@@ -3,13 +3,13 @@
|
|
3 |
Plugin Name: WP Add Mime Types
|
4 |
Plugin URI:
|
5 |
Description: The plugin additionally allows the mime types and file extensions to WordPress.
|
6 |
-
Version: 3.0.
|
7 |
Author: Kimiya Kitani
|
8 |
Author URI: http://kitaney-wordpress.blogspot.jp/
|
9 |
Text Domain: wp-add-mime-types
|
10 |
Domain Path: /lang
|
11 |
*/
|
12 |
-
define('WAMT_DEFAULT_VAR', '3.0.
|
13 |
define('WAMT_PLUGIN_DIR', 'wp-add-mime-types');
|
14 |
define('WAMT_PLUGIN_NAME', 'wp-add-mime-types');
|
15 |
define('WAMT_PLUGIN_BASENAME', WAMT_PLUGIN_DIR . '/' . WAMT_PLUGIN_NAME . '.php');
|
@@ -54,8 +54,7 @@ function wamt_add_allow_upload_extension( $mimes ) {
|
|
54 |
$settings = get_option(WAMT_SETTING_FILE);
|
55 |
|
56 |
if( !isset($settings['mime_type_values'] ) ) return $mimes;
|
57 |
-
$mime_type_values =
|
58 |
-
if( empty($mime_type_values) ) return $mimes;
|
59 |
|
60 |
if(!empty($mime_type_values)){
|
61 |
foreach ((array)$mime_type_values as $line){
|
@@ -109,7 +108,7 @@ function wamt_add_allow_upload_extension_exception( $data, $file, $filename,$mim
|
|
109 |
if(!isset($settings['mime_type_values']) || empty($settings['mime_type_values']))
|
110 |
return $data;
|
111 |
else
|
112 |
-
$mime_type_values =
|
113 |
|
114 |
$ext = $type = $proper_filename = false;
|
115 |
if(isset($data['ext'])) $ext = $data['ext'];
|
3 |
Plugin Name: WP Add Mime Types
|
4 |
Plugin URI:
|
5 |
Description: The plugin additionally allows the mime types and file extensions to WordPress.
|
6 |
+
Version: 3.0.3
|
7 |
Author: Kimiya Kitani
|
8 |
Author URI: http://kitaney-wordpress.blogspot.jp/
|
9 |
Text Domain: wp-add-mime-types
|
10 |
Domain Path: /lang
|
11 |
*/
|
12 |
+
define('WAMT_DEFAULT_VAR', '3.0.3');
|
13 |
define('WAMT_PLUGIN_DIR', 'wp-add-mime-types');
|
14 |
define('WAMT_PLUGIN_NAME', 'wp-add-mime-types');
|
15 |
define('WAMT_PLUGIN_BASENAME', WAMT_PLUGIN_DIR . '/' . WAMT_PLUGIN_NAME . '.php');
|
54 |
$settings = get_option(WAMT_SETTING_FILE);
|
55 |
|
56 |
if( !isset($settings['mime_type_values'] ) ) return $mimes;
|
57 |
+
$mime_type_values = maybe_unserialize($settings['mime_type_values']);
|
|
|
58 |
|
59 |
if(!empty($mime_type_values)){
|
60 |
foreach ((array)$mime_type_values as $line){
|
108 |
if(!isset($settings['mime_type_values']) || empty($settings['mime_type_values']))
|
109 |
return $data;
|
110 |
else
|
111 |
+
$mime_type_values = maybe_unserialize($settings['mime_type_values']);
|
112 |
|
113 |
$ext = $type = $proper_filename = false;
|
114 |
if(isset($data['ext'])) $ext = $data['ext'];
|