Supreme Modules Lite – Divi Theme, Extra Theme and Divi Builder - Version 2.0.8

Version Description

12.04.2020 = * Enhanced: Remove possible debug error messages in Divi Before After Image Slider. * Enhanced: Check if class DSM_JSON_Handler exist to prevent error when activating plugin in some cases.

Download this release

Release Info

Developer divisupreme
Plugin Icon 128x128 Supreme Modules Lite – Divi Theme, Extra Theme and Divi Builder
Version 2.0.8
Comparing to
See all releases

Code changes from version 2.0.7 to 2.0.8

includes/class-dsm-json-handler.php CHANGED
@@ -3,40 +3,42 @@
3
  if ( ! defined( 'ABSPATH' ) ) {
4
  exit;
5
  }
6
- class DSM_JSON_Handler {
7
- const MIME_TYPE = 'application/json';
 
8
 
9
- /**
10
- * add JSON to allowed file uploads.
11
- *
12
- * @since 2.0.5
13
- */
14
- public function dsm_mime_types( $mimes ) {
15
- $mimes['json'] = 'application/json';
16
- return $mimes;
17
- }
18
- /**
19
- * add JSON to wp_check_filetype_and_ext.
20
- *
21
- * @since 2.0.5
22
- */
23
- public function dsm_check_filetype_and_ext( $types, $file, $filename, $mimes ) {
24
- if ( false !== strpos( $filename, '.json' ) ) {
25
- $types['ext'] = 'json';
26
- $types['type'] = self::MIME_TYPE;
27
  }
 
 
 
 
 
 
 
 
 
 
28
 
29
- return $types;
30
- }
31
 
32
- /**
33
- * DSM_JSON_Handler constructor.
34
- *
35
- * @param string $name
36
- * @param array $args
37
- */
38
- public function __construct() {
39
- add_filter( 'upload_mimes', array( $this, 'dsm_mime_types' ) );
40
- add_filter( 'wp_check_filetype_and_ext', array( $this, 'dsm_check_filetype_and_ext' ), 10, 4 );
 
41
  }
42
  }
3
  if ( ! defined( 'ABSPATH' ) ) {
4
  exit;
5
  }
6
+ if ( ! class_exists( 'DSM_JSON_Handler' ) ) {
7
+ class DSM_JSON_Handler {
8
+ const MIME_TYPE = 'application/json';
9
 
10
+ /**
11
+ * add JSON to allowed file uploads.
12
+ *
13
+ * @since 2.0.5
14
+ */
15
+ public function dsm_mime_types( $mimes ) {
16
+ $mimes['json'] = 'application/json';
17
+ return $mimes;
 
 
 
 
 
 
 
 
 
 
18
  }
19
+ /**
20
+ * add JSON to wp_check_filetype_and_ext.
21
+ *
22
+ * @since 2.0.5
23
+ */
24
+ public function dsm_check_filetype_and_ext( $types, $file, $filename, $mimes ) {
25
+ if ( false !== strpos( $filename, '.json' ) ) {
26
+ $types['ext'] = 'json';
27
+ $types['type'] = self::MIME_TYPE;
28
+ }
29
 
30
+ return $types;
31
+ }
32
 
33
+ /**
34
+ * DSM_JSON_Handler constructor.
35
+ *
36
+ * @param string $name
37
+ * @param array $args
38
+ */
39
+ public function __construct() {
40
+ add_filter( 'upload_mimes', array( $this, 'dsm_mime_types' ) );
41
+ add_filter( 'wp_check_filetype_and_ext', array( $this, 'dsm_check_filetype_and_ext' ), 10, 4 );
42
+ }
43
  }
44
  }
includes/modules/BeforeAfterImage/BeforeAfterImage.php CHANGED
@@ -432,18 +432,6 @@ class DSM_Before_After_Image extends ET_Builder_Module {
432
  $video_background = $this->video_background();
433
  $parallax_image_background = $this->get_parallax_image_background();
434
 
435
- $before_after_image = self::get_before_after_image(
436
- array(
437
- 'before_src' => $before_src,
438
- 'before_label_text' => $before_label_text,
439
- 'after_src' => $after_src,
440
- 'after_label_text' => $after_label_text,
441
- 'default_offset_pct' => $default_offset_pct,
442
- 'orientation' => $orientation,
443
- 'no_overlay' => $no_overlay,
444
- )
445
- );
446
-
447
  $wrapper_selector = '%%order_class%% .dsm_before_after_image_wrapper';
448
  $overlay_selector = '%%order_class%% .dsm-before-after-image-slider-overlay';
449
  $overlay_selector_hover = '%%order_class%% .dsm-before-after-image-slider-overlay:hover';
432
  $video_background = $this->video_background();
433
  $parallax_image_background = $this->get_parallax_image_background();
434
 
 
 
 
 
 
 
 
 
 
 
 
 
435
  $wrapper_selector = '%%order_class%% .dsm_before_after_image_wrapper';
436
  $overlay_selector = '%%order_class%% .dsm-before-after-image-slider-overlay';
437
  $overlay_selector_hover = '%%order_class%% .dsm-before-after-image-slider-overlay:hover';
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: https://suprememodules.com/
5
  Requires at least: 4.5
6
  Tested up to: 5.4
7
  Requires PHP: 5.6
8
- Stable tag: 2.0.7
9
  License: GPLv2
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -109,6 +109,10 @@ This is a common question that we get asked here every now and then which is why
109
 
110
 
111
  == Changelog ==
 
 
 
 
112
  = 2.0.7 – 11.04.2020 =
113
  * Fixed: Unable to upload images to the WordPress Media Uploader due to wp_check_filetype_and_ext.
114
 
5
  Requires at least: 4.5
6
  Tested up to: 5.4
7
  Requires PHP: 5.6
8
+ Stable tag: 2.0.8
9
  License: GPLv2
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
109
 
110
 
111
  == Changelog ==
112
+ = 2.0.8 – 12.04.2020 =
113
+ * Enhanced: Remove possible debug error messages in Divi Before After Image Slider.
114
+ * Enhanced: Check if class DSM_JSON_Handler exist to prevent error when activating plugin in some cases.
115
+
116
  = 2.0.7 – 11.04.2020 =
117
  * Fixed: Unable to upload images to the WordPress Media Uploader due to wp_check_filetype_and_ext.
118
 
supreme-modules-for-divi.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Supreme Modules Lite - Divi Theme, Extra Theme and Divi Builder
4
  * Plugin URI: https://suprememodules.com
5
  * Description: Divi Supreme enhances the experience and features found on Divi and extend with custom creative modules to help you build amazing websites.
6
- * Version: 2.0.7
7
  * Author: Supreme Modules
8
  * Author URI: https://suprememodules.com/about-us/
9
  * License: GPL2
@@ -34,7 +34,7 @@ if ( ! defined( 'ABSPATH' ) ) {
34
  }
35
 
36
  if ( ! defined( 'DSM_VERSION' ) ) {
37
- define( 'DSM_VERSION', '2.0.7' );
38
  }
39
  if ( ! defined( 'DSM_SHORTCODE' ) ) {
40
  define( 'DSM_SHORTCODE', 'divi_shortcode' );
3
  * Plugin Name: Supreme Modules Lite - Divi Theme, Extra Theme and Divi Builder
4
  * Plugin URI: https://suprememodules.com
5
  * Description: Divi Supreme enhances the experience and features found on Divi and extend with custom creative modules to help you build amazing websites.
6
+ * Version: 2.0.8
7
  * Author: Supreme Modules
8
  * Author URI: https://suprememodules.com/about-us/
9
  * License: GPL2
34
  }
35
 
36
  if ( ! defined( 'DSM_VERSION' ) ) {
37
+ define( 'DSM_VERSION', '2.0.8' );
38
  }
39
  if ( ! defined( 'DSM_SHORTCODE' ) ) {
40
  define( 'DSM_SHORTCODE', 'divi_shortcode' );