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

Version Description

04.12.2019 = * Added: Display WordPress local timezone when using Scheduled Content Extension for easy viewing. * Rewrote: Scheduled Content Extension. * Changed: Scheduled Content TimeZone to WordPress Timezone.

Download this release

Release Info

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

Code changes from version 1.8.1 to 1.8.2

includes/class-dsm-supreme-modules-for-divi.php CHANGED
@@ -719,6 +719,23 @@ class Dsm_Supreme_Modules_For_Divi {
719
  'dsm_section_schedule_visibility' => 'on',
720
  ),
721
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
722
  $fields['dsm_section_schedule_after_datetime'] = array(
723
  'default' => '',
724
  'label' => esc_html__( 'Schedule a Date/Time', 'dsm-supreme-modules-for-divi' ),
@@ -735,20 +752,33 @@ class Dsm_Supreme_Modules_For_Divi {
735
  public function output_section( $output, $render_slug, $module ) {
736
  if ('et_pb_section' !== $render_slug) {
737
  return $output;
738
- } else if ('on' !== $module->props['dsm_section_schedule_visibility']) {
739
- return $output;
740
  } else {
741
  $dsm_section_schedule_visibility = $module->props['dsm_section_schedule_visibility'];
742
  $dsm_section_schedule_show_hide = $module->props['dsm_section_schedule_show_hide'];
743
  $dsm_section_schedule_after_datetime = $module->props['dsm_section_schedule_after_datetime'];
744
-
745
- $dsm_section_class_output = '';
746
- if ($dsm_section_schedule_visibility == 'on') {
747
- $dsm_section_class_output .= ' dsm_schedule_visibility';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
748
  }
749
- $output = str_replace('class="et_pb_section ', 'data-dsm-' . esc_html($dsm_section_schedule_show_hide) . '="' . esc_html($dsm_section_schedule_after_datetime) . '" class="et_pb_section'. $dsm_section_class_output .' ', $output);
750
- return $output;
751
  }
 
752
  }
753
 
754
  public function dsm_add_row_setting($fields_unprocessed) {
@@ -781,6 +811,23 @@ class Dsm_Supreme_Modules_For_Divi {
781
  'dsm_row_schedule_visibility' => 'on',
782
  ),
783
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
784
  $fields['dsm_row_schedule_after_datetime'] = array(
785
  'default' => '',
786
  'label' => esc_html__( 'Schedule a Date/Time', 'dsm-supreme-modules-for-divi' ),
@@ -797,20 +844,33 @@ class Dsm_Supreme_Modules_For_Divi {
797
  public function output_row( $output, $render_slug, $module ) {
798
  if ('et_pb_row' !== $render_slug) {
799
  return $output;
800
- } else if ('on' !== $module->props['dsm_row_schedule_visibility']) {
801
- return $output;
802
  } else {
803
  $dsm_row_schedule_visibility = $module->props['dsm_row_schedule_visibility'];
804
  $dsm_row_schedule_show_hide = $module->props['dsm_row_schedule_show_hide'];
805
  $dsm_row_schedule_after_datetime = $module->props['dsm_row_schedule_after_datetime'];
806
-
807
- $dsm_row_class_output = '';
808
- if ($dsm_row_schedule_visibility == 'on') {
809
- $dsm_row_class_output .= ' dsm_schedule_visibility';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
810
  }
811
- $output = str_replace('class="et_pb_row ', 'data-dsm-' . esc_html($dsm_row_schedule_show_hide) . '="' . esc_html($dsm_row_schedule_after_datetime) . '" class="et_pb_row'. $dsm_row_class_output .' ', $output);
812
- return $output;
813
  }
 
814
  }
815
 
816
  /**
719
  'dsm_section_schedule_visibility' => 'on',
720
  ),
721
  );
722
+ $fields['dsm_section_schedule_current_time'] = array(
723
+ 'type' => 'warning',
724
+ 'value' => true,
725
+ 'display_if' => true,
726
+ 'message' => esc_html__(
727
+ sprintf(
728
+ 'Your WordPress local timezone is: %s',
729
+ current_time( 'mysql' )
730
+ ),
731
+ 'dsm-supreme-modules-pro-for-divi'
732
+ ),
733
+ 'tab_slug' => 'custom_css',
734
+ 'toggle_slug' => 'visibility',
735
+ 'show_if' => array(
736
+ 'dsm_section_schedule_visibility' => 'on',
737
+ ),
738
+ );
739
  $fields['dsm_section_schedule_after_datetime'] = array(
740
  'default' => '',
741
  'label' => esc_html__( 'Schedule a Date/Time', 'dsm-supreme-modules-for-divi' ),
752
  public function output_section( $output, $render_slug, $module ) {
753
  if ('et_pb_section' !== $render_slug) {
754
  return $output;
 
 
755
  } else {
756
  $dsm_section_schedule_visibility = $module->props['dsm_section_schedule_visibility'];
757
  $dsm_section_schedule_show_hide = $module->props['dsm_section_schedule_show_hide'];
758
  $dsm_section_schedule_after_datetime = $module->props['dsm_section_schedule_after_datetime'];
759
+ $dsm_section_current_wp_date = date( 'Y-m-d H:i:s', current_time( 'timestamp', 0 ));
760
+ if ( isset($dsm_section_schedule_visibility) && $dsm_section_schedule_visibility === 'on' ) {
761
+ if ( is_array( $output ) ) {
762
+ return $output;
763
+ }
764
+
765
+ if ($dsm_section_schedule_show_hide === 'start') {
766
+ if ($dsm_section_schedule_after_datetime >= $dsm_section_current_wp_date ) {
767
+ return;
768
+ } else {
769
+ $output;
770
+ }
771
+ } else {
772
+ if ($dsm_section_schedule_after_datetime <= $dsm_section_current_wp_date ) {
773
+ return;
774
+ } else {
775
+ $output;
776
+ }
777
+ }
778
  }
779
+
 
780
  }
781
+ return $output;
782
  }
783
 
784
  public function dsm_add_row_setting($fields_unprocessed) {
811
  'dsm_row_schedule_visibility' => 'on',
812
  ),
813
  );
814
+ $fields['dsm_row_schedule_current_time'] = array(
815
+ 'type' => 'warning',
816
+ 'value' => true,
817
+ 'display_if' => true,
818
+ 'message' => esc_html__(
819
+ sprintf(
820
+ 'Your WordPress local timezone is: %s',
821
+ current_time( 'mysql' )
822
+ ),
823
+ 'dsm-supreme-modules-pro-for-divi'
824
+ ),
825
+ 'tab_slug' => 'custom_css',
826
+ 'toggle_slug' => 'visibility',
827
+ 'show_if' => array(
828
+ 'dsm_row_schedule_visibility' => 'on',
829
+ ),
830
+ );
831
  $fields['dsm_row_schedule_after_datetime'] = array(
832
  'default' => '',
833
  'label' => esc_html__( 'Schedule a Date/Time', 'dsm-supreme-modules-for-divi' ),
844
  public function output_row( $output, $render_slug, $module ) {
845
  if ('et_pb_row' !== $render_slug) {
846
  return $output;
 
 
847
  } else {
848
  $dsm_row_schedule_visibility = $module->props['dsm_row_schedule_visibility'];
849
  $dsm_row_schedule_show_hide = $module->props['dsm_row_schedule_show_hide'];
850
  $dsm_row_schedule_after_datetime = $module->props['dsm_row_schedule_after_datetime'];
851
+ $dsm_row_current_wp_date = date( 'Y-m-d H:i:s', current_time( 'timestamp', 0 ));
852
+ if ( isset($dsm_row_schedule_visibility) && $dsm_row_schedule_visibility === 'on' ) {
853
+ if ( is_array( $output ) ) {
854
+ return $output;
855
+ }
856
+
857
+ if ($dsm_row_schedule_show_hide === 'start') {
858
+ if ($dsm_row_schedule_after_datetime >= $dsm_row_current_wp_date ) {
859
+ return;
860
+ } else {
861
+ $output;
862
+ }
863
+ } else {
864
+ if ($dsm_row_schedule_after_datetime <= $dsm_row_current_wp_date ) {
865
+ return;
866
+ } else {
867
+ $output;
868
+ }
869
+ }
870
  }
871
+
 
872
  }
873
+ return $output;
874
  }
875
 
876
  /**
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: https://suprememodules.com/
5
  Requires at least: 4.5
6
  Tested up to: 5.3
7
  Requires PHP: 5.6
8
- Stable tag: 1.8.1
9
  License: GPLv2
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -102,6 +102,11 @@ This is a common question that we get asked here every now and then which is why
102
 
103
 
104
  == Changelog ==
 
 
 
 
 
105
  = 1.8.1 – 27.11.2019 =
106
  * Added: Border and Shadow to Facebook Feed and Facebook Comment Module.
107
 
5
  Requires at least: 4.5
6
  Tested up to: 5.3
7
  Requires PHP: 5.6
8
+ Stable tag: 1.8.2
9
  License: GPLv2
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
102
 
103
 
104
  == Changelog ==
105
+ = 1.8.2 – 04.12.2019 =
106
+ * Added: Display WordPress local timezone when using Scheduled Content Extension for easy viewing.
107
+ * Rewrote: Scheduled Content Extension.
108
+ * Changed: Scheduled Content TimeZone to WordPress Timezone.
109
+
110
  = 1.8.1 – 27.11.2019 =
111
  * Added: Border and Shadow to Facebook Feed and Facebook Comment Module.
112
 
scripts/frontend-bundle.min.js CHANGED
@@ -1 +1 @@
1
- !function(t){var n={};function i(e){if(n[e])return n[e].exports;var a=n[e]={i:e,l:!1,exports:{}};return t[e].call(a.exports,a,a.exports,i),a.l=!0,a.exports}i.m=t,i.c=n,i.d=function(t,n,e){i.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:e})},i.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(n,"a",n),n},i.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},i.p="/",i(i.s=329)}({329:function(t,n,i){i(87),i(90),i(330),i(57),i(56),i(76),i(75),i(77),i(331),i(332),i(333),i(52),i(334),i(55),i(91),i(335),i(88),i(53),i(89),i(336),i(54),i(337),t.exports=i(338)},330:function(t,n){},331:function(t,n){},332:function(t,n){},333:function(t,n){},334:function(t,n){},335:function(t,n){},336:function(t,n){},337:function(t,n){},338:function(t,n){jQuery(function(t){var n=t(".dsm-typing-effect .dsm-typing");t(".dsm-typing-effect").length&&t(n).each(function(n,i){var e=t(this).data("dsm-typing-strings").split("|"),a=t(this).data("dsm-typing-loop"),o=parseFloat(t(this).data("dsm-typing-speed"),10),s=parseFloat(t(this).data("dsm-typing-backdelay"),10),d=this,c={strings:e,loop:a,typeSpeed:o,backSpeed:parseFloat(t(this).data("dsm-typing-backspeed"),10),backDelay:s,contentType:"null"},r="";t(this).waypoint({handler:function(t){"down"===t?r=new Typed(d,c):r.destroy()},offset:"100%"})}),t(".dsm_contact_form_7_btn_icon").length&&t(".dsm_contact_form_7_btn_icon").each(function(n,i){var e=t(this).attr("data-dsm-btn-icon");t(this).find(".wpcf7-submit").addClass("et_pb_custom_button_icon"),t(this).find(".wpcf7-submit").attr("data-icon",e)}),t(".dsm_caldera_forms_btn_icon").length&&t(".dsm_caldera_forms_btn_icon").each(function(n,i){var e=t(this).attr("data-dsm-btn-icon");t(this).find(".dsm-cf-submit-button").addClass("et_pb_custom_button_icon"),t(this).find(".dsm-cf-submit-button").attr("data-icon",e)}),t(".dsm_caldera_forms_advanced_btn_icon").length&&t(".dsm_caldera_forms_advanced_btn_icon").each(function(n,i){var e=t(this).attr("data-dsm-advanced-btn-icon");t(this).find(".dsm-cf-advanced-button").addClass("et_pb_custom_button_icon"),t(this).find(".dsm-cf-advanced-button").attr("data-icon",e)}),t("a.dsm-video-lightbox").length&&t("a.dsm-video-lightbox").magnificPopup({type:"iframe",iframe:{markup:'<div class="mfp-iframe-scaler dsm-video-popup"><div class="mfp-close"></div><iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe></div>',patterns:{youtube:{index:"youtube.com/",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1&rel=0"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},dailymotion:{index:"dailymotion.com",id:function(t){var n=t.match(/^.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/);return null!==n?void 0!==n[4]?n[4]:n[2]:null},src:"https://www.dailymotion.com/embed/video/%id%"}},srcAction:"iframe_src"},mainClass:"dsm-video-popup-wrap mfp-fade"}),t("a.dsm-image-lightbox").length&&t("a.dsm-image-lightbox").magnificPopup({type:"image",removalDelay:500,mainClass:"mfp-fade"}),function n(){var i=[],e=new Date;Date.prototype.yyyymmdd=function(){var t=this.getMonth()+1,n=this.getDate();return[this.getFullYear(),(t>9?"":"0")+t,(n>9?"":"0")+n].join("-")};var a=e.yyyymmdd();if(t(".dsm_schedule_visibility").each(function(){var n=t(this).data("dsm-end"),o=c(t(this).data("dsm-start"),this),s=c(n,this);function d(t){var n=t-e;n<864e5&&n>1e3&&i.push(n)}function c(n,i){if(n){String(n).length<6&&String(n).indexOf(":")>-1&&(n=a+" "+String(n)),-1==String(n).indexOf(":")&&(n+=" 00:00");var o=n.split(":"),s=String(o.slice(0,1)),d=s.substr(s.length-2),c=o.slice(1),r=d<24&&c<60;if("Invalid Date"==(u=new Date(n)))var u=function(t){var n,i=new Date(NaN);return t.substr(0,t.indexOf(" ")),parts=/^\s*(\d{4})-(\d\d)-(\d\d)?.(\d\d)?.(\d\d)\s*$/.exec(t),parts&&(n=+parts[2],i.setFullYear(parts[1],n-1,parts[3]),n!=i.getMonth()+1&&i.setTime(NaN),i=new Date(parts[1],n-1,parts[3],parts[4],parts[5])),i}(n);return"Invalid Date"!=u&&r||t(i).addClass("error").attr("title",'"'+n+'" date is incorrect; please use YYYY-MM-DD HH:MM format'),u.getTime()}return e.getTime()}d(o),d(s),o<s&&(o>e||s<e)||o>s&&o>=e&&s<=e?(t(this).hide(),t(this).addClass("dsm-hidden")):(t(this).show(),t(this).removeClass("dsm-hidden"))}),i.length>0){var o=Math.min.apply(null,i);setTimeout(function(){n()},o)}}()})},52:function(t,n){},53:function(t,n){},54:function(t,n){},55:function(t,n){},56:function(t,n){},57:function(t,n){},75:function(t,n){},76:function(t,n){},77:function(t,n){},87:function(t,n){},88:function(t,n){},89:function(t,n){},90:function(t,n){},91:function(t,n){}});
1
+ !function(t){var n={};function i(o){if(n[o])return n[o].exports;var a=n[o]={i:o,l:!1,exports:{}};return t[o].call(a.exports,a,a.exports,i),a.l=!0,a.exports}i.m=t,i.c=n,i.d=function(t,n,o){i.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},i.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(n,"a",n),n},i.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},i.p="/",i(i.s=329)}({329:function(t,n,i){i(87),i(90),i(330),i(57),i(56),i(76),i(75),i(77),i(331),i(332),i(333),i(52),i(334),i(55),i(91),i(335),i(88),i(53),i(89),i(336),i(54),i(337),t.exports=i(338)},330:function(t,n){},331:function(t,n){},332:function(t,n){},333:function(t,n){},334:function(t,n){},335:function(t,n){},336:function(t,n){},337:function(t,n){},338:function(t,n){jQuery(function(t){var n=t(".dsm-typing-effect .dsm-typing");t(".dsm-typing-effect").length&&t(n).each(function(n,i){var o=t(this).data("dsm-typing-strings").split("|"),a=t(this).data("dsm-typing-loop"),e=parseFloat(t(this).data("dsm-typing-speed"),10),c=parseFloat(t(this).data("dsm-typing-backdelay"),10),d=this,s={strings:o,loop:a,typeSpeed:e,backSpeed:parseFloat(t(this).data("dsm-typing-backspeed"),10),backDelay:c,contentType:"null"},f="";t(this).waypoint({handler:function(t){"down"===t?f=new Typed(d,s):f.destroy()},offset:"100%"})}),t(".dsm_contact_form_7_btn_icon").length&&t(".dsm_contact_form_7_btn_icon").each(function(n,i){var o=t(this).attr("data-dsm-btn-icon");t(this).find(".wpcf7-submit").addClass("et_pb_custom_button_icon"),t(this).find(".wpcf7-submit").attr("data-icon",o)}),t(".dsm_caldera_forms_btn_icon").length&&t(".dsm_caldera_forms_btn_icon").each(function(n,i){var o=t(this).attr("data-dsm-btn-icon");t(this).find(".dsm-cf-submit-button").addClass("et_pb_custom_button_icon"),t(this).find(".dsm-cf-submit-button").attr("data-icon",o)}),t(".dsm_caldera_forms_advanced_btn_icon").length&&t(".dsm_caldera_forms_advanced_btn_icon").each(function(n,i){var o=t(this).attr("data-dsm-advanced-btn-icon");t(this).find(".dsm-cf-advanced-button").addClass("et_pb_custom_button_icon"),t(this).find(".dsm-cf-advanced-button").attr("data-icon",o)}),t("a.dsm-video-lightbox").length&&t("a.dsm-video-lightbox").magnificPopup({type:"iframe",iframe:{markup:'<div class="mfp-iframe-scaler dsm-video-popup"><div class="mfp-close"></div><iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe></div>',patterns:{youtube:{index:"youtube.com/",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1&rel=0"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},dailymotion:{index:"dailymotion.com",id:function(t){var n=t.match(/^.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/);return null!==n?void 0!==n[4]?n[4]:n[2]:null},src:"https://www.dailymotion.com/embed/video/%id%"}},srcAction:"iframe_src"},mainClass:"dsm-video-popup-wrap mfp-fade"}),t("a.dsm-image-lightbox").length&&t("a.dsm-image-lightbox").magnificPopup({type:"image",removalDelay:500,mainClass:"mfp-fade"})})},52:function(t,n){},53:function(t,n){},54:function(t,n){},55:function(t,n){},56:function(t,n){},57:function(t,n){},75:function(t,n){},76:function(t,n){},77:function(t,n){},87:function(t,n){},88:function(t,n){},89:function(t,n){},90:function(t,n){},91:function(t,n){}});
supreme-modules-for-divi.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Supreme Modules for Divi
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: 1.8.1
7
  Author: Supreme Modules
8
  Author URI: https://suprememodules.com/about-us/
9
  License: GPL2
@@ -27,7 +27,7 @@ along with Supreme Modules. If not, see https://www.gnu.org/licenses/gpl-2.0.htm
27
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
28
 
29
  if ( ! defined('DSM_VERSION') ) {
30
- define( 'DSM_VERSION', '1.8.1' );
31
  }
32
  if ( ! defined('DSM_SHORTCODE') ) {
33
  define( 'DSM_SHORTCODE', 'divi_shortcode' );
3
  Plugin Name: Supreme Modules for Divi
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: 1.8.2
7
  Author: Supreme Modules
8
  Author URI: https://suprememodules.com/about-us/
9
  License: GPL2
27
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
28
 
29
  if ( ! defined('DSM_VERSION') ) {
30
+ define( 'DSM_VERSION', '1.8.2' );
31
  }
32
  if ( ! defined('DSM_SHORTCODE') ) {
33
  define( 'DSM_SHORTCODE', 'divi_shortcode' );