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

Version Description

  • 02.11.2018 =
  • Enhanced: Flush method using register_activation_hook to add_option and delete_option method instead of running in init hook to prevent this from loading on every page load.
Download this release

Release Info

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

Code changes from version 1.2.5 to 1.2.6

includes/SupremeModulesLoader.php CHANGED
@@ -2,8 +2,6 @@
2
  require_once plugin_dir_path( __FILE__ ) . 'class.settings-api.php';
3
  require_once plugin_dir_path( __FILE__ ) . 'class.page-settings.php';
4
 
5
- add_action( 'init', 'flush_rewrite_rules', 10 );
6
-
7
  /*Temporary fix*/
8
  if ( ! function_exists( 'et_core_is_fb_enabled' ) ):
9
  function et_core_is_fb_enabled() {
2
  require_once plugin_dir_path( __FILE__ ) . 'class.settings-api.php';
3
  require_once plugin_dir_path( __FILE__ ) . 'class.page-settings.php';
4
 
 
 
5
  /*Temporary fix*/
6
  if ( ! function_exists( 'et_core_is_fb_enabled' ) ):
7
  function et_core_is_fb_enabled() {
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: https://suprememodules.com/
5
  Requires at least: 4.5
6
  Tested up to: 4.9
7
  Requires PHP: 5.6
8
- Stable tag: 1.2.5
9
  License: GPLv2
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -81,6 +81,9 @@ You must have Divi theme, Extra Theme or the Divi Builder installed in order for
81
  YES! At least Divi 3.1 onwards where they introduced the Divi Developer API.
82
 
83
  == Changelog ==
 
 
 
84
  = 1.2.5 - 01.11.2018 =
85
  * Added: PHP version check because some users are still using very old PHP version for some reason.
86
  * Fixed: Flipbox Module wrong css classes.
5
  Requires at least: 4.5
6
  Tested up to: 4.9
7
  Requires PHP: 5.6
8
+ Stable tag: 1.2.6
9
  License: GPLv2
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
81
  YES! At least Divi 3.1 onwards where they introduced the Divi Developer API.
82
 
83
  == Changelog ==
84
+ = 1.2.6 - 02.11.2018 =
85
+ * Enhanced: Flush method using register_activation_hook to add_option and delete_option method instead of running in init hook to prevent this from loading on every page load.
86
+
87
  = 1.2.5 - 01.11.2018 =
88
  * Added: PHP version check because some users are still using very old PHP version for some reason.
89
  * Fixed: Flipbox Module wrong css classes.
supreme-modules-for-divi.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Divi Supreme Modules
4
  Plugin URI: https://suprememodules.com
5
  Description: Supreme Modules enhances the experience and features found on Divi and extend with custom creative modules to help you build amazing websites.
6
- Version: 1.2.5
7
  Author: Supreme Modules
8
  Author URI: https://suprememodules.com/about-us/
9
  License: GPL2
@@ -36,7 +36,7 @@ if ( version_compare(PHP_VERSION, '5.6', '<') ) {
36
  add_action( 'admin_notices', 'dsm_admin_notice__php_version_error' );
37
  return;
38
  } else {
39
- define( 'DSM_VERSION', '1.2.5' );
40
 
41
  if ( ! function_exists( 'dsm_initialize_extension' ) ):
42
  /**
@@ -69,4 +69,26 @@ if ( version_compare(PHP_VERSION, '5.6', '<') ) {
69
  }
70
 
71
  add_action('admin_enqueue_scripts', 'load_custom_wp_admin_style');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  }
3
  Plugin Name: Divi Supreme Modules
4
  Plugin URI: https://suprememodules.com
5
  Description: Supreme Modules enhances the experience and features found on Divi and extend with custom creative modules to help you build amazing websites.
6
+ Version: 1.2.6
7
  Author: Supreme Modules
8
  Author URI: https://suprememodules.com/about-us/
9
  License: GPL2
36
  add_action( 'admin_notices', 'dsm_admin_notice__php_version_error' );
37
  return;
38
  } else {
39
+ define( 'DSM_VERSION', '1.2.6' );
40
 
41
  if ( ! function_exists( 'dsm_initialize_extension' ) ):
42
  /**
69
  }
70
 
71
  add_action('admin_enqueue_scripts', 'load_custom_wp_admin_style');
72
+
73
+ register_activation_hook( __FILE__, 'dsm_plugin_activate' );
74
+
75
+ if ( ! function_exists( 'dsm_plugin_activate' ) ):
76
+ function dsm_plugin_activate() {
77
+ flush_rewrite_rules();
78
+ if ( ! get_option( 'dsm_flush_rewrite_rules_flag' ) ) {
79
+ add_option( 'dsm_flush_rewrite_rules_flag', true );
80
+ }
81
+ }
82
+ endif;
83
+
84
+ add_action( 'init', 'dsm_flush_rewrite_rules', 20 );
85
+
86
+ if ( ! function_exists( 'dsm_flush_rewrite_rules' ) ):
87
+ function dsm_flush_rewrite_rules() {
88
+ if ( get_option( 'dsm_flush_rewrite_rules_flag' ) ) {
89
+ flush_rewrite_rules();
90
+ delete_option( 'dsm_flush_rewrite_rules_flag' );
91
+ }
92
+ }
93
+ endif;
94
  }