Version Description
- Fixed warning when the $settings data gets.
Download this release
Release Info
Developer | kimipooh |
Plugin | WP Add Mime Types |
Version | 3.0.1 |
Comparing to | |
See all releases |
Code changes from version 3.0.0 to 3.0.1
- readme.txt +4 -1
- wp-add-mime-types.php +6 -5
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: mime,file extention
|
|
4 |
Requires at least: 4.0
|
5 |
Requires PHP: 5.6
|
6 |
Tested up to: 6.0
|
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,9 @@ The files which has "bmp" file extention becomes not to be able to upload.
|
|
88 |
4. Security Options
|
89 |
|
90 |
== Changelog ==
|
|
|
|
|
|
|
91 |
= 3.0.0 =
|
92 |
- Added the mime type restriction function by using '-' prefix. If the head in each line is set to '-', then the MIME type restricts. In case of "-bmp = image/bmp", the files which has "bmp" file extention becomes not to be able to upload.
|
93 |
- Fixed the warning on the multisite.
|
4 |
Requires at least: 4.0
|
5 |
Requires PHP: 5.6
|
6 |
Tested up to: 6.0
|
7 |
+
Stable tag: 3.0.1
|
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.1 =
|
92 |
+
- Fixed warning when the $settings data gets.
|
93 |
+
|
94 |
= 3.0.0 =
|
95 |
- Added the mime type restriction function by using '-' prefix. If the head in each line is set to '-', then the MIME type restricts. In case of "-bmp = image/bmp", the files which has "bmp" file extention becomes not to be able to upload.
|
96 |
- Fixed the warning on the multisite.
|
wp-add-mime-types.php
CHANGED
@@ -3,7 +3,7 @@
|
|
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
|
@@ -53,10 +53,11 @@ function wamt_add_allow_upload_extension( $mimes ) {
|
|
53 |
else
|
54 |
$settings = get_option(WAMT_SETTING_FILE);
|
55 |
|
56 |
-
if(!isset($settings['mime_type_values']) || empty($settings['mime_type_values'])) return $mimes;
|
57 |
-
else
|
58 |
-
|
59 |
-
|
|
|
60 |
if(!empty($mime_type_values)){
|
61 |
foreach ((array)$mime_type_values as $line){
|
62 |
// Ignore to the right of '#' on a line.
|
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.1
|
7 |
Author: Kimiya Kitani
|
8 |
Author URI: http://kitaney-wordpress.blogspot.jp/
|
9 |
Text Domain: wp-add-mime-types
|
53 |
else
|
54 |
$settings = get_option(WAMT_SETTING_FILE);
|
55 |
|
56 |
+
// if(!isset($settings['mime_type_values']) || empty($settings['mime_type_values'])) return $mimes;
|
57 |
+
// else
|
58 |
+
$mime_type_values = unserialize($settings['mime_type_values']);
|
59 |
+
if( ! $mime_type_values ) return $mimes;
|
60 |
+
|
61 |
if(!empty($mime_type_values)){
|
62 |
foreach ((array)$mime_type_values as $line){
|
63 |
// Ignore to the right of '#' on a line.
|