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

Version Description

  • 09.10.2018 =
  • Added: Footer Template Extension.
Download this release

Release Info

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

Code changes from version 1.1.5 to 1.1.6

assets/js/dsm-header-footer.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(e){e(document).ready(function(){var o=window.location.origin+window.location.pathname;e("#et-divi-customizer-vb-global-cached-inline-styles").detach(),e("head").append('<style id="dsm-temp-footer-css"></style>'),e("#dsm-temp-footer-css").load(o+" #et-builder-module-design-cached-inline-styles",function(){}),e("#main-footer").before('<div id="dsm-header-footer-vb"></div>'),e("#dsm-header-footer-vb").load(o+" #dsm-footer")})}(jQuery);
includes/SupremeModulesLoader.php CHANGED
@@ -339,14 +339,12 @@ function dsm_admin_footer_text( $footer_text ) {
339
 
340
  add_filter('admin_footer_text', 'dsm_admin_footer_text');
341
 
342
- /*
343
  if ( dsm_setting_get_option( 'dsm_use_header_footer', 'dsm_general' ) == 'on' ) {
344
- // Register Custom Post Type
345
- if ( ! function_exists( 'dsm_register_posttypes' ) ) :
346
- function dsm_register_posttypes() {
347
  $labels = array(
348
- 'name' => esc_html__( 'Header and Footer Templates', 'dsm-supreme-modules-for-divi' ),
349
- 'singular_name' => esc_html__( 'Header and Footer Template', 'dsm-supreme-modules-for-divi' ),
350
  'add_new' => esc_html__( 'Add New', 'dsm-supreme-modules-for-divi' ),
351
  'add_new_item' => esc_html__( 'Add New Template', 'dsm-supreme-modules-for-divi' ),
352
  'edit_item' => esc_html__( 'Edit Template', 'dsm-supreme-modules-for-divi' ),
@@ -381,7 +379,7 @@ if ( dsm_setting_get_option( 'dsm_use_header_footer', 'dsm_general' ) == 'on' )
381
  register_post_type( 'dsm_header_footer', $args );
382
  }
383
  endif;
384
- add_action( 'init', 'dsm_register_posttypes', 0 );
385
 
386
  function dsm_load_headerfooter_template($template) {
387
  global $post;
@@ -427,6 +425,7 @@ if ( dsm_setting_get_option( 'dsm_use_header_footer', 'dsm_general' ) == 'on' )
427
  <label for="dsm-css-classes-meta-box-options" style="display: block; font-weight: bold; margin-bottom: 5px;">CSS Classes:</label>
428
  <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); ?>">
429
  </p>
 
430
  <label for="dsm-remove-default-footer-meta-box-options" style="display: block; font-weight: bold; margin-bottom: 5px;">Remove default Divi footer</label>
431
  <select name="dsm-remove-default-footer-meta-box-options">
432
  <?php
@@ -449,6 +448,8 @@ if ( dsm_setting_get_option( 'dsm_use_header_footer', 'dsm_general' ) == 'on' )
449
  }
450
  ?>
451
  </select>
 
 
452
  <?php
453
  }
454
 
@@ -536,12 +537,17 @@ if ( dsm_setting_get_option( 'dsm_use_header_footer', 'dsm_general' ) == 'on' )
536
  $footer_template_css = get_post_custom($footer_template_ID);
537
 
538
  if ( $footer_template_css['dsm-css-classes-meta-box-options'][0] != '' ) {
539
- $footer_template_css_output = get_post_meta( $footer_css_template->post->ID, 'dsm-css-classes-meta-box-options', true );
 
540
  } else {
541
  $footer_template_css_output = '';
542
  }
543
-
544
- echo '<footer class="dsm-footer ' . $footer_template_css_output . '" itemscope="itemscope" itemtype="https://schema.org/WPFooter">' . $footer_template_shortcode . '</footer>';
 
 
 
 
545
  }
546
  }
547
 
@@ -584,11 +590,10 @@ if ( dsm_setting_get_option( 'dsm_use_header_footer', 'dsm_general' ) == 'on' )
584
 
585
  if ( $current_screen->post_type === 'dsm_header_footer' ) { ?>
586
  <div class="notice notice-info">
587
- <p><?php _e( 'Notice: This will only work for the Divi Theme. Once ElegantThemes updated their Template Hook on Extra Theme, this feature will also be available. Currently only the footer template is available you. Please create one template and assign to the footer. If you do not see Divi Builder here, remember to Enable Divi Builder On Post Types in the Divi Options.', 'dsm-supreme-modules-for-divi' ); ?></p>
588
  </div>
589
  <?php }
590
  }
591
  add_action('admin_notices', 'dsm_header_footer_admin_notice');
592
  }
593
- */
594
  //End
339
 
340
  add_filter('admin_footer_text', 'dsm_admin_footer_text');
341
 
 
342
  if ( dsm_setting_get_option( 'dsm_use_header_footer', 'dsm_general' ) == 'on' ) {
343
+ if ( ! function_exists( 'dsm_header_footer_posttypes' ) ) :
344
+ function dsm_header_footer_posttypes() {
 
345
  $labels = array(
346
+ 'name' => esc_html__( 'Divi Footer Templates', 'dsm-supreme-modules-for-divi' ),
347
+ 'singular_name' => esc_html__( 'Divi Footer Template', 'dsm-supreme-modules-for-divi' ),
348
  'add_new' => esc_html__( 'Add New', 'dsm-supreme-modules-for-divi' ),
349
  'add_new_item' => esc_html__( 'Add New Template', 'dsm-supreme-modules-for-divi' ),
350
  'edit_item' => esc_html__( 'Edit Template', 'dsm-supreme-modules-for-divi' ),
379
  register_post_type( 'dsm_header_footer', $args );
380
  }
381
  endif;
382
+ add_action( 'init', 'dsm_header_footer_posttypes', 0 );
383
 
384
  function dsm_load_headerfooter_template($template) {
385
  global $post;
425
  <label for="dsm-css-classes-meta-box-options" style="display: block; font-weight: bold; margin-bottom: 5px;">CSS Classes:</label>
426
  <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); ?>">
427
  </p>
428
+ <p>
429
  <label for="dsm-remove-default-footer-meta-box-options" style="display: block; font-weight: bold; margin-bottom: 5px;">Remove default Divi footer</label>
430
  <select name="dsm-remove-default-footer-meta-box-options">
431
  <?php
448
  }
449
  ?>
450
  </select>
451
+ </p>
452
+ <p><?php _e( 'Tips: To have better experience with Visual Builder and the Footer Template, it is advisable that you either Disable the <b>Static CSS File Generation</b> or enable both <b>Static CSS File Generation and Output Styles Inline</b> during development in order to view the footer render properly in the Visual Builder.', 'dsm-supreme-modules-for-divi' ); ?></p>
453
  <?php
454
  }
455
 
537
  $footer_template_css = get_post_custom($footer_template_ID);
538
 
539
  if ( $footer_template_css['dsm-css-classes-meta-box-options'][0] != '' ) {
540
+
541
+ $footer_template_css_output = do_shortcode("get_post_meta( $footer_css_template->post->ID, 'dsm-css-classes-meta-box-options', true )");
542
  } else {
543
  $footer_template_css_output = '';
544
  }
545
+
546
+ if ( !et_core_is_fb_enabled() ) {
547
+ echo '<footer id="dsm-footer" class="dsm-footer ' . $footer_template_css_output . '" itemscope="itemscope" itemtype="https://schema.org/WPFooter">' . $footer_template_shortcode . '</footer>';
548
+ } else {
549
+ wp_enqueue_script('dsm-header-footer');
550
+ }
551
  }
552
  }
553
 
590
 
591
  if ( $current_screen->post_type === 'dsm_header_footer' ) { ?>
592
  <div class="notice notice-info">
593
+ <p><?php _e( 'Notice: This will only work for the Divi Theme. Once ElegantThemes updated their Template Hook on Extra Theme, this feature will also be available. Currently only the footer template is available you. Please create one template and assign to the footer. If you do not see Divi Builder here, remember to <a href="'. get_admin_url() .'/admin.php?page=et_divi_options#wrap-builder" target="_blank">Enable Divi Builder On Post Types</a> in the Divi Options.', 'dsm-supreme-modules-for-divi' ); ?></p>
594
  </div>
595
  <?php }
596
  }
597
  add_action('admin_notices', 'dsm_header_footer_admin_notice');
598
  }
 
599
  //End
includes/class.page-settings.php CHANGED
@@ -28,10 +28,9 @@ class DSM_Settings {
28
 
29
  function admin_menu() {
30
  add_menu_page( __( 'Divi Supreme', 'dsm-supreme-modules-for-divi' ), __( 'Divi Supreme', 'dsm-supreme-modules-for-divi' ), 'manage_options', 'divi_supreme_settings', array($this, 'plugin_page'), plugins_url( 'supreme-modules-for-divi/assets/img/icon-128x128.png' ), 99 );
31
- /*
32
  if ( dsm_setting_get_option( 'dsm_use_header_footer', 'dsm_general' ) == 'on' ) {
33
- add_submenu_page( 'divi_supreme_settings', __( 'Header & Footer', 'dsm-supreme-modules-for-divi' ), __( 'Header & Footer', 'dsm-supreme-modules-for-divi' ), 'manage_options', 'edit.php?post_type=dsm_header_footer' );
34
- }*/
35
  }
36
 
37
  function get_settings_sections() {
@@ -72,15 +71,14 @@ class DSM_Settings {
72
  'type' => 'checkbox',
73
  'default' => 'off'
74
  ),
75
- /*
76
  array(
77
  'name' => 'dsm_use_header_footer',
78
  'class' => 'dsm-settings-checkbox',
79
- 'label' => __( 'Enable Header & Footer Template', 'dsm-supreme-modules-for-divi' ),
80
  'desc' => __( '<span class="slider round"></span>', 'dsm-supreme-modules-for-divi' ),
81
  'type' => 'checkbox',
82
  'default' => 'off'
83
- ),*/
84
  ),
85
  /*
86
  'dsm_advanced' => array(
28
 
29
  function admin_menu() {
30
  add_menu_page( __( 'Divi Supreme', 'dsm-supreme-modules-for-divi' ), __( 'Divi Supreme', 'dsm-supreme-modules-for-divi' ), 'manage_options', 'divi_supreme_settings', array($this, 'plugin_page'), plugins_url( 'supreme-modules-for-divi/assets/img/icon-128x128.png' ), 99 );
 
31
  if ( dsm_setting_get_option( 'dsm_use_header_footer', 'dsm_general' ) == 'on' ) {
32
+ add_submenu_page( 'divi_supreme_settings', __( 'Footer Template', 'dsm-supreme-modules-for-divi' ), __( 'Footer Template', 'dsm-supreme-modules-for-divi' ), 'manage_options', 'edit.php?post_type=dsm_header_footer' );
33
+ }
34
  }
35
 
36
  function get_settings_sections() {
71
  'type' => 'checkbox',
72
  'default' => 'off'
73
  ),
 
74
  array(
75
  'name' => 'dsm_use_header_footer',
76
  'class' => 'dsm-settings-checkbox',
77
+ 'label' => __( 'Enable Footer Template', 'dsm-supreme-modules-for-divi' ),
78
  'desc' => __( '<span class="slider round"></span>', 'dsm-supreme-modules-for-divi' ),
79
  'type' => 'checkbox',
80
  'default' => 'off'
81
+ ),
82
  ),
83
  /*
84
  'dsm_advanced' => array(
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.1.5
9
  License: GPLv2
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -31,6 +31,7 @@ Divi Supreme contains 11 Divi custom modules and more to come soon.
31
 
32
  Divi Supreme Extentions
33
  - 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.
 
34
 
35
  Many more Divi Modules and Extensions coming soon...
36
 
@@ -77,6 +78,9 @@ You must have Divi theme, Extra Theme or the Divi Builder installed in order for
77
  YES! At least Divi 3.1 onwards where they introduced the Divi Developer API.
78
 
79
  == Changelog ==
 
 
 
80
  = 1.1.5 - 09.10.2018 =
81
  * Fixed: Flipbox PHP error.
82
 
5
  Requires at least: 4.5
6
  Tested up to: 4.9
7
  Requires PHP: 5.6
8
+ Stable tag: 1.1.6
9
  License: GPLv2
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
31
 
32
  Divi Supreme Extentions
33
  - 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.
34
+ - Footer Template (Beta) - Designing Divi's footer is one of the most challenging thing ever. Without programming background knowledgde, you have to deal with time and the learning process. But with Footer Template, now you can design your footer using Visual Builder and assign them to the Footer Template. 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 Footer Template using Visual Builder, then assign them to footer. That's it! Save time = Smarter.
35
 
36
  Many more Divi Modules and Extensions coming soon...
37
 
78
  YES! At least Divi 3.1 onwards where they introduced the Divi Developer API.
79
 
80
  == Changelog ==
81
+ = 1.1.6 - 09.10.2018 =
82
+ * Added: Footer Template Extension.
83
+
84
  = 1.1.5 - 09.10.2018 =
85
  * Fixed: Flipbox PHP error.
86
 
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.1.5
7
  Author: Supreme Modules
8
  Author URI: https://suprememodules.com/about-us/
9
  License: GPL2
@@ -24,7 +24,7 @@ GNU General Public License for more details.
24
  You should have received a copy of the GNU General Public License
25
  along with Supreme Modules. If not, see https://www.gnu.org/licenses/gpl-2.0.html.
26
  */
27
- define( 'DSM_VERSION', '1.1.5' );
28
 
29
  if ( ! function_exists( 'dsm_initialize_extension' ) ):
30
  /**
@@ -46,6 +46,7 @@ function dsm_scripts(){
46
  wp_register_script('dsm-twitter-embed', 'https://platform.twitter.com/widgets.js', array(), DSM_VERSION, true );
47
  if ( et_core_is_fb_enabled() ) {
48
  wp_enqueue_style('dsm-et-admin', plugin_dir_url( __FILE__ ) . 'assets/css/dsm-et-admin.css' );
 
49
  }
50
  }
51
 
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.1.6
7
  Author: Supreme Modules
8
  Author URI: https://suprememodules.com/about-us/
9
  License: GPL2
24
  You should have received a copy of the GNU General Public License
25
  along with Supreme Modules. If not, see https://www.gnu.org/licenses/gpl-2.0.html.
26
  */
27
+ define( 'DSM_VERSION', '1.1.6' );
28
 
29
  if ( ! function_exists( 'dsm_initialize_extension' ) ):
30
  /**
46
  wp_register_script('dsm-twitter-embed', 'https://platform.twitter.com/widgets.js', array(), DSM_VERSION, true );
47
  if ( et_core_is_fb_enabled() ) {
48
  wp_enqueue_style('dsm-et-admin', plugin_dir_url( __FILE__ ) . 'assets/css/dsm-et-admin.css' );
49
+ wp_register_script('dsm-header-footer', plugin_dir_url( __FILE__ ) . 'assets/js/dsm-header-footer.js', array(), DSM_VERSION, true );
50
  }
51
  }
52