Version Description
- 20.02.2019 =
- Added: 404 option in Divi Templates.
- Renamed: Footer Template to Divi Templates.
Download this release
Release Info
Developer | divisupreme |
Plugin | Supreme Modules Lite – Divi Theme, Extra Theme and Divi Builder |
Version | 1.4.4 |
Comparing to | |
See all releases |
Code changes from version 1.4.3 to 1.4.4
- includes/SupremeModulesLoader.php +47 -6
- includes/class.page-settings.php +2 -2
- includes/templates/page-template-404.php +82 -0
- readme.txt +7 -3
- supreme-modules-for-divi.php +2 -2
includes/SupremeModulesLoader.php
CHANGED
@@ -362,8 +362,8 @@ if ( dsm_setting_get_option( 'dsm_use_header_footer', 'dsm_general' ) == 'on' )
|
|
362 |
if ( ! function_exists( 'dsm_header_footer_posttypes' ) ) :
|
363 |
function dsm_header_footer_posttypes() {
|
364 |
$labels = array(
|
365 |
-
'name' => esc_html__( 'Divi
|
366 |
-
'singular_name' => esc_html__( 'Divi
|
367 |
'add_new' => esc_html__( 'Add New', 'dsm-supreme-modules-for-divi' ),
|
368 |
'add_new_item' => esc_html__( 'Add New Template', 'dsm-supreme-modules-for-divi' ),
|
369 |
'edit_item' => esc_html__( 'Edit Template', 'dsm-supreme-modules-for-divi' ),
|
@@ -422,6 +422,7 @@ if ( dsm_setting_get_option( 'dsm_use_header_footer', 'dsm_general' ) == 'on' )
|
|
422 |
<?php
|
423 |
$option_values = array(
|
424 |
'footer' => __( 'Footer', 'dsm-supreme-modules-for-divi' ),
|
|
|
425 |
//'header' => __( 'Header (Not available)', 'dsm-supreme-modules-for-divi' ),
|
426 |
);
|
427 |
|
@@ -497,11 +498,15 @@ if ( dsm_setting_get_option( 'dsm_use_header_footer', 'dsm_general' ) == 'on' )
|
|
497 |
<?php
|
498 |
}
|
499 |
|
|
|
|
|
500 |
function dsm_add_header_footer_meta_box() {
|
501 |
-
add_meta_box('dsm_header_footer_meta_box', 'Divi
|
|
|
502 |
}
|
|
|
503 |
|
504 |
-
add_action("add_meta_boxes", "dsm_add_header_footer_meta_box");
|
505 |
|
506 |
function dsm_save_header_footer_meta_box($post_id, $post, $update) {
|
507 |
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
|
@@ -591,14 +596,50 @@ if ( dsm_setting_get_option( 'dsm_use_header_footer', 'dsm_general' ) == 'on' )
|
|
591 |
$footer_template_css_output = '';
|
592 |
}
|
593 |
|
|
|
594 |
if ( !et_core_is_fb_enabled() ) {
|
595 |
-
|
|
|
|
|
|
|
|
|
596 |
}
|
597 |
}
|
598 |
}
|
599 |
|
600 |
add_action('et_after_main_content', 'dsm_custom_footer');
|
601 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
602 |
function dsm_custom_footer_settings() {
|
603 |
$footer_args = array(
|
604 |
'post_type' => 'dsm_header_footer',
|
@@ -672,7 +713,7 @@ if ( dsm_setting_get_option( 'dsm_use_header_footer', 'dsm_general' ) == 'on' )
|
|
672 |
|
673 |
if ( $current_screen->post_type === 'dsm_header_footer' ) { ?>
|
674 |
<div class="notice notice-info">
|
675 |
-
<p><?php _e( 'Notice: For first time user, please re-save your <a href="'. get_admin_url() .'options-permalink.php" target="_blank">Permalinks</a> again to flush the rewrite rules in order view them in Visual Builder. 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>
|
676 |
</div>
|
677 |
<?php }
|
678 |
}
|
362 |
if ( ! function_exists( 'dsm_header_footer_posttypes' ) ) :
|
363 |
function dsm_header_footer_posttypes() {
|
364 |
$labels = array(
|
365 |
+
'name' => esc_html__( 'Divi Templates', 'dsm-supreme-modules-for-divi' ),
|
366 |
+
'singular_name' => esc_html__( 'Divi Template', 'dsm-supreme-modules-for-divi' ),
|
367 |
'add_new' => esc_html__( 'Add New', 'dsm-supreme-modules-for-divi' ),
|
368 |
'add_new_item' => esc_html__( 'Add New Template', 'dsm-supreme-modules-for-divi' ),
|
369 |
'edit_item' => esc_html__( 'Edit Template', 'dsm-supreme-modules-for-divi' ),
|
422 |
<?php
|
423 |
$option_values = array(
|
424 |
'footer' => __( 'Footer', 'dsm-supreme-modules-for-divi' ),
|
425 |
+
'404' => __( '404', 'dsm-supreme-modules-for-divi' ),
|
426 |
//'header' => __( 'Header (Not available)', 'dsm-supreme-modules-for-divi' ),
|
427 |
);
|
428 |
|
498 |
<?php
|
499 |
}
|
500 |
|
501 |
+
|
502 |
+
if ( ! function_exists( 'dsm_add_header_footer_meta_box' ) ) :
|
503 |
function dsm_add_header_footer_meta_box() {
|
504 |
+
add_meta_box('dsm_header_footer_meta_box', 'Divi Templates', 'dsm_header_footer_meta_box_options', 'dsm_header_footer', 'side', 'high', null);
|
505 |
+
remove_meta_box( 'et_settings_meta_box', 'dsm_header_footer', 'side', 'high' );
|
506 |
}
|
507 |
+
endif;
|
508 |
|
509 |
+
add_action("add_meta_boxes", "dsm_add_header_footer_meta_box", 11);
|
510 |
|
511 |
function dsm_save_header_footer_meta_box($post_id, $post, $update) {
|
512 |
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
|
596 |
$footer_template_css_output = '';
|
597 |
}
|
598 |
|
599 |
+
|
600 |
if ( !et_core_is_fb_enabled() ) {
|
601 |
+
if ( is_404() ) {
|
602 |
+
return;
|
603 |
+
} else {
|
604 |
+
echo '<footer id="dsm-footer" class="dsm-footer ' . $footer_template_css_output . '" itemscope="itemscope" itemtype="https://schema.org/WPFooter">' . $footer_template_shortcode . '</footer>';
|
605 |
+
}
|
606 |
}
|
607 |
}
|
608 |
}
|
609 |
|
610 |
add_action('et_after_main_content', 'dsm_custom_footer');
|
611 |
|
612 |
+
add_action( 'template_redirect', 'dsm_redirect_404' );
|
613 |
+
if ( ! function_exists( 'dsm_redirect_404' ) ) :
|
614 |
+
function dsm_redirect_404() {
|
615 |
+
$dsm_four_zero_four_args = array(
|
616 |
+
'post_type' => 'dsm_header_footer',
|
617 |
+
'meta_key' => 'dsm-header-footer-meta-box-options',
|
618 |
+
'meta_value' => '404',
|
619 |
+
'meta_type' => 'post',
|
620 |
+
'meta_query' => array(
|
621 |
+
array(
|
622 |
+
'key' => 'dsm-header-footer-meta-box-options',
|
623 |
+
'value' => '404',
|
624 |
+
'compare' => '==',
|
625 |
+
'type' => 'post',
|
626 |
+
),
|
627 |
+
),
|
628 |
+
);
|
629 |
+
|
630 |
+
$dsm_four_zero_four_template = new WP_Query(
|
631 |
+
$dsm_four_zero_four_args
|
632 |
+
);
|
633 |
+
|
634 |
+
if ( $dsm_four_zero_four_template->have_posts() ) {
|
635 |
+
if ( is_404() ) :
|
636 |
+
include( plugin_dir_path( __FILE__ ) . 'templates/page-template-404.php' );
|
637 |
+
exit;
|
638 |
+
endif;
|
639 |
+
}
|
640 |
+
}
|
641 |
+
endif;
|
642 |
+
|
643 |
function dsm_custom_footer_settings() {
|
644 |
$footer_args = array(
|
645 |
'post_type' => 'dsm_header_footer',
|
713 |
|
714 |
if ( $current_screen->post_type === 'dsm_header_footer' ) { ?>
|
715 |
<div class="notice notice-info">
|
716 |
+
<p><?php _e( 'Notice: For first time user, please re-save your <a href="'. get_admin_url() .'options-permalink.php" target="_blank">Permalinks</a> again to flush the rewrite rules in order view them in Visual Builder. 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 and 404 template is available you. Please create one template and assign to the footer or 404. 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>
|
717 |
</div>
|
718 |
<?php }
|
719 |
}
|
includes/class.page-settings.php
CHANGED
@@ -29,7 +29,7 @@ class DSM_Settings {
|
|
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', __( '
|
33 |
}
|
34 |
}
|
35 |
|
@@ -74,7 +74,7 @@ class DSM_Settings {
|
|
74 |
array(
|
75 |
'name' => 'dsm_use_header_footer',
|
76 |
'class' => 'dsm-settings-checkbox',
|
77 |
-
'label' => __( 'Enable
|
78 |
'desc' => __( '<span class="slider round"></span>', 'dsm-supreme-modules-for-divi' ),
|
79 |
'type' => 'checkbox',
|
80 |
'default' => 'off'
|
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', __( 'Divi Templates', 'dsm-supreme-modules-for-divi' ), __( 'Divi Templates', 'dsm-supreme-modules-for-divi' ), 'manage_options', 'edit.php?post_type=dsm_header_footer' );
|
33 |
}
|
34 |
}
|
35 |
|
74 |
array(
|
75 |
'name' => 'dsm_use_header_footer',
|
76 |
'class' => 'dsm-settings-checkbox',
|
77 |
+
'label' => __( 'Enable Divi Templates', 'dsm-supreme-modules-for-divi' ),
|
78 |
'desc' => __( '<span class="slider round"></span>', 'dsm-supreme-modules-for-divi' ),
|
79 |
'type' => 'checkbox',
|
80 |
'default' => 'off'
|
includes/templates/page-template-404.php
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Template Name: 404 Blank Page
|
4 |
+
*/
|
5 |
+
|
6 |
+
get_header();
|
7 |
+
?>
|
8 |
+
<div id="main-content">
|
9 |
+
<article id="post-0" <?php post_class( 'et_pb_post not_found' ); ?>>
|
10 |
+
<?php
|
11 |
+
$footer_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 |
+
$footer_template = new WP_Query(
|
27 |
+
$footer_args
|
28 |
+
);
|
29 |
+
|
30 |
+
$footer_css_args = array(
|
31 |
+
'post_type' => 'dsm_header_footer',
|
32 |
+
'meta_key' => 'dsm-css-classes-meta-box-options',
|
33 |
+
'value' => '',
|
34 |
+
'meta_type' => 'post',
|
35 |
+
'meta_query' => array(
|
36 |
+
array(
|
37 |
+
'key' => 'dsm-css-classes-meta-box-options',
|
38 |
+
'value' => '',
|
39 |
+
'compare' => '!=',
|
40 |
+
'type' => 'post',
|
41 |
+
),
|
42 |
+
),
|
43 |
+
);
|
44 |
+
|
45 |
+
$footer_css_template = new WP_Query(
|
46 |
+
$footer_css_args
|
47 |
+
);
|
48 |
+
|
49 |
+
$footer_conditional_args = array(
|
50 |
+
'post_type' => 'dsm_header_footer',
|
51 |
+
'meta_key' => 'dsm-conditional-meta-box-options',
|
52 |
+
'value' => '',
|
53 |
+
'meta_type' => 'post',
|
54 |
+
'meta_query' => array(
|
55 |
+
array(
|
56 |
+
'key' => 'dsm-conditional-meta-box-options',
|
57 |
+
'value' => '',
|
58 |
+
'compare' => '!=',
|
59 |
+
'type' => 'post',
|
60 |
+
),
|
61 |
+
),
|
62 |
+
);
|
63 |
+
|
64 |
+
$footer_exclude = new WP_Query(
|
65 |
+
$footer_conditional_args
|
66 |
+
);
|
67 |
+
|
68 |
+
if ( $footer_template->have_posts() ) {
|
69 |
+
$footer_template_ID = $footer_template->post->ID;
|
70 |
+
$footer_template_shortcode = apply_filters('the_content', get_post_field('post_content', $footer_template_ID));
|
71 |
+
$footer_template_css = get_post_custom($footer_template_ID);
|
72 |
+
|
73 |
+
echo $footer_template_shortcode;
|
74 |
+
}
|
75 |
+
?>
|
76 |
+
|
77 |
+
</article> <!-- .et_pb_post -->
|
78 |
+
</div> <!-- #main-content -->
|
79 |
+
|
80 |
+
<?php
|
81 |
+
|
82 |
+
get_footer();
|
readme.txt
CHANGED
@@ -3,9 +3,9 @@ Contributors: divisupreme, kenng87
|
|
3 |
Tags: Divi, Divi Module, Divi Custom Module, divi theme, divi builder, Divi Gradient Text, Divi Typing Effect, Divi 3D Image, Divi Image, Divi Text Divider, facebook feed, facebook comments
|
4 |
Donate link: https://suprememodules.com/
|
5 |
Requires at least: 4.5
|
6 |
-
Tested up to: 5.
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 1.4.
|
9 |
License: GPLv2
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -35,7 +35,7 @@ Divi Supreme contains 14 Divi custom modules and more to come soon.
|
|
35 |
Divi Supreme Extentions
|
36 |
|
37 |
- 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.
|
38 |
-
-
|
39 |
|
40 |
Many more Divi Modules and Extensions coming soon...
|
41 |
|
@@ -87,6 +87,10 @@ Divi Builder >= version 2.1
|
|
87 |
PHP version >= 5.6
|
88 |
|
89 |
== Changelog ==
|
|
|
|
|
|
|
|
|
90 |
= 1.4.3 - 19.02.2019 =
|
91 |
* Fixed: Contact Form 7 Module placeholder not styling Textarea on both Frontend and the Visual Builder.
|
92 |
* Removed: Console log when using Contact Form 7 Module.
|
3 |
Tags: Divi, Divi Module, Divi Custom Module, divi theme, divi builder, Divi Gradient Text, Divi Typing Effect, Divi 3D Image, Divi Image, Divi Text Divider, facebook feed, facebook comments
|
4 |
Donate link: https://suprememodules.com/
|
5 |
Requires at least: 4.5
|
6 |
+
Tested up to: 5.1
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 1.4.4
|
9 |
License: GPLv2
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
35 |
Divi Supreme Extentions
|
36 |
|
37 |
- 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.
|
38 |
+
- 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.
|
39 |
|
40 |
Many more Divi Modules and Extensions coming soon...
|
41 |
|
87 |
PHP version >= 5.6
|
88 |
|
89 |
== Changelog ==
|
90 |
+
= 1.4.4 - 20.02.2019 =
|
91 |
+
* Added: 404 option in Divi Templates.
|
92 |
+
* Renamed: Footer Template to Divi Templates.
|
93 |
+
|
94 |
= 1.4.3 - 19.02.2019 =
|
95 |
* Fixed: Contact Form 7 Module placeholder not styling Textarea on both Frontend and the Visual Builder.
|
96 |
* Removed: Console log when using Contact Form 7 Module.
|
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.4.
|
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.4.
|
40 |
|
41 |
if ( ! function_exists( 'dsm_initialize_extension' ) ):
|
42 |
/**
|
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.4.4
|
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.4.4' );
|
40 |
|
41 |
if ( ! function_exists( 'dsm_initialize_extension' ) ):
|
42 |
/**
|