WP Add Mime Types - Version 2.0.2

Version Description

  • Fixed the compatibility with Media Library Assistant plugin.
Download this release

Release Info

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

Code changes from version 2.0.1 to 2.0.2

includes/admin.php CHANGED
@@ -9,8 +9,10 @@ function add_to_settings_menu(){
9
  // Processing Setting menu for the plugin.
10
  function admin_settings_page(){
11
  global $plugin_basename;
12
-
13
- $admin_permission = 'manage_options';
 
 
14
  // Loading the stored setting data (wp_add_mime_types_array) from WordPress database.
15
  if(is_multisite() && is_plugin_active_for_network($plugin_basename)){
16
  $settings = get_site_option('wp_add_mime_types_network_array');
@@ -34,7 +36,6 @@ function admin_settings_page(){
34
  }else
35
  $mime_type_values = unserialize($settings['mime_type_values']);
36
 
37
-
38
  // Update to WordPress Data.
39
  if(is_multisite() && is_plugin_active_for_network($plugin_basename))
40
  get_site_option('wp_add_mime_types_network_array', $settings);
9
  // Processing Setting menu for the plugin.
10
  function admin_settings_page(){
11
  global $plugin_basename;
12
+ if ( ! function_exists( 'is_plugin_active_for_network' ) )
13
+ require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
14
+
15
+ $admin_permission = 'manage_options';
16
  // Loading the stored setting data (wp_add_mime_types_array) from WordPress database.
17
  if(is_multisite() && is_plugin_active_for_network($plugin_basename)){
18
  $settings = get_site_option('wp_add_mime_types_network_array');
36
  }else
37
  $mime_type_values = unserialize($settings['mime_type_values']);
38
 
 
39
  // Update to WordPress Data.
40
  if(is_multisite() && is_plugin_active_for_network($plugin_basename))
41
  get_site_option('wp_add_mime_types_network_array', $settings);
includes/network-admin.php CHANGED
@@ -2,6 +2,9 @@
2
 
3
  function network_add_to_settings_menu(){
4
  global $plugin_basename;
 
 
 
5
  if( ! is_multisite() || ! is_plugin_active_for_network($plugin_basename))
6
  return ;
7
 
2
 
3
  function network_add_to_settings_menu(){
4
  global $plugin_basename;
5
+ if ( ! function_exists( 'is_plugin_active_for_network' ) )
6
+ require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
7
+
8
  if( ! is_multisite() || ! is_plugin_active_for_network($plugin_basename))
9
  return ;
10
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: Kimiya Kitani
3
  Tags: mime,file extention
4
  Requires at least: 3.0
5
  Tested up to: 4.5.1
6
- Stable tag: 2.0.1
7
 
8
  The plugin additionally allows the mime types and file extensions to WordPress.
9
 
@@ -53,6 +53,9 @@ Yes, each setting values are saved as the other setting items.
53
 
54
  == Changelog ==
55
 
 
 
 
56
  = 2.0.1 =
57
  * Fixed the message in the setting menu
58
 
3
  Tags: mime,file extention
4
  Requires at least: 3.0
5
  Tested up to: 4.5.1
6
+ Stable tag: 2.0.2
7
 
8
  The plugin additionally allows the mime types and file extensions to WordPress.
9
 
53
 
54
  == Changelog ==
55
 
56
+ = 2.0.2 =
57
+ * Fixed the compatibility with Media Library Assistant plugin.
58
+
59
  = 2.0.1 =
60
  * Fixed the message in the setting menu
61
 
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.0.1
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.0.1',
23
  );
24
 
25
  // Add Setting to WordPress 'Settings' menu for Multisite.
@@ -35,6 +35,9 @@ require_once( dirname( __FILE__ ) . '/includes/admin.php');
35
  // Procedure for adding the mime types and file extensions to WordPress.
36
  function add_allow_upload_extension( $mimes ) {
37
  global $plugin_basename;
 
 
 
38
  if(is_multisite() && is_plugin_active_for_network($plugin_basename))
39
  $settings = get_site_option('wp_add_mime_types_network_array');
40
  else
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.0.2
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.0.2',
23
  );
24
 
25
  // Add Setting to WordPress 'Settings' menu for Multisite.
35
  // Procedure for adding the mime types and file extensions to WordPress.
36
  function add_allow_upload_extension( $mimes ) {
37
  global $plugin_basename;
38
+ if ( ! function_exists( 'is_plugin_active_for_network' ) )
39
+ require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
40
+
41
  if(is_multisite() && is_plugin_active_for_network($plugin_basename))
42
  $settings = get_site_option('wp_add_mime_types_network_array');
43
  else