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

Version Description

  • 17.08.2019 = Added: Remove All Data on Uninstall (Related to Divi Supreme Settings) Option in the Divi Supreme Settings page. Added: Search No Result template to Divi Templates. Fixed: Footer not showing up on 404 page when using Show on 404 Page Option. Fixed: Unnecessary empty HTML p and br Tag on Footer. Fixed: Footer not showing up on search no result page. Enhanced: Echo method for Divi Template Posts. Enhanced: 404 template. Enhanced: Divi Supreme Settings Page.
Download this release

Release Info

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

Code changes from version 1.7 to 1.7.1

admin/css/dsm-plugin.css CHANGED
@@ -13,21 +13,32 @@
13
  .dsm-section-subtitle h3 {
14
  margin: 0;
15
  }
16
- #dsm_general th {
 
17
  white-space: nowrap;
18
  }
19
- #dsm_general .form-table {
 
20
  padding: 23px 15px;
21
- border: 1px solid #e5e5e5;
22
- box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
23
  background: #fff;
24
- margin-top: 2em;
25
  border-collapse: initial;
26
  }
27
 
28
- #dsm_general h2 {
29
- padding: 9px 0 4px 0;
30
  font-size: 1.3em;
 
 
 
 
 
 
 
 
 
 
31
  }
32
 
33
  .dsm-settings-checkbox fieldset label {
@@ -88,7 +99,7 @@
88
  border-radius: 50%;
89
  }
90
 
91
- #dsm_general p.submit .button-primary {
92
  color: #fff;
93
  border-color: #25db92;
94
  border-radius: 50px;
@@ -104,8 +115,8 @@
104
  transition: color 300ms ease 0ms, color 300ms ease 0ms, background-color 300ms ease 0ms, background-color 300ms ease 0ms, border 300ms ease 0ms, border 300ms ease 0ms, border-radius 300ms ease 0ms, border-radius 300ms ease 0ms;
105
  }
106
 
107
- #dsm_general p.submit .button-primary:hover,
108
- #dsm_general p.submit .button-primary:focus {
109
  background: #fff;
110
  color: #30323d;
111
  border-color: #fff;
@@ -117,7 +128,12 @@
117
  #dsm_header_footer_meta_box .dsm-header-footer-meta-box.dsm_404 .dsm-conditional-meta-box-options,
118
  #dsm_header_footer_meta_box .dsm-header-footer-meta-box.dsm_404 .dsm-css-classes-meta-box-options,
119
  #dsm_header_footer_meta_box .dsm-header-footer-meta-box.dsm_404 .dsm-footer-show-on-blank-template-meta-box-options,
120
- #dsm_header_footer_meta_box .dsm-header-footer-meta-box.dsm_404 .dsm-footer-show-on-404-template-meta-box-options
 
 
 
 
 
121
  {
122
  display: none;
123
  }
13
  .dsm-section-subtitle h3 {
14
  margin: 0;
15
  }
16
+
17
+ .dsm-settings-panel th {
18
  white-space: nowrap;
19
  }
20
+
21
+ .dsm-settings-panel .form-table {
22
  padding: 23px 15px;
23
+ box-shadow: 0 5px 30px rgba(0,0,0,.1);
24
+ border-radius: 3px;
25
  background: #fff;
 
26
  border-collapse: initial;
27
  }
28
 
29
+ .dsm-settings-panel h2 {
30
+ padding: 9px 0 4px 0;
31
  font-size: 1.3em;
32
+ display: none;
33
+ }
34
+ .dsm-settings-panel .postbox-container {
35
+ margin-top: .5em;
36
+ }
37
+
38
+ .dsm-settings-panel .postbox-container .postbox {
39
+ box-shadow: 0 5px 30px rgba(0,0,0,.1);
40
+ border-radius: 3px;
41
+ border: none;
42
  }
43
 
44
  .dsm-settings-checkbox fieldset label {
99
  border-radius: 50%;
100
  }
101
 
102
+ .dsm-settings-panel p.submit .button-primary {
103
  color: #fff;
104
  border-color: #25db92;
105
  border-radius: 50px;
115
  transition: color 300ms ease 0ms, color 300ms ease 0ms, background-color 300ms ease 0ms, background-color 300ms ease 0ms, border 300ms ease 0ms, border 300ms ease 0ms, border-radius 300ms ease 0ms, border-radius 300ms ease 0ms;
116
  }
117
 
118
+ .dsm-settings-panel p.submit .button-primary:hover,
119
+ .dsm-settings-panel p.submit .button-primary:focus {
120
  background: #fff;
121
  color: #30323d;
122
  border-color: #fff;
128
  #dsm_header_footer_meta_box .dsm-header-footer-meta-box.dsm_404 .dsm-conditional-meta-box-options,
129
  #dsm_header_footer_meta_box .dsm-header-footer-meta-box.dsm_404 .dsm-css-classes-meta-box-options,
130
  #dsm_header_footer_meta_box .dsm-header-footer-meta-box.dsm_404 .dsm-footer-show-on-blank-template-meta-box-options,
131
+ #dsm_header_footer_meta_box .dsm-header-footer-meta-box.dsm_404 .dsm-footer-show-on-404-template-meta-box-options,
132
+ #dsm_header_footer_meta_box .dsm-header-footer-meta-box.dsm_search_no_result .dsm-remove-default-footer-meta-box-options,
133
+ #dsm_header_footer_meta_box .dsm-header-footer-meta-box.dsm_search_no_result .dsm-conditional-meta-box-options,
134
+ #dsm_header_footer_meta_box .dsm-header-footer-meta-box.dsm_search_no_result .dsm-css-classes-meta-box-options,
135
+ #dsm_header_footer_meta_box .dsm-header-footer-meta-box.dsm_search_no_result .dsm-footer-show-on-blank-template-meta-box-options,
136
+ #dsm_header_footer_meta_box .dsm-header-footer-meta-box.dsm_search_no_result .dsm-footer-show-on-404-template-meta-box-options
137
  {
138
  display: none;
139
  }
admin/js/dsm-admin.js CHANGED
@@ -2,12 +2,12 @@
2
  $(
3
  function() {
4
  $('select[name="dsm-header-footer-meta-box-options"]').change(function() {
5
- if ($('select[name="dsm-header-footer-meta-box-options"]').val() == '404') {
6
  $('.dsm-conditional-meta-box-options, .dsm-css-classes-meta-box-options, .dsm-footer-show-on-blank-template-meta-box-options, .dsm-footer-show-on-404-template-meta-box-options').css("display", "none");
7
  } else {
8
  $('.dsm-conditional-meta-box-options, .dsm-css-classes-meta-box-options, .dsm-footer-show-on-blank-template-meta-box-options, .dsm-footer-show-on-404-template-meta-box-options').css("display", "block");
9
  }
10
- if ($('select[name="dsm-header-footer-meta-box-options"]').val() == 'top_header' || $('select[name="dsm-header-footer-meta-box-options"]').val() == '404') {
11
  $('.dsm-remove-default-footer-meta-box-options, .dsm-footer-show-on-blank-template-meta-box-options, .dsm-footer-show-on-404-template-meta-box-options').css("display", "none");
12
  } else {
13
  $('.dsm-remove-default-footer-meta-box-options, .dsm-footer-show-on-blank-template-meta-box-options, .dsm-footer-show-on-404-template-meta-box-options').css("display", "block");
2
  $(
3
  function() {
4
  $('select[name="dsm-header-footer-meta-box-options"]').change(function() {
5
+ if ($('select[name="dsm-header-footer-meta-box-options"]').val() == '404' || $('select[name="dsm-header-footer-meta-box-options"]').val() == 'search_no_result') {
6
  $('.dsm-conditional-meta-box-options, .dsm-css-classes-meta-box-options, .dsm-footer-show-on-blank-template-meta-box-options, .dsm-footer-show-on-404-template-meta-box-options').css("display", "none");
7
  } else {
8
  $('.dsm-conditional-meta-box-options, .dsm-css-classes-meta-box-options, .dsm-footer-show-on-blank-template-meta-box-options, .dsm-footer-show-on-404-template-meta-box-options').css("display", "block");
9
  }
10
+ if ($('select[name="dsm-header-footer-meta-box-options"]').val() == 'top_header' || $('select[name="dsm-header-footer-meta-box-options"]').val() == '404' || $('select[name="dsm-header-footer-meta-box-options"]').val() == 'search_no_result') {
11
  $('.dsm-remove-default-footer-meta-box-options, .dsm-footer-show-on-blank-template-meta-box-options, .dsm-footer-show-on-404-template-meta-box-options').css("display", "none");
12
  } else {
13
  $('.dsm-remove-default-footer-meta-box-options, .dsm-footer-show-on-blank-template-meta-box-options, .dsm-footer-show-on-404-template-meta-box-options').css("display", "block");
includes/SupremeModulesForDivi.php CHANGED
@@ -27,7 +27,7 @@ class DSM_SupremeModulesForDivi extends DiviExtension {
27
  *
28
  * @var string
29
  */
30
- public $version = '1.7';
31
 
32
  /**
33
  * DSM_SupremeModulesForDivi constructor.
27
  *
28
  * @var string
29
  */
30
+ public $version = '1.7.1';
31
 
32
  /**
33
  * DSM_SupremeModulesForDivi constructor.
includes/class-dsm-supreme-modules-for-divi.php CHANGED
@@ -196,8 +196,8 @@ class Dsm_Supreme_Modules_For_Divi {
196
  add_filter( 'post_class', array( $this, 'dsm_load_headerfooter_post_class' ), 11 );
197
  add_action( 'add_meta_boxes', array( $this, 'dsm_add_header_footer_meta_box' ), 11 );
198
  add_action( 'save_post', array( $this, 'dsm_save_header_footer_meta_box' ), 10, 3 );
199
- add_action( 'et_after_main_content', array( $this, 'dsm_custom_footer' ) );
200
- add_filter( 'template_include', array( $this, 'dsm_redirect_404' ) );
201
  add_action( 'wp_print_scripts', array( $this, 'dsm_custom_footer_settings' ), 30 );
202
  add_action( 'admin_notices', array( $this, 'dsm_header_footer_admin_notice' ) );
203
  }
@@ -389,7 +389,20 @@ class Dsm_Supreme_Modules_For_Divi {
389
  }
390
  }
391
  }
392
-
 
 
 
 
 
 
 
 
 
 
 
 
 
393
  /**
394
  * Creates the Divi Template
395
  *
@@ -459,7 +472,7 @@ class Dsm_Supreme_Modules_For_Divi {
459
  $option_values = array(
460
  'footer' => __( 'Footer', 'dsm-supreme-modules-for-divi' ),
461
  '404' => __( '404', 'dsm-supreme-modules-for-divi' ),
462
- //'header' => __( 'Header (Not available)', 'dsm-supreme-modules-for-divi' ),
463
  );
464
 
465
  foreach($option_values as $key => $value) {
@@ -546,6 +559,7 @@ class Dsm_Supreme_Modules_For_Divi {
546
  update_post_meta( $post_id, 'dsm-embed-footer-in-vb', sanitize_text_field( $_POST['dsm-embed-footer-in-vb'] ) );
547
  }*/
548
  }
 
549
  public function dsm_custom_footer() {
550
  $footer_args = array(
551
  'post_type' => 'dsm_header_footer',
@@ -586,8 +600,9 @@ class Dsm_Supreme_Modules_For_Divi {
586
  );
587
 
588
  if ( $footer_template->have_posts() ) {
 
589
  $footer_template_ID = $footer_template->post->ID;
590
- $footer_template_shortcode = apply_filters('the_content', get_post_field('post_content', $footer_template_ID));
591
  $footer_template_css = get_post_custom($footer_template_ID);
592
 
593
  if ( $footer_template_css['dsm-css-classes-meta-box-options'][0] != '' ) {
@@ -595,13 +610,13 @@ class Dsm_Supreme_Modules_For_Divi {
595
  } else {
596
  $footer_template_css_output = '';
597
  }
598
-
599
  /*Get Blank Template*/
600
  global $post;
601
  if ( !$post ) {
602
  return false;
603
  }
604
-
605
  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' ) ) {
606
  return;
607
  }
@@ -617,33 +632,23 @@ class Dsm_Supreme_Modules_For_Divi {
617
  }
618
  }
619
  }
620
- public function dsm_redirect_404($template) {
621
- $dsm_four_zero_four_args = array(
622
- 'post_type' => 'dsm_header_footer',
623
- 'meta_key' => 'dsm-header-footer-meta-box-options',
624
- 'meta_value' => '404',
625
- 'meta_type' => 'post',
626
- 'meta_query' => array(
627
- array(
628
- 'key' => 'dsm-header-footer-meta-box-options',
629
- 'value' => '404',
630
- 'compare' => '==',
631
- 'type' => 'post',
632
- ),
633
- ),
634
- );
635
-
636
- $dsm_four_zero_four_template = new WP_Query(
637
- $dsm_four_zero_four_args
638
- );
639
-
640
- if ( $dsm_four_zero_four_template->have_posts() ) {
641
- if ( is_404() ) {
642
- return plugin_dir_path( __FILE__ ) . 'templates/page-template-404.php';
643
  }
644
  }
 
 
 
 
645
  return $template;
646
  }
 
647
  public function dsm_custom_footer_settings() {
648
  $footer_args = array(
649
  'post_type' => 'dsm_header_footer',
196
  add_filter( 'post_class', array( $this, 'dsm_load_headerfooter_post_class' ), 11 );
197
  add_action( 'add_meta_boxes', array( $this, 'dsm_add_header_footer_meta_box' ), 11 );
198
  add_action( 'save_post', array( $this, 'dsm_save_header_footer_meta_box' ), 10, 3 );
199
+ add_action( 'et_after_main_content', array( $this, 'dsm_custom_footer' ) );
200
+ add_filter( 'template_include', array( $this, 'dsm_redirect_template' ) );
201
  add_action( 'wp_print_scripts', array( $this, 'dsm_custom_footer_settings' ), 30 );
202
  add_action( 'admin_notices', array( $this, 'dsm_header_footer_admin_notice' ) );
203
  }
389
  }
390
  }
391
  }
392
+ /**
393
+ * Shortcode Empty Paragraph fix
394
+ *
395
+ * @since 1.0.0
396
+ */
397
+ public function dsm_fix_shortcodes( $content ){
398
+ $array = array (
399
+ '<p>[' => '[',
400
+ ']</p>' => ']',
401
+ ']<br />' => ']'
402
+ );
403
+ $content = strtr( $content, $array );
404
+ return $content;
405
+ }
406
  /**
407
  * Creates the Divi Template
408
  *
472
  $option_values = array(
473
  'footer' => __( 'Footer', 'dsm-supreme-modules-for-divi' ),
474
  '404' => __( '404', 'dsm-supreme-modules-for-divi' ),
475
+ 'search_no_result' => __( 'Search No Result', 'dsm-supreme-modules-for-divi' ),
476
  );
477
 
478
  foreach($option_values as $key => $value) {
559
  update_post_meta( $post_id, 'dsm-embed-footer-in-vb', sanitize_text_field( $_POST['dsm-embed-footer-in-vb'] ) );
560
  }*/
561
  }
562
+
563
  public function dsm_custom_footer() {
564
  $footer_args = array(
565
  'post_type' => 'dsm_header_footer',
600
  );
601
 
602
  if ( $footer_template->have_posts() ) {
603
+ add_filter('the_content', array( $this, 'dsm_fix_shortcodes' ) );
604
  $footer_template_ID = $footer_template->post->ID;
605
+ $footer_template_shortcode = apply_filters('the_content', get_post_field( 'post_content', $footer_template_ID ) );
606
  $footer_template_css = get_post_custom($footer_template_ID);
607
 
608
  if ( $footer_template_css['dsm-css-classes-meta-box-options'][0] != '' ) {
610
  } else {
611
  $footer_template_css_output = '';
612
  }
613
+
614
  /*Get Blank Template*/
615
  global $post;
616
  if ( !$post ) {
617
  return false;
618
  }
619
+
620
  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' ) ) {
621
  return;
622
  }
632
  }
633
  }
634
  }
635
+ public function dsm_redirect_template($template) {
636
+ global $wp_query;
637
+ if ( is_404() ) {
638
+ return plugin_dir_path( __FILE__ ) . 'templates/page-template-404.php';
639
+ }
640
+ if ( is_search() ) {
641
+ if ( 0 == $wp_query->found_posts ) {
642
+ return plugin_dir_path( __FILE__ ) . 'templates/page-template-search.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
643
  }
644
  }
645
+ /*
646
+ if ( basename($template) === 'page.php') {
647
+ return plugin_dir_path( __FILE__ ) . 'templates/page-template.php';
648
+ }*/
649
  return $template;
650
  }
651
+
652
  public function dsm_custom_footer_settings() {
653
  $footer_args = array(
654
  'post_type' => 'dsm_header_footer',
includes/class.page-settings.php CHANGED
@@ -38,13 +38,12 @@ class DSM_Settings {
38
  array(
39
  'id' => 'dsm_general',
40
  'title' => __( 'Divi Supreme General Settings', 'dsm-supreme-modules-for-divi' ),
41
- 'desc' => __( 'Divi Supreme features a huge collection of custom creative modules and extensions that can be used in the Divi Theme, Extra Theme and the Divi Builder. This is really a premium plugin that you can get for free on WordPress plugin repository. Here&apos;s where you can find extra features for Divi to help you build better websites.', 'dsm-supreme-modules-for-divi' ),
42
  ),
43
- /*
44
  array(
45
- 'id' => 'dsm_advanced',
46
- 'title' => __( 'Advanced', 'dsm-supreme-modules-for-divi' )
47
- )*/
48
  );
49
  return $sections;
50
  }
@@ -88,43 +87,14 @@ class DSM_Settings {
88
  'default' => 'off'
89
  ),
90
  ),
91
- /*
92
- 'dsm_advanced' => array(
93
- array(
94
- 'name' => 'color',
95
- 'label' => __( 'Color', 'wedevs' ),
96
- 'desc' => __( 'Color description', 'wedevs' ),
97
- 'type' => 'color',
98
- 'default' => ''
99
- ),
100
- array(
101
- 'name' => 'password',
102
- 'label' => __( 'Password', 'wedevs' ),
103
- 'desc' => __( 'Password description', 'wedevs' ),
104
- 'type' => 'password',
105
- 'default' => '123'
106
- ),
107
- array(
108
- 'name' => 'wysiwyg',
109
- 'label' => __( 'Advanced Editor', 'wedevs' ),
110
- 'desc' => __( 'WP_Editor description', 'wedevs' ),
111
- 'type' => 'wysiwyg',
112
- 'default' => ''
113
- ),
114
- array(
115
- 'name' => 'multicheck',
116
- 'label' => __( 'Multile checkbox', 'wedevs' ),
117
- 'desc' => __( 'Multi checkbox description', 'wedevs' ),
118
- 'type' => 'multicheck',
119
- 'default' => array('one' => 'one', 'four' => 'four'),
120
- 'options' => array(
121
- 'one' => 'One',
122
- 'two' => 'Two',
123
- 'three' => 'Three',
124
- 'four' => 'Four'
125
- )
126
  ),
127
- )*/
128
  );
129
 
130
  return $settings_fields;
38
  array(
39
  'id' => 'dsm_general',
40
  'title' => __( 'Divi Supreme General Settings', 'dsm-supreme-modules-for-divi' ),
41
+ //'desc' => __( 'Divi Supreme features a huge collection of custom creative modules and extensions that can be used in the Divi Theme, Extra Theme and the Divi Builder. This is really a premium plugin that you can get for free on WordPress plugin repository. Here&apos;s where you can find extra features for Divi to help you build better websites.', 'dsm-supreme-modules-for-divi' ),
42
  ),
 
43
  array(
44
+ 'id' => 'dsm_settings_misc',
45
+ 'title' => __( 'Misc', 'dsm-supreme-modules-for-divi' )
46
+ )
47
  );
48
  return $sections;
49
  }
87
  'default' => 'off'
88
  ),
89
  ),
90
+ 'dsm_settings_misc' => array(
91
+ 'dsm_uninstall_on_delete' => array(
92
+ 'name' => 'dsm_uninstall_on_delete',
93
+ 'label' => __( 'Remove Data on Uninstall?', 'dsm-supreme-modules-for-divi' ),
94
+ 'desc' => __( 'Check this box if you would like Divi Supreme to completely remove all of its data when the plugin is deleted.', 'dsm-supreme-modules-for-divi' ),
95
+ 'type' => 'checkbox',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  ),
97
+ ),
98
  );
99
 
100
  return $settings_fields;
includes/class.settings-api.php CHANGED
@@ -518,7 +518,7 @@ class DSM_Settings_API {
518
  */
519
  function show_forms() {
520
  ?>
521
- <div id="poststuff">
522
  <div id="post-body" class="metabox-holder columns-2">
523
  <div id="post-body-content">
524
  <div class="meta-box-sortables ui-sortable">
@@ -532,7 +532,7 @@ class DSM_Settings_API {
532
  do_action( 'wsa_form_bottom_' . $form['id'], $form );
533
  if ( isset( $this->settings_fields[ $form['id'] ] ) ):
534
  ?>
535
- <div style="padding-left: 10px">
536
  <?php submit_button(); ?>
537
  </div>
538
  <?php endif; ?>
518
  */
519
  function show_forms() {
520
  ?>
521
+ <div id="poststuff" class="dsm-settings-panel">
522
  <div id="post-body" class="metabox-holder columns-2">
523
  <div id="post-body-content">
524
  <div class="meta-box-sortables ui-sortable">
532
  do_action( 'wsa_form_bottom_' . $form['id'], $form );
533
  if ( isset( $this->settings_fields[ $form['id'] ] ) ):
534
  ?>
535
+ <div>
536
  <?php submit_button(); ?>
537
  </div>
538
  <?php endif; ?>
includes/templates/page-template-404.php CHANGED
@@ -6,36 +6,50 @@ Template Name: 404 Blank Page
6
  get_header();
7
  ?>
8
  <div id="main-content">
9
- <article id="post-0" <?php post_class( 'not_found' ); ?>>
10
- <?php
11
- $fourzerofour_args = array(
12
- 'post_type' => 'dsm_header_footer',
13
- 'meta_key' => 'dsm-header-footer-meta-box-options',
14
- 'meta_value' => '404',
15
- 'meta_type' => 'post',
16
- 'meta_query' => array(
17
- array(
18
- 'key' => 'dsm-header-footer-meta-box-options',
19
- 'value' => '404',
20
- 'compare' => '==',
21
- 'type' => 'post',
22
- ),
23
- ),
24
- );
25
-
26
- $fourzerofour_template = new WP_Query(
27
- $fourzerofour_args
28
- );
29
 
30
- if ( $fourzerofour_template->have_posts() ) {
31
- $fourzerofour_template_ID = $fourzerofour_template->post->ID;
32
- $fourzerofour_template_shortcode = apply_filters('the_content', get_post_field('post_content', $fourzerofour_template_ID));
33
 
34
- echo $fourzerofour_template_shortcode;
35
- }
 
 
 
 
 
 
36
  ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
- </article> <!-- .et_pb_post -->
39
  </div> <!-- #main-content -->
40
 
41
  <?php
@@ -78,8 +92,20 @@ get_header();
78
  );
79
 
80
  if ( $footer_template->have_posts() ) {
 
 
 
 
 
 
 
 
 
 
 
 
81
  $footer_template_ID = $footer_template->post->ID;
82
- $footer_template_shortcode = apply_filters('the_content', get_post_field('post_content', $footer_template_ID));
83
  $footer_template_css = get_post_custom($footer_template_ID);
84
 
85
  if ( $footer_template_css['dsm-css-classes-meta-box-options'][0] != '' ) {
@@ -87,8 +113,7 @@ get_header();
87
  } else {
88
  $footer_template_css_output = '';
89
  }
90
-
91
- if ( !et_core_is_fb_enabled() && is_404() ) {
92
  $footer_output = sprintf(
93
  '<footer id="dsm-footer" class="%2$s" itemscope="itemscope" itemtype="https://schema.org/WPFooter">%1$s</footer>
94
  ',
6
  get_header();
7
  ?>
8
  <div id="main-content">
9
+ <?php
10
+ $fourzerofour_args = array(
11
+ 'post_type' => 'dsm_header_footer',
12
+ 'meta_key' => 'dsm-header-footer-meta-box-options',
13
+ 'meta_value' => '404',
14
+ 'meta_type' => 'post',
15
+ 'meta_query' => array(
16
+ array(
17
+ 'key' => 'dsm-header-footer-meta-box-options',
18
+ 'value' => '404',
19
+ 'compare' => '==',
20
+ 'type' => 'post',
21
+ ),
22
+ ),
23
+ );
 
 
 
 
 
24
 
25
+ $fourzerofour_template = new WP_Query(
26
+ $fourzerofour_args
27
+ );
28
 
29
+ if ( $fourzerofour_template->have_posts() ) {
30
+ $fourzerofour_template_ID = $fourzerofour_template->post->ID;
31
+ $fourzerofour_template_shortcode = apply_filters( 'the_content', get_post_field( 'post_content', $fourzerofour_template_ID ) );
32
+ ?>
33
+ <article id="post-0" <?php post_class( 'not_found' ); ?>>
34
+ <?php echo $fourzerofour_template_shortcode; ?>
35
+ </article> <!-- .et_pb_post -->
36
+ <?php } else {
37
  ?>
38
+ <div class="container">
39
+ <div id="content-area" class="clearfix">
40
+ <div id="left-area">
41
+ <article id="post-0" <?php post_class( 'et_pb_post not_found' ); ?>>
42
+ <?php get_template_part( 'includes/no-results', '404' ); ?>
43
+ </article> <!-- .et_pb_post -->
44
+ </div> <!-- #left-area -->
45
+
46
+ <?php get_sidebar(); ?>
47
+ </div> <!-- #content-area -->
48
+ </div> <!-- .container -->
49
+ <?php
50
+ }
51
+ ?>
52
 
 
53
  </div> <!-- #main-content -->
54
 
55
  <?php
92
  );
93
 
94
  if ( $footer_template->have_posts() ) {
95
+ if( !function_exists('dsm_fix_shortcodes') ) {
96
+ function dsm_fix_shortcodes($content){
97
+ $array = array (
98
+ '<p>[' => '[',
99
+ ']</p>' => ']',
100
+ ']<br />' => ']'
101
+ );
102
+ $content = strtr($content, $array);
103
+ return $content;
104
+ }
105
+ add_filter('the_content', 'dsm_fix_shortcodes');
106
+ }
107
  $footer_template_ID = $footer_template->post->ID;
108
+ $footer_template_shortcode = apply_filters('the_content', get_post_field( 'post_content', $footer_template_ID ) );
109
  $footer_template_css = get_post_custom($footer_template_ID);
110
 
111
  if ( $footer_template_css['dsm-css-classes-meta-box-options'][0] != '' ) {
113
  } else {
114
  $footer_template_css_output = '';
115
  }
116
+ if ( !et_core_is_fb_enabled() && $footer_template_css['dsm-footer-show-on-404-template'][0] == 'yes' ) {
 
117
  $footer_output = sprintf(
118
  '<footer id="dsm-footer" class="%2$s" itemscope="itemscope" itemtype="https://schema.org/WPFooter">%1$s</footer>
119
  ',
includes/templates/page-template-search.php ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Template Name: Search Page
4
+ */
5
+
6
+ get_header();
7
+ ?>
8
+ <div id="main-content">
9
+ <?php
10
+ $search_no_result_args = array(
11
+ 'post_type' => 'dsm_header_footer',
12
+ 'meta_key' => 'dsm-header-footer-meta-box-options',
13
+ 'meta_value' => 'search_no_result',
14
+ 'meta_type' => 'post',
15
+ 'meta_query' => array(
16
+ array(
17
+ 'key' => 'dsm-header-footer-meta-box-options',
18
+ 'value' => 'search_no_result',
19
+ 'compare' => '==',
20
+ 'type' => 'post',
21
+ ),
22
+ ),
23
+ );
24
+
25
+ $search_no_result_template = new WP_Query(
26
+ $search_no_result_args
27
+ );
28
+
29
+ if ( $search_no_result_template->have_posts() ) {
30
+ $search_no_result_template_ID = $search_no_result_template->post->ID;
31
+ $search_no_result_template_shortcode = apply_filters('the_content', get_post_field( 'post_content', $search_no_result_template_ID ) );
32
+ echo $search_no_result_template_shortcode;
33
+ } else {
34
+ ?>
35
+ <div class="container">
36
+ <div id="content-area" class="clearfix">
37
+ <div id="left-area">
38
+ <?php get_template_part( 'includes/no-results', '404' ); ?>
39
+ </div> <!-- #left-area -->
40
+ <?php get_sidebar(); ?>
41
+ </div> <!-- #content-area -->
42
+ </div> <!-- .container -->
43
+ <?php
44
+ }
45
+ ?>
46
+
47
+ </div> <!-- #main-content -->
48
+
49
+ <?php
50
+ $footer_args = array(
51
+ 'post_type' => 'dsm_header_footer',
52
+ 'meta_key' => 'dsm-header-footer-meta-box-options',
53
+ 'meta_value' => 'footer',
54
+ 'meta_type' => 'post',
55
+ 'meta_query' => array(
56
+ array(
57
+ 'key' => 'dsm-header-footer-meta-box-options',
58
+ 'value' => 'footer',
59
+ 'compare' => '==',
60
+ 'type' => 'post',
61
+ ),
62
+ ),
63
+ );
64
+
65
+ $footer_template = new WP_Query(
66
+ $footer_args
67
+ );
68
+
69
+ $footer_css_args = array(
70
+ 'post_type' => 'dsm_header_footer',
71
+ 'meta_key' => 'dsm-css-classes-meta-box-options',
72
+ 'value' => '',
73
+ 'meta_type' => 'post',
74
+ 'meta_query' => array(
75
+ array(
76
+ 'key' => 'dsm-css-classes-meta-box-options',
77
+ 'value' => '',
78
+ 'compare' => '!=',
79
+ 'type' => 'post',
80
+ ),
81
+ ),
82
+ );
83
+
84
+ $footer_css_template = new WP_Query(
85
+ $footer_css_args
86
+ );
87
+
88
+ if ( $footer_template->have_posts() ) {
89
+ if( !function_exists('dsm_fix_shortcodes') ) {
90
+ function dsm_fix_shortcodes($content){
91
+ $array = array (
92
+ '<p>[' => '[',
93
+ ']</p>' => ']',
94
+ ']<br />' => ']'
95
+ );
96
+ $content = strtr($content, $array);
97
+ return $content;
98
+ }
99
+ add_filter('the_content', 'dsm_fix_shortcodes');
100
+ }
101
+ $footer_template_ID = $footer_template->post->ID;
102
+ $footer_template_shortcode = apply_filters('the_content', get_post_field( 'post_content', $footer_template_ID ) );
103
+ $footer_template_css = get_post_custom($footer_template_ID);
104
+
105
+ if ( $footer_template_css['dsm-css-classes-meta-box-options'][0] != '' ) {
106
+ $footer_template_css_output = get_post_meta( $footer_css_template->post->ID, 'dsm-css-classes-meta-box-options', true );
107
+ } else {
108
+ $footer_template_css_output = '';
109
+ }
110
+ if ( !et_core_is_fb_enabled() ) {
111
+ $footer_output = sprintf(
112
+ '<footer id="dsm-footer" class="%2$s" itemscope="itemscope" itemtype="https://schema.org/WPFooter">%1$s</footer>
113
+ ',
114
+ $footer_template_shortcode,
115
+ ( '' !== $footer_template_css_output ? 'dsm-footer ' . $footer_template_css_output : 'dsm-footer' )
116
+ );
117
+ echo $footer_output;
118
+ }
119
+ }
120
+ get_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.7
9
  License: GPLv2
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -38,7 +38,7 @@ Divi Supreme contains 16 Divi custom modules and more to come soon.
38
  Divi Supreme Extentions
39
 
40
  - Scheduled Content Visibility - This will extend the Visibility option in the the Section/Row's custom setting to allow you to show or hide the section or row with a specify date/time.
41
- - Divi Templates - Designing Divi's footer or 404 page is one of the most challenging thing ever. Without programming background knowledgde, you have to deal with time and the learning process. But with Divi Templates, now you can design your footer or 404 page using Visual Builder and assign them. As easy as that, No coding required. Don't spend time finding those layout global module ID because you don't have to. Just 2 easy steps: Create a Template using Visual Builder, then assign them to footer/404. That's it! Save time = Smarter.
42
  - Divi Shortcodes - This will add a shortcode column in the Divi Library. Use that Divi shortcode to display your layout in any Divi module or even your PHP file by using [divi_shortcode id=""].
43
 
44
  Many more Divi Modules and Extensions coming soon...
@@ -99,13 +99,23 @@ Your existing modules/content will work with pro version. So you won't lose any
99
 
100
 
101
  == Changelog ==
102
- = 1.7 - 13.06.2019 =
 
 
 
 
 
 
 
 
 
 
103
  * Fixed: template_include wrong output causes site to break.
104
 
105
- = 1.6.9 - 13.06.2019 =
106
  * Fixed: Blank pages when using version 1.6.8.
107
 
108
- = 1.6.8 - 13.06.2019 =
109
  * Fixed: WordPress default login url slug when using 404 - Using template_include for custom 404 template.
110
 
111
  = 1.6.7 - 13.08.2019 =
5
  Requires at least: 4.5
6
  Tested up to: 5.2.2
7
  Requires PHP: 5.6
8
+ Stable tag: 1.7.1
9
  License: GPLv2
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
38
  Divi Supreme Extentions
39
 
40
  - Scheduled Content Visibility - This will extend the Visibility option in the the Section/Row's custom setting to allow you to show or hide the section or row with a specify date/time.
41
+ - Divi Templates - Designing Divi's footer or 404 page is one of the most challenging thing ever. Without programming background knowledgde, you have to deal with time and the learning process. But with Divi Templates, now you can design your custom footer, 404 and Search No Result page using Visual Builder and assign them. As easy as that, No coding required. Don't spend time finding those layout global module ID because you don't have to. Just 2 easy steps: Create a Template using Visual Builder, then assign them to footer/404. That's it! Save time = Smarter.
42
  - Divi Shortcodes - This will add a shortcode column in the Divi Library. Use that Divi shortcode to display your layout in any Divi module or even your PHP file by using [divi_shortcode id=""].
43
 
44
  Many more Divi Modules and Extensions coming soon...
99
 
100
 
101
  == Changelog ==
102
+ = 1.7.1 - 17.08.2019 =
103
+ Added: “Remove All Data on Uninstall” (Related to Divi Supreme Settings) Option in the Divi Supreme Settings page.
104
+ Added: Search No Result template to Divi Templates.
105
+ Fixed: Footer not showing up on 404 page when using Show on 404 Page Option.
106
+ Fixed: Unnecessary empty HTML p and br Tag on Footer.
107
+ Fixed: Footer not showing up on search no result page.
108
+ Enhanced: Echo method for Divi Template Posts.
109
+ Enhanced: 404 template.
110
+ Enhanced: Divi Supreme Settings Page.
111
+
112
+ = 1.7 - 13.08.2019 =
113
  * Fixed: template_include wrong output causes site to break.
114
 
115
+ = 1.6.9 - 13.08.2019 =
116
  * Fixed: Blank pages when using version 1.6.8.
117
 
118
+ = 1.6.8 - 13.08.2019 =
119
  * Fixed: WordPress default login url slug when using 404 - Using template_include for custom 404 template.
120
 
121
  = 1.6.7 - 13.08.2019 =
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.7
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.7' );
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.7.1
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.7.1' );
31
  }
32
  if ( ! defined('DSM_SHORTCODE') ) {
33
  define( 'DSM_SHORTCODE', 'divi_shortcode' );
uninstall.php CHANGED
@@ -29,3 +29,9 @@
29
  if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
30
  exit;
31
  }
 
 
 
 
 
 
29
  if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
30
  exit;
31
  }
32
+
33
+ if ( get_option('dsm_settings_misc')['dsm_uninstall_on_delete'] == 'on' ) {
34
+ delete_option( 'dsm_general' );
35
+ delete_option( 'dsm_settings_misc' );
36
+ delete_option( 'dsm-supreme-modules-for-divi-activation-date' );
37
+ }