WP Add Mime Types - Version 2.5.3

Version Description

  • Fixed the issue of "Undefined variable: f_exp_more2_flag" warning.
Download this release

Release Info

Developer kimipooh
Plugin Icon wp plugin WP Add Mime Types
Version 2.5.3
Comparing to
See all releases

Code changes from version 2.5.2 to 2.5.3

Files changed (2) hide show
  1. readme.txt +4 -1
  2. wp-add-mime-types.php +5 -7
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: 5.3.2
7
- Stable tag: 2.5.2
8
  License: GPL v2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -79,6 +79,9 @@ Yes, each setting values are saved as the other setting items.
79
 
80
  == Changelog ==
81
 
 
 
 
82
  = 2.5.2 =
83
  * Improved the response of CSRF (Cross-Site Request Forgery) vulnerability for this plugin's settings.
84
 
4
  Requires at least: 4.0
5
  Requires PHP: 5.6
6
  Tested up to: 5.3.2
7
+ Stable tag: 2.5.3
8
  License: GPL v2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
79
 
80
  == Changelog ==
81
 
82
+ = 2.5.3 =
83
+ * Fixed the issue of "Undefined variable: f_exp_more2_flag" warning.
84
+
85
  = 2.5.2 =
86
  * Improved the response of CSRF (Cross-Site Request Forgery) vulnerability for this plugin's settings.
87
 
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: 2.5.2
7
  Author: Kimiya Kitani
8
  Author URI: http://kitaney-wordpress.blogspot.jp/
9
  Text Domain: wp-add-mime-types
@@ -19,7 +19,7 @@ add_action('plugins_loaded', 'enable_language_translation');
19
  $plugin_basename = plugin_basename ( __FILE__ );
20
 
21
  $default_var = array(
22
- 'wp_add_mime_types' => '2.5.2',
23
  );
24
 
25
  // Add Setting to WordPress 'Settings' menu for Multisite.
@@ -61,10 +61,6 @@ function add_allow_upload_extension( $mimes ) {
61
  }
62
  }
63
 
64
- if($f_exp_more2_flag === true){
65
- add_filter( 'sanitize_file_name', 'wpaddmimetypes_remove_underscore', 10, 2 );
66
- }
67
-
68
  return $mimes;
69
  }
70
 
@@ -117,7 +113,9 @@ function add_allow_upload_extension_exception( $data, $file, $filename,$mimes,$r
117
  // The following function fixes the sanitized extension when a file is uploaded in the media in case of allowed extensions.
118
  // ex. XXX.YYY.ZZZ -- sanitized --> XXX_.YYY.ZZZ -- fixed the plugin --> XXX.YYY.ZZZ
119
  // In detail, please see sanitize_file_name function in "wp-includes/formatting.php".
120
- if(!(isset($settings['filename_sanitized_enable']) && $settings['filename_sanitized_enable'] === "yes")){
 
 
121
  add_filter( 'sanitize_file_name', 'wpaddmimetypes_remove_underscore', 10, 2 );
122
  }
123
  }
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: 2.5.3
7
  Author: Kimiya Kitani
8
  Author URI: http://kitaney-wordpress.blogspot.jp/
9
  Text Domain: wp-add-mime-types
19
  $plugin_basename = plugin_basename ( __FILE__ );
20
 
21
  $default_var = array(
22
+ 'wp_add_mime_types' => '2.5.3',
23
  );
24
 
25
  // Add Setting to WordPress 'Settings' menu for Multisite.
61
  }
62
  }
63
 
 
 
 
 
64
  return $mimes;
65
  }
66
 
113
  // The following function fixes the sanitized extension when a file is uploaded in the media in case of allowed extensions.
114
  // ex. XXX.YYY.ZZZ -- sanitized --> XXX_.YYY.ZZZ -- fixed the plugin --> XXX.YYY.ZZZ
115
  // In detail, please see sanitize_file_name function in "wp-includes/formatting.php".
116
+ //var_dump($settings['filename_sanitized_enable']);
117
+ if(isset($settings['filename_sanitized_enable']) && $settings['filename_sanitized_enable'] === "yes"){
118
+ }else{
119
  add_filter( 'sanitize_file_name', 'wpaddmimetypes_remove_underscore', 10, 2 );
120
  }
121
  }