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

Version Description

  • 04.08.2019 =
  • Fixed: Divi templates assigned to footer when using post/page blank template.
  • Added: Show or Hide Custom Footer on Blank Template option in Divi Templates.
Download this release

Release Info

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

Code changes from version 1.6.5 to 1.6.6

admin/js/dsm-admin.js CHANGED
@@ -10,9 +10,9 @@
10
  $('.dsm-css-classes-meta-box-options').css("display", "block");
11
  }
12
  if ($('select[name="dsm-header-footer-meta-box-options"]').val() == 'top_header' || $('select[name="dsm-header-footer-meta-box-options"]').val() == '404') {
13
- $('.dsm-remove-default-footer-meta-box-options').css("display", "none");
14
  } else {
15
- $('.dsm-remove-default-footer-meta-box-options').css("display", "block");
16
  }
17
  });
18
  }
10
  $('.dsm-css-classes-meta-box-options').css("display", "block");
11
  }
12
  if ($('select[name="dsm-header-footer-meta-box-options"]').val() == 'top_header' || $('select[name="dsm-header-footer-meta-box-options"]').val() == '404') {
13
+ $('.dsm-remove-default-footer-meta-box-options, .dsm-footer-show-on-blank-template-meta-box-options').css("display", "none");
14
  } else {
15
+ $('.dsm-remove-default-footer-meta-box-options, .dsm-footer-show-on-blank-template-meta-box-options').css("display", "block");
16
  }
17
  });
18
  }
includes/SupremeModulesForDivi.php CHANGED
@@ -27,7 +27,7 @@ class DSM_SupremeModulesForDivi extends DiviExtension {
27
  *
28
  * @var string
29
  */
30
- public $version = '1.6.5';
31
 
32
  /**
33
  * DSM_SupremeModulesForDivi constructor.
27
  *
28
  * @var string
29
  */
30
+ public $version = '1.6.6';
31
 
32
  /**
33
  * DSM_SupremeModulesForDivi constructor.
includes/class-dsm-supreme-modules-for-divi.php CHANGED
@@ -481,29 +481,13 @@ class Dsm_Supreme_Modules_For_Divi {
481
  <label for="dsm-css-classes-meta-box-options" style="display: block; font-weight: bold; margin-bottom: 5px;">CSS Classes:</label>
482
  <input name="dsm-css-classes-meta-box-options" style="width:100%;" type="text" value="<?php echo get_post_meta($post->ID, 'dsm-css-classes-meta-box-options', true); ?>">
483
  </p>
484
- <p class="dsm-remove-default-footer-meta-box-options">
485
- <label for="dsm-remove-default-footer-meta-box-options" style="display: block; font-weight: bold; margin-bottom: 5px;">Remove default Divi footer</label>
486
- <select name="dsm-remove-default-footer-meta-box-options">
487
- <?php
488
- $option_values = array(
489
- 'no' => __( 'No', 'dsm-supreme-modules-for-divi' ),
490
- 'yes' => __( 'Yes', 'dsm-supreme-modules-for-divi' ),
491
- );
492
-
493
- foreach($option_values as $key => $value) {
494
- if($key == get_post_meta($post->ID, 'dsm-remove-default-footer-meta-box-options', true)) {
495
- ?>
496
- <option value="<?php echo $key; ?>" selected><?php echo $value; ?></option>
497
- <?php
498
- }
499
- else {
500
- ?>
501
- <option value="<?php echo $key; ?>"><?php echo $value; ?></option>
502
- <?php
503
- }
504
- }
505
- ?>
506
- </select>
507
  </p>
508
  <p><?php _e( 'Note: Footer Template will only show up on the frontend.', 'dsm-supreme-modules-for-divi' ); ?></p>
509
  </div>
@@ -540,8 +524,14 @@ class Dsm_Supreme_Modules_For_Divi {
540
  }
541
 
542
  if ( isset( $_POST['dsm-remove-default-footer-meta-box-options'] ) ) {
543
- update_post_meta( $post_id, 'dsm-remove-default-footer-meta-box-options', esc_attr( $_POST['dsm-remove-default-footer-meta-box-options'] ) );
544
- }
 
 
 
 
 
 
545
  /*
546
  if ( isset( $_POST['dsm-embed-footer-in-vb'] ) ) {
547
  update_post_meta( $post_id, 'dsm-embed-footer-in-vb', sanitize_text_field( $_POST['dsm-embed-footer-in-vb'] ) );
@@ -597,6 +587,16 @@ class Dsm_Supreme_Modules_For_Divi {
597
  $footer_template_css_output = '';
598
  }
599
 
 
 
 
 
 
 
 
 
 
 
600
  if ( !et_core_is_fb_enabled() ) {
601
  $footer_output = sprintf(
602
  '<footer id="dsm-footer" class="dsm-footer" itemscope="itemscope" itemtype="https://schema.org/WPFooter">%1$s</footer>
481
  <label for="dsm-css-classes-meta-box-options" style="display: block; font-weight: bold; margin-bottom: 5px;">CSS Classes:</label>
482
  <input name="dsm-css-classes-meta-box-options" style="width:100%;" type="text" value="<?php echo get_post_meta($post->ID, 'dsm-css-classes-meta-box-options', true); ?>">
483
  </p>
484
+ <p class="dsm-remove-default-footer-meta-box-options" style="margin-bottom: 0;">
485
+ <input type="checkbox" name="dsm-remove-default-footer-meta-box-options" id="dsm-remove-default-footer-meta-box-options" value="yes" <?php if ( isset ( get_post_meta($post->ID)['dsm-remove-default-footer-meta-box-options'] ) ) checked( get_post_meta($post->ID)['dsm-remove-default-footer-meta-box-options'][0], 'yes' ); ?> />
486
+ <label for="dsm-remove-default-footer-meta-box-options">Remove default Divi footer</label>
487
+ </p>
488
+ <p class="dsm-footer-show-on-blank-template-meta-box-options" style="margin-top: 0;">
489
+ <input type="checkbox" name="dsm-footer-show-on-blank-template" id="dsm-footer-show-on-blank-template" value="yes" <?php if ( isset ( get_post_meta($post->ID)['dsm-footer-show-on-blank-template'] ) ) checked( get_post_meta($post->ID)['dsm-footer-show-on-blank-template'][0], 'yes' ); ?> />
490
+ <label for="dsm-footer-show-on-blank-template">Show on Blank Page Template</label>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
491
  </p>
492
  <p><?php _e( 'Note: Footer Template will only show up on the frontend.', 'dsm-supreme-modules-for-divi' ); ?></p>
493
  </div>
524
  }
525
 
526
  if ( isset( $_POST['dsm-remove-default-footer-meta-box-options'] ) ) {
527
+ $dsm_remove_default_footer = $_POST['dsm-remove-default-footer-meta-box-options'];
528
+ }
529
+ update_post_meta($post_id, 'dsm-remove-default-footer-meta-box-options', $dsm_remove_default_footer);
530
+
531
+ if ( isset( $_POST['dsm-footer-show-on-blank-template'] ) ) {
532
+ $dsm_footer_hide_on_blank_template = $_POST['dsm-footer-show-on-blank-template'];
533
+ }
534
+ update_post_meta($post_id, 'dsm-footer-show-on-blank-template', $dsm_footer_hide_on_blank_template);
535
  /*
536
  if ( isset( $_POST['dsm-embed-footer-in-vb'] ) ) {
537
  update_post_meta( $post_id, 'dsm-embed-footer-in-vb', sanitize_text_field( $_POST['dsm-embed-footer-in-vb'] ) );
587
  $footer_template_css_output = '';
588
  }
589
 
590
+ /*Get Blank Template*/
591
+ global $post;
592
+ if ( !$post ) {
593
+ return false;
594
+ }
595
+
596
+ if ( get_post_meta( $post->ID, '_wp_page_template', true ) === 'page-template-blank.php' && ( $footer_template_css['dsm-footer-show-on-blank-template'][0] == '' || $footer_template_css['dsm-footer-show-on-blank-template'][0] == 'no' ) ) {
597
+ return;
598
+ }
599
+
600
  if ( !et_core_is_fb_enabled() ) {
601
  $footer_output = sprintf(
602
  '<footer id="dsm-footer" class="dsm-footer" itemscope="itemscope" itemtype="https://schema.org/WPFooter">%1$s</footer>
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: https://suprememodules.com/
5
  Requires at least: 4.5
6
  Tested up to: 5.2.2
7
  Requires PHP: 5.6
8
- Stable tag: 1.6.5
9
  License: GPLv2
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -99,6 +99,10 @@ Your existing modules/content will work with pro version. So you won't lose any
99
 
100
 
101
  == Changelog ==
 
 
 
 
102
  = 1.6.5 - 24.07.2019 =
103
  * Fixed: var_dump output when using Caldera Forms module.
104
  * Fixed: Divi Supreme Flipbox item text alignment on Visual Builder – Default should be left.
5
  Requires at least: 4.5
6
  Tested up to: 5.2.2
7
  Requires PHP: 5.6
8
+ Stable tag: 1.6.6
9
  License: GPLv2
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
99
 
100
 
101
  == Changelog ==
102
+ = 1.6.6 - 04.08.2019 =
103
+ * Fixed: Divi templates assigned to footer when using post/page blank template.
104
+ * Added: Show or Hide Custom Footer on Blank Template option in Divi Templates.
105
+
106
  = 1.6.5 - 24.07.2019 =
107
  * Fixed: var_dump output when using Caldera Forms module.
108
  * Fixed: Divi Supreme Flipbox item text alignment on Visual Builder – Default should be left.
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.6.5
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.6.5' );
31
  }
32
  if ( ! defined('DSM_SHORTCODE') ) {
33
  define( 'DSM_SHORTCODE', 'divi_shortcode' );
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.6.6
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.6.6' );
31
  }
32
  if ( ! defined('DSM_SHORTCODE') ) {
33
  define( 'DSM_SHORTCODE', 'divi_shortcode' );