Version Description
- Add: Customizer import/export (can't be part of Kadence Theme per WordPress review).
- Add: New Learn Dash Demo.
Download this release
Release Info
Developer | britner |
Plugin | Starter Templates by Kadence WP |
Version | 1.0.4 |
Comparing to | |
See all releases |
Code changes from version 1.0.3 to 1.0.4
- assets/css/src/starter-import-export.scss +21 -0
- assets/css/starter-import-export.css +25 -0
- assets/css/starter-templates.css +1 -1
- assets/js/src/starter-import-export.js +66 -0
- assets/js/starter-import-export.min.js +1 -0
- assets/js/starter-templates.asset.php +1 -1
- assets/js/starter-templates.js +1 -1
- class-kadence-starter-templates.php +96 -19
- inc/class-author-meta.php +193 -0
- inc/class-customizer-option.php +2 -0
- inc/class-import-customizer-option.php +32 -0
- inc/class-import-export-control.php +66 -0
- inc/class-import-export-option.php +459 -0
- inc/react/src/index.js +48 -13
- inc/react/src/starter-templates.scss +15 -1
- kadence-starter-templates.php +1 -1
- readme.txt +6 -2
assets/css/src/starter-import-export.scss
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
hr.kt-theme-hr {
|
2 |
+
margin: 20px 0;
|
3 |
+
}
|
4 |
+
#customize-control-kadence_starter_import_export .kadence-starter-button {
|
5 |
+
margin-top: 10px;
|
6 |
+
}
|
7 |
+
#customize-control-kadence_starter_import_export .kadence-starter-button.components-button.is-destructive {
|
8 |
+
border: 1px solid;
|
9 |
+
}
|
10 |
+
#customize-control-kadence_starter_import_export .kadence-starter-import-file {
|
11 |
+
width: 100%;
|
12 |
+
margin: 10px 0;
|
13 |
+
padding: 10px 0;
|
14 |
+
font-size: 13px;
|
15 |
+
}
|
16 |
+
#customize-control-kadence_starter_import_export .kadence-starter-uploading {
|
17 |
+
display: none;
|
18 |
+
margin: 10px 0;
|
19 |
+
padding: 10px;
|
20 |
+
font-size: 12px;
|
21 |
+
}
|
assets/css/starter-import-export.css
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
hr.kt-theme-hr {
|
2 |
+
margin: 20px 0;
|
3 |
+
}
|
4 |
+
|
5 |
+
#customize-control-kadence_starter_import_export .kadence-starter-button {
|
6 |
+
margin-top: 10px;
|
7 |
+
}
|
8 |
+
|
9 |
+
#customize-control-kadence_starter_import_export .kadence-starter-button.components-button.is-destructive {
|
10 |
+
border: 1px solid;
|
11 |
+
}
|
12 |
+
|
13 |
+
#customize-control-kadence_starter_import_export .kadence-starter-import-file {
|
14 |
+
width: 100%;
|
15 |
+
margin: 10px 0;
|
16 |
+
padding: 10px 0;
|
17 |
+
font-size: 13px;
|
18 |
+
}
|
19 |
+
|
20 |
+
#customize-control-kadence_starter_import_export .kadence-starter-uploading {
|
21 |
+
display: none;
|
22 |
+
margin: 10px 0;
|
23 |
+
padding: 10px;
|
24 |
+
font-size: 12px;
|
25 |
+
}
|
assets/css/starter-templates.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.appearance_page_kadence-starter-templates #wpcontent{padding:0}.kadence_theme_dash_head{background:#fff;padding:10px 20px;height:50px}.kadence_theme_dash_head h1{color:#2d3748;line-height:50px;padding:0;height:50px;margin:0;display:flex;align-items:center}.kadence_theme_dash_head .subtext{font-size:16px;color:#718096;display:inline-block;padding-left:10px}.kadence_theme_dash_head .kadence_theme_dash_head_container{margin:0 auto;display:flex;align-items:center}.kadence_theme_dash_head .kadence_theme_dash_logo{width:50px;height:50px;padding-right:10px}.kadence_theme_dash_head .kadence_theme_dash_logo img{width:50px}.kadence_theme_dash_head .kadence_theme_dash_version{flex-grow:1;text-align:right}.kadence_theme_dash_head .kadence_theme_dash_version span{padding:5px;background:#4a5568;color:#fff}.wrap.kadence_theme_dash{margin:20px 20px 0}.kadence_theme_dashboard{margin:0 auto}.templates-grid{display:grid;grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);grid-gap:2em}.kst-template-item .components-button.kst-import-btn{height:100%;width:100%;padding:0;display:block;border:0;background:transparent;position:absolute;box-shadow:0 0px 0px 0 rgba(0,0,0,0)}.kst-template-item .components-button.kst-import-btn img{max-width:100%;height:auto}.kst-grid-single-item{max-width:800px}.kst-grid-single-item .kst-template-item{overflow:hidden}.kst-grid-single-item .kst-import-btn{height:100%;width:100%;padding:0;display:block;border:0;background:transparent;position:absolute;box-shadow:0 0px 0px 0 rgba(0,0,0,0)}.kst-grid-single-item .kst-import-btn img{max-width:100%;height:auto}.kadence_starter_templates_notice{background:#ebf8ff;margin-bottom:20px;border:1px solid #4299e1;padding:10px;color:#2b6cb0;font-weight:bold}.kst-import-modal ul.kadence-required-wrap{margin-bottom:20px}.components-modal__frame.kst-import-modal{-webkit-animation:none !important;animation:none !important}.kst-import-modal h3{font-size:16px}.kadence_starter_templates_response{background:#fffaf0;margin-bottom:20px;border:1px solid #ed8936;padding:10px;color:#c05621;font-weight:bold}.kst-template-item{position:relative;height:0;padding-bottom:65%;overflow:hidden}.sidebar-section .components-panel__body.is-opened{padding:20px}.sidebar-section h2:first-child,.tab-section h2:first-child{margin-top:0}.side-panel .components-panel+.components-panel{margin-top:1rem}.tab-section .components-panel__body.is-opened{padding:25px}.kadence-dashboard-tab-panel .components-tab-panel__tabs .components-button{border:1px solid transparent;background:transparent;border:none;box-shadow:none;border-radius:0;cursor:pointer;height:48px;padding:3px 16px;margin-left:0;font-weight:500}.kadence-dashboard-tab-panel .components-tab-panel__tabs .components-button:hover{box-shadow:none !important}.kadence-dashboard-tab-panel .components-tab-panel__tabs .components-button:not(.active-tab):hover{color:#007cba !important;background:transparent !important}.kadence-dashboard-tab-panel .components-tab-panel__tabs .components-button.active-tab{background:#fff;border:1px solid #e2e4e7;border-bottom-color:transparent}.kadence-dashboard-tab-panel .components-tab-panel__tabs{margin-bottom:-1px}.two-col-grid{display:grid;grid-gap:1rem;grid-template-columns:1fr 1fr 1fr}h3.section-sub-head{background:#edf2f7;padding:10px;color:#4a5568;font-size:14px;text-transform:uppercase;margin-bottom:1rem;margin-top:2rem}.link-item{border:1px solid #e2e8f0;padding:20px;border-radius:4px;display:flex;flex-flow:column nowrap}.link-item h4{margin:0}.dashboard-pro-settings{margin-top:2rem}.link-item .link-item-foot{margin-top:auto;display:flex;align-items:center}.link-item .link-item-foot .components-spinner{margin-top:0}.link-item .link-item-foot .components-toggle-control .components-base-control__field{margin-bottom:0}.link-item .link-item-foot .components-toggle-control .components-base-control__field .components-form-toggle{margin-right:0}.link-item .link-item-foot>*:first-child{flex-grow:2}.link-item a{display:block;background:transparent;color:#4a5568}.link-item a:hover{color:#007cba}span.kt-license-status{padding:4px;margin-left:10px;font-size:14px;text-transform:uppercase}span.kt-license-status.k-inactive{color:#c05621 !important;background:#fffaf0 !important}span.kt-license-status.k-active{color:#2b6cb0 !important;background:#ebf8ff !important}.license-section h2{display:flex;margin-top:0;align-items:center;justify-content:space-between}.license-section table.form-table{display:block}.license-section table.form-table tbody{display:block}.license-section table.form-table td,.license-section table.form-table tr{display:block;padding:0;width:100%}.license-section .form-table th{padding:0;width:100%;margin-bottom:4px;display:block;color:#4a5568}.license-section p.submit{padding:0;margin-top:10px}.license-section table.form-table input[type=text]{width:100%}.kadence-starter-templates-preview .install-theme-info .theme-name{font-size:20px}.appearance_page_kadence-starter-templates .kadence-starter-templates-preview-actions .button{width:100%;line-height:1;min-height:35px}.appearance_page_kadence-starter-templates .kadence-starter-templates-preview-actions{padding:5px}.kadence-starter-templates-preview button.components-button.kst-palette-btn{border-radius:4px !important;padding:5px 5px 5px 7px;height:auto;display:inline-flex;align-items:flex-end;justify-content:center;border:1px solid transparent;box-shadow:none !important}.kst-template-item .components-button.kst-import-btn:hover,.kst-template-item .components-button.kst-import-btn:focus{box-shadow:0 7px 15px 0 rgba(0,0,0,.15) !important}.kadence-starter-templates-preview button.components-button.kst-palette-btn:hover,.kadence-starter-templates-preview button.components-button.kst-palette-btn:focus{border:1px solid #444;box-shadow:none !important}.kadence-starter-templates-preview button.components-button.kst-palette-btn.is-primary,.kadence-starter-templates-preview button.components-button.kst-palette-btn.is-primary:hover,.kadence-starter-templates-preview button.components-button.kst-palette-btn.is-primary:focus{background:#eee;border:1px solid #aaa;box-shadow:none}.demo-title{height:30px;margin:0;padding:10px 0;box-shadow:inset 0 1px 0 rgba(0,0,0,.1);background:rgba(255,255,255,.95);position:absolute;bottom:0;left:0;width:100%}.demo-title h4{margin:0;font-size:18px;text-align:left;line-height:30px;padding:0 20px;color:#1e1e1e}.kadence-starter-templates-preview .components-button-group.kst-palette-group{display:grid;grid-template-columns:1fr 1fr;grid-gap:5px}.palette-title-wrap{display:flex;align-items:center;justify-content:space-between}@media(max-width:
|
1 |
+
.appearance_page_kadence-starter-templates #wpcontent{padding:0}.kadence_theme_dash_head{background:#fff;padding:10px 20px;height:50px}.kadence_theme_dash_head h1{color:#2d3748;line-height:50px;padding:0;height:50px;margin:0;display:flex;align-items:center}.kadence_theme_dash_head .subtext{font-size:16px;color:#718096;display:inline-block;padding-left:10px}.kadence_theme_dash_head .kadence_theme_dash_head_container{margin:0 auto;display:flex;align-items:center}.kadence_theme_dash_head .kadence_theme_dash_logo{width:50px;height:50px;padding-right:10px}.kadence_theme_dash_head .kadence_theme_dash_logo img{width:50px}.kadence_theme_dash_head .kadence_theme_dash_version{flex-grow:1;text-align:right}.kadence_theme_dash_head .kadence_theme_dash_version span{padding:5px;background:#4a5568;color:#fff}.wrap.kadence_theme_dash{margin:20px 20px 0}.kadence_theme_dashboard{margin:0 auto}.templates-grid{display:grid;grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);grid-gap:2em}.kst-template-item .components-button.kst-import-btn{height:100%;width:100%;padding:0;display:block;border:0;background:transparent;position:absolute;box-shadow:0 0px 0px 0 rgba(0,0,0,0)}.kst-template-item .components-button.kst-import-btn img{max-width:100%;height:auto}.kst-grid-single-item{max-width:800px}.kst-grid-single-item .kst-template-item{overflow:hidden}.kst-grid-single-item .kst-import-btn{height:100%;width:100%;padding:0;display:block;border:0;background:transparent;position:absolute;box-shadow:0 0px 0px 0 rgba(0,0,0,0)}.kst-grid-single-item .kst-import-btn img{max-width:100%;height:auto}.kadence_starter_templates_notice{background:#ebf8ff;margin-bottom:20px;border:1px solid #4299e1;padding:10px;color:#2b6cb0;font-weight:bold}.kst-import-modal ul.kadence-required-wrap{margin-bottom:20px}.components-modal__frame.kst-import-modal{-webkit-animation:none !important;animation:none !important}.kst-import-modal h3{font-size:16px}.kadence_starter_templates_response{background:#fffaf0;margin-bottom:20px;border:1px solid #ed8936;padding:10px;color:#c05621;font-weight:bold}.kst-template-item{position:relative;height:0;padding-bottom:65%;overflow:hidden}.sidebar-section .components-panel__body.is-opened{padding:20px}.sidebar-section h2:first-child,.tab-section h2:first-child{margin-top:0}.side-panel .components-panel+.components-panel{margin-top:1rem}.tab-section .components-panel__body.is-opened{padding:25px}.kadence-dashboard-tab-panel .components-tab-panel__tabs .components-button{border:1px solid transparent;background:transparent;border:none;box-shadow:none;border-radius:0;cursor:pointer;height:48px;padding:3px 16px;margin-left:0;font-weight:500}.kadence-dashboard-tab-panel .components-tab-panel__tabs .components-button:hover{box-shadow:none !important}.kadence-dashboard-tab-panel .components-tab-panel__tabs .components-button:not(.active-tab):hover{color:#007cba !important;background:transparent !important}.kadence-dashboard-tab-panel .components-tab-panel__tabs .components-button.active-tab{background:#fff;border:1px solid #e2e4e7;border-bottom-color:transparent}.kadence-dashboard-tab-panel .components-tab-panel__tabs{margin-bottom:-1px}.two-col-grid{display:grid;grid-gap:1rem;grid-template-columns:1fr 1fr 1fr}h3.section-sub-head{background:#edf2f7;padding:10px;color:#4a5568;font-size:14px;text-transform:uppercase;margin-bottom:1rem;margin-top:2rem}.link-item{border:1px solid #e2e8f0;padding:20px;border-radius:4px;display:flex;flex-flow:column nowrap}.link-item h4{margin:0}.dashboard-pro-settings{margin-top:2rem}.link-item .link-item-foot{margin-top:auto;display:flex;align-items:center}.link-item .link-item-foot .components-spinner{margin-top:0}.link-item .link-item-foot .components-toggle-control .components-base-control__field{margin-bottom:0}.link-item .link-item-foot .components-toggle-control .components-base-control__field .components-form-toggle{margin-right:0}.link-item .link-item-foot>*:first-child{flex-grow:2}.link-item a{display:block;background:transparent;color:#4a5568}.link-item a:hover{color:#007cba}span.kt-license-status{padding:4px;margin-left:10px;font-size:14px;text-transform:uppercase}span.kt-license-status.k-inactive{color:#c05621 !important;background:#fffaf0 !important}span.kt-license-status.k-active{color:#2b6cb0 !important;background:#ebf8ff !important}.license-section h2{display:flex;margin-top:0;align-items:center;justify-content:space-between}.license-section table.form-table{display:block}.license-section table.form-table tbody{display:block}.license-section table.form-table td,.license-section table.form-table tr{display:block;padding:0;width:100%}.license-section .form-table th{padding:0;width:100%;margin-bottom:4px;display:block;color:#4a5568}.license-section p.submit{padding:0;margin-top:10px}.license-section table.form-table input[type=text]{width:100%}.kadence-starter-templates-preview .install-theme-info .theme-name{font-size:20px}.appearance_page_kadence-starter-templates .kadence-starter-templates-preview-actions .button{width:100%;line-height:1;min-height:35px}.appearance_page_kadence-starter-templates .kadence-starter-templates-preview-actions{padding:5px}.kadence-starter-templates-preview button.components-button.kst-palette-btn{border-radius:4px !important;padding:5px 5px 5px 7px;height:auto;display:inline-flex;align-items:flex-end;justify-content:center;border:1px solid transparent;box-shadow:none !important}.kst-template-item .components-button.kst-import-btn:hover,.kst-template-item .components-button.kst-import-btn:focus{box-shadow:0 7px 15px 0 rgba(0,0,0,.15) !important}.kadence-starter-templates-preview button.components-button.kst-palette-btn:hover,.kadence-starter-templates-preview button.components-button.kst-palette-btn:focus{border:1px solid #444;box-shadow:none !important}.kadence-starter-templates-preview button.components-button.kst-palette-btn.is-primary,.kadence-starter-templates-preview button.components-button.kst-palette-btn.is-primary:hover,.kadence-starter-templates-preview button.components-button.kst-palette-btn.is-primary:focus{background:#eee;border:1px solid #aaa;box-shadow:none}.demo-title{height:30px;margin:0;padding:10px 0;box-shadow:inset 0 1px 0 rgba(0,0,0,.1);background:rgba(255,255,255,.95);position:absolute;bottom:0;left:0;width:100%}.demo-title h4{margin:0;font-size:18px;text-align:left;line-height:30px;padding:0 20px;color:#1e1e1e}.kadence-starter-templates-preview .components-button-group.kst-palette-group{display:grid;grid-template-columns:1fr 1fr;grid-gap:5px}.palette-title-wrap{display:flex;align-items:center;justify-content:space-between}@media(max-width: 1860px){.kadence-starter-templates-preview .kadence-swatche-item-wrap{width:22px !important;height:22px !important}h2.palette-title{font-size:15px}}@media(max-width: 1460px){.templates-grid{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr)}}.kadence-starter-required-plugins{padding:10px 20px 10px}p.install-third-party-notice{max-width:540px;background:#fffaf0;padding:1em;color:#c05621;border:1px solid #c05621;font-weight:600}.plugin-install-required{display:block;font-style:oblique;font-weight:400;color:#c05621}.kadence-required-wrap{font-weight:bold;list-style:disc;padding-left:1.4em}span.plugin-status{text-transform:uppercase;color:#777}.kst-palette-btn.kst-selected-color-palette{display:flex;margin-bottom:20px}.finshed-notice-success .button-primary.button.kadence-starter-templates-finish-button{padding:10px 16px;font-size:18px}
|
assets/js/src/starter-import-export.js
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
( function( $, api ) {
|
2 |
+
var $window = $( window ),
|
3 |
+
$document = $( document ),
|
4 |
+
$body = $( 'body' );
|
5 |
+
/**
|
6 |
+
* API on ready event handlers
|
7 |
+
*
|
8 |
+
* All handlers need to be inside the 'ready' state.
|
9 |
+
*/
|
10 |
+
wp.customize.bind( 'ready', function() {
|
11 |
+
/**
|
12 |
+
* Init import export.
|
13 |
+
*/
|
14 |
+
var kadenceImportExport = {
|
15 |
+
init: function() {
|
16 |
+
$( 'input[name=kadence-starter-export-button]' ).on( 'click', kadenceImportExport.export );
|
17 |
+
$( 'input[name=kadence-starter-import-button]' ).on( 'click', kadenceImportExport.import );
|
18 |
+
$( 'input[name=kadence-starter-reset-button]' ).on( 'click', kadenceImportExport.reset );
|
19 |
+
},
|
20 |
+
|
21 |
+
export: function() {
|
22 |
+
window.location.href = kadenceStarterImport.customizerURL + '?kadence-starter-export=' + kadenceStarterImport.nonce.export;
|
23 |
+
},
|
24 |
+
import: function() {
|
25 |
+
var win = $( window ),
|
26 |
+
body = $( 'body' ),
|
27 |
+
form = $( '<form class="kadence-starter-import-form" method="POST" enctype="multipart/form-data"></form>' ),
|
28 |
+
controls = $( '.kadence-starter-import-controls' ),
|
29 |
+
file = $( 'input[name=kadence-starter-import-file]' ),
|
30 |
+
message = $( '.kadence-starter-uploading' );
|
31 |
+
|
32 |
+
if ( '' == file.val() ) {
|
33 |
+
alert( kadenceStarterImport.emptyImport );
|
34 |
+
}
|
35 |
+
else {
|
36 |
+
win.off( 'beforeunload' );
|
37 |
+
body.append( form );
|
38 |
+
form.append( controls );
|
39 |
+
message.show();
|
40 |
+
form.submit();
|
41 |
+
}
|
42 |
+
},
|
43 |
+
reset: function() {
|
44 |
+
var data = {
|
45 |
+
wp_customize: 'on',
|
46 |
+
action: 'kadence_starter_reset',
|
47 |
+
nonce: kadenceStarterImport.nonce.reset
|
48 |
+
};
|
49 |
+
|
50 |
+
var r = confirm( kadenceStarterImport.resetConfirm );
|
51 |
+
|
52 |
+
if (!r) return;
|
53 |
+
|
54 |
+
$( 'input[name=kadence-starter-reset-button]' ).attr('disabled', 'disabled');
|
55 |
+
|
56 |
+
$.post( ajaxurl, data, function () {
|
57 |
+
wp.customize.state('saved').set( true );
|
58 |
+
location.reload();
|
59 |
+
});
|
60 |
+
}
|
61 |
+
};
|
62 |
+
|
63 |
+
$( kadenceImportExport.init );
|
64 |
+
});
|
65 |
+
|
66 |
+
} )( jQuery, wp );
|
assets/js/starter-import-export.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(t,e){t(window),t(document),t("body");wp.customize.bind("ready",(function(){var e={init:function(){t("input[name=kadence-starter-export-button]").on("click",e.export),t("input[name=kadence-starter-import-button]").on("click",e.import),t("input[name=kadence-starter-reset-button]").on("click",e.reset)},export:function(){window.location.href=kadenceStarterImport.customizerURL+"?kadence-starter-export="+kadenceStarterImport.nonce.export},import:function(){var e=t(window),r=t("body"),n=t('<form class="kadence-starter-import-form" method="POST" enctype="multipart/form-data"></form>'),o=t(".kadence-starter-import-controls"),a=t("input[name=kadence-starter-import-file]"),i=t(".kadence-starter-uploading");""==a.val()?alert(kadenceStarterImport.emptyImport):(e.off("beforeunload"),r.append(n),n.append(o),i.show(),n.submit())},reset:function(){var e={wp_customize:"on",action:"kadence_starter_reset",nonce:kadenceStarterImport.nonce.reset};confirm(kadenceStarterImport.resetConfirm)&&(t("input[name=kadence-starter-reset-button]").attr("disabled","disabled"),t.post(ajaxurl,e,(function(){wp.customize.state("saved").set(!0),location.reload()})))}};t(e.init)}))}(jQuery,wp);
|
assets/js/starter-templates.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('react', 'react-dom', 'wp-element', 'wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('react', 'react-dom', 'wp-element', 'wp-polyfill'), 'version' => 'db30b4e39d9de07fdf23214c4498639f');
|
assets/js/starter-templates.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=46)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t,n){var r=n(28),o="object"==typeof self&&self&&self.Object===Object&&self,a=r||o||Function("return this")();e.exports=a},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r=n(24),o=n(49),a=n(128),i=n(2);e.exports=function(e,t){return(i(e)?r:a)(e,o(t,3))}},function(e,t,n){var r=n(62),o=n(67);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t,n){var r=n(10),o=n(63),a=n(64),i=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?o(e):a(e)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){var r=n(52),o=n(53),a=n(54),i=n(55),c=n(56);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=a,s.prototype.has=i,s.prototype.set=c,e.exports=s},function(e,t,n){var r=n(26);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(1).Symbol;e.exports=r},function(e,t,n){var r=n(4)(Object,"create");e.exports=r},function(e,t,n){var r=n(76);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){var r=n(22);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},function(e,t,n){var r=n(4)(n(1),"Map");e.exports=r},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r=n(68),o=n(75),a=n(77),i=n(78),c=n(79);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=a,s.prototype.has=i,s.prototype.set=c,e.exports=s},function(e,t,n){var r=n(97),o=n(104),a=n(20);e.exports=function(e){return a(e)?r(e):o(e)}},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t,n){var r=n(27),o=n(19);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t,n){var r=n(2),o=n(22),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||(i.test(e)||!a.test(e)||null!=t&&e in Object(t))}},function(e,t,n){var r=n(5),o=n(6);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}},function(e,t,n){var r=n(8),o=n(57),a=n(58),i=n(59),c=n(60),s=n(61);function u(e){var t=this.__data__=new r(e);this.size=t.size}u.prototype.clear=o,u.prototype.delete=a,u.prototype.get=i,u.prototype.has=c,u.prototype.set=s,e.exports=u},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(5),o=n(16);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(15))},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){var r=n(80),o=n(6);e.exports=function e(t,n,a,i,c){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!=t&&n!=n:r(t,n,a,i,e,c))}},function(e,t,n){var r=n(81),o=n(84),a=n(85);e.exports=function(e,t,n,i,c,s){var u=1&n,l=e.length,f=t.length;if(l!=f&&!(u&&f>l))return!1;var p=s.get(e);if(p&&s.get(t))return p==t;var d=-1,v=!0,m=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++d<l;){var b=e[d],h=t[d];if(i)var y=u?i(h,b,d,t,e,s):i(b,h,d,e,t,s);if(void 0!==y){if(y)continue;v=!1;break}if(m){if(!o(t,(function(e,t){if(!a(m,t)&&(b===e||c(b,e,n,i,s)))return m.push(t)}))){v=!1;break}}else if(b!==h&&!c(b,h,n,i,s)){v=!1;break}}return s.delete(e),s.delete(t),v}},function(e,t,n){var r=n(99),o=n(6),a=Object.prototype,i=a.hasOwnProperty,c=a.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(e){return o(e)&&i.call(e,"callee")&&!c.call(e,"callee")};e.exports=s},function(e,t,n){(function(e){var r=n(1),o=n(100),a=t&&!t.nodeType&&t,i=a&&"object"==typeof e&&e&&!e.nodeType&&e,c=i&&i.exports===a?r.Buffer:void 0,s=(c?c.isBuffer:void 0)||o;e.exports=s}).call(this,n(34)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t,n){var r=n(101),o=n(102),a=n(103),i=a&&a.isTypedArray,c=i?o(i):r;e.exports=c},function(e,t,n){var r=n(16);e.exports=function(e){return e==e&&!r(e)}},function(e,t){e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},function(e,t,n){var r=n(40),o=n(13);e.exports=function(e,t){for(var n=0,a=(t=r(t,e)).length;null!=e&&n<a;)e=e[o(t[n++])];return n&&n==a?e:void 0}},function(e,t,n){var r=n(2),o=n(21),a=n(116),i=n(119);e.exports=function(e,t){return r(e)?e:o(e,t)?[e]:a(i(e))}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(47);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){var r=n(48),o=n(7);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(134),a=d(o),i=d(n(135)),c=n(138),s=n(139),u=d(n(140)),l=d(n(141)),f=d(n(142)),p=d(n(143));function d(e){return e&&e.__esModule?e:{default:e}}var v=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.lazyLoadHandler=n.lazyLoadHandler.bind(n),e.throttle>0&&(e.debounce?n.lazyLoadHandler=(0,u.default)(n.lazyLoadHandler,e.throttle):n.lazyLoadHandler=(0,l.default)(n.lazyLoadHandler,e.throttle)),n.state={visible:!1},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"componentDidMount",value:function(){this._mounted=!0;var e=this.getEventNode();this.lazyLoadHandler(),this.lazyLoadHandler.flush&&this.lazyLoadHandler.flush(),(0,s.add)(window,"resize",this.lazyLoadHandler),(0,s.add)(e,"scroll",this.lazyLoadHandler),e!==window&&(0,s.add)(window,"scroll",this.lazyLoadHandler)}},{key:"componentWillReceiveProps",value:function(){this.state.visible||this.lazyLoadHandler()}},{key:"shouldComponentUpdate",value:function(e,t){return t.visible}},{key:"componentWillUnmount",value:function(){this._mounted=!1,this.lazyLoadHandler.cancel&&this.lazyLoadHandler.cancel(),this.detachListeners()}},{key:"getEventNode",value:function(){return(0,f.default)((0,c.findDOMNode)(this))}},{key:"getOffset",value:function(){var e=this.props,t=e.offset,n=e.offsetVertical,r=e.offsetHorizontal,o=e.offsetTop,a=e.offsetBottom,i=e.offsetLeft,c=e.offsetRight,s=e.threshold||t,u=n||s,l=r||s;return{top:o||u,bottom:a||u,left:i||l,right:c||l}}},{key:"lazyLoadHandler",value:function(){if(this._mounted){var e=this.getOffset(),t=(0,c.findDOMNode)(this),n=this.getEventNode();if((0,p.default)(t,n,e)){var r=this.props.onContentVisible;this.setState({visible:!0},(function(){r&&r()})),this.detachListeners()}}}},{key:"detachListeners",value:function(){var e=this.getEventNode();(0,s.remove)(window,"resize",this.lazyLoadHandler),(0,s.remove)(e,"scroll",this.lazyLoadHandler),e!==window&&(0,s.remove)(window,"scroll",this.lazyLoadHandler)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.height,i=e.width,c=this.state.visible,s={height:r,width:i},u="LazyLoad"+(c?" is-visible":"")+(n?" "+n:"");return a.default.createElement(this.props.elementType,{className:u,style:s},c&&o.Children.only(t))}}]),t}(o.Component);t.default=v,v.propTypes={children:i.default.node.isRequired,className:i.default.string,debounce:i.default.bool,elementType:i.default.string,height:i.default.oneOfType([i.default.string,i.default.number]),offset:i.default.number,offsetBottom:i.default.number,offsetHorizontal:i.default.number,offsetLeft:i.default.number,offsetRight:i.default.number,offsetTop:i.default.number,offsetVertical:i.default.number,threshold:i.default.number,throttle:i.default.number,width:i.default.oneOfType([i.default.string,i.default.number]),onContentVisible:i.default.func},v.defaultProps={elementType:"div",debounce:!0,offset:0,offsetBottom:0,offsetHorizontal:0,offsetLeft:0,offsetRight:0,offsetTop:0,offsetVertical:0,throttle:250}},function(e,t,n){"use strict";n.r(t);var r=n(41),o=n.n(r),a=n(42),i=n.n(a),c=n(7),s=n.n(c),u=n(43),l=n.n(u),f=n(44),p=n.n(f),d=n(23),v=n.n(d),m=n(0),b=n(3),h=n.n(b),y=n(45),g=n.n(y);function j(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=v()(e);if(t){var o=v()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p()(this,n)}}var _=wp.i18n,x=_.__,O=(_.sprintf,wp.element),w=O.Fragment,k=O.Component,E=O.render,P=wp.components,S=P.Modal,N=P.Spinner,T=P.ButtonGroup,z=P.Button,A=P.ExternalLink,L=wp.apiFetch,M=function(e){l()(n,e);var t=j(n);function n(){var e;return o()(this,n),(e=t.apply(this,arguments)).runAjax=e.runAjax.bind(s()(e)),e.runPluginInstall=e.runPluginInstall.bind(s()(e)),e.focusMode=e.focusMode.bind(s()(e)),e.state={category:"all",activeTemplate:"",colorPalette:"",search:null,isFetching:!1,isImporting:!1,progress:"",focusMode:!1,finished:!1,templates:kadenceStarterParams.templates?kadenceStarterParams.templates:[],palettes:kadenceStarterParams.palettes?kadenceStarterParams.palettes:[]},L.setFetchHandler((function(e){var t=e.url,n=e.path,r=e.data,o=e.method;return axios({url:t||n,method:o,data:r})})),e}return i()(n,[{key:"capitalizeFirstLetter",value:function(e){return e.charAt(0).toUpperCase()+e.slice(1)}},{key:"focusMode",value:function(e){this.setState({activeTemplate:e,focusMode:!0})}},{key:"runPluginInstall",value:function(e){this.setState({progress:"plugins",isFetching:!0});var t=new FormData;t.append("action","kadence_import_install_plugins"),t.append("security",kadenceStarterParams.ajax_nonce),t.append("selected",e),this.runAjax(t)}},{key:"runAjax",value:function(e){var t=this;jQuery.ajax({method:"POST",url:kadenceStarterParams.ajax_url,data:e,contentType:!1,processData:!1}).done((function(n,r,o){if(void 0!==n.status&&"newAJAX"===n.status)t.state.progress="contentNew",t.runAjax(e);else if(void 0!==n.status&&"customizerAJAX"===n.status){t.setState({progress:"customizer"}),(a=new FormData).append("action","kadence_import_customizer_data"),a.append("security",kadenceStarterParams.ajax_nonce),a.append("wp_customize","on"),t.runAjax(a)}else if(void 0!==n.status&&"afterAllImportAJAX"===n.status){t.setState({progress:"widgets"}),(a=new FormData).append("action","kadence_after_import_data"),a.append("security",kadenceStarterParams.ajax_nonce),t.runAjax(a)}else if(void 0!==n.status&&"pluginSuccess"===n.status){var a;t.setState({progress:"content"}),(a=new FormData).append("action","kadence_import_demo_data"),a.append("security",kadenceStarterParams.ajax_nonce),a.append("selected",t.state.activeTemplate),a.append("palette",t.state.colorPalette),t.runAjax(a)}else void 0!==n.message?(jQuery(".kadence_starter_templates_finished").append("<p>"+n.message+"</p>"),t.setState({finished:!0,isFetching:!1,activeTemplate:"",focusMode:!1,isImporting:!1,progress:""})):(jQuery(".kadence_starter_templates_error").append('<div class="notice kadence_starter_templates_response notice-error"><p>'+n+"</p></div>"),t.setState({finished:!0,isFetching:!1,activeTemplate:"",focusMode:!1,isImporting:!1,progress:""}))})).fail((function(e){jQuery(".kadence_starter_templates_error").append('<div class="notice kadence_starter_templates_response notice-error"><p>Error: '+e.statusText+" ("+e.status+")</p></div>"),t.setState({finished:!0,isFetching:!1,activeTemplate:"",focusMode:!1,isImporting:!1,progress:""})}))}},{key:"render",value:function(){for(var e=this,t=["all"],n=0;n<this.state.templates.length;n++)for(var r=0;r<this.state.templates[n].categories.length;r++)t.includes(this.state.templates[n].categories[r])||t.push(this.state.templates[n].categories[r]);t.map((function(t){return{value:t,label:e.capitalizeFirstLetter(t)}}));var o=function(){var t=e.state.templates.filter((function(t){return t.key===e.state.activeTemplate}))[0],n=!0,r=e.state.colorPalette?t.url+"?previewcolor="+e.state.colorPalette:t.url;return Object(m.createElement)("div",{className:"kadence-starter-templates-preview theme-install-overlay wp-full-overlay expanded",style:{display:"block"}},Object(m.createElement)("div",{className:"wp-full-overlay-sidebar"},Object(m.createElement)("div",{className:"wp-full-overlay-header"},Object(m.createElement)("button",{className:"kst-close-focus-btn close-full-overlay",onClick:function(){return e.setState({activeTemplate:"",colorPalette:"",focusMode:!1})}})),Object(m.createElement)("div",{className:"wp-full-overlay-sidebar-content"},Object(m.createElement)("div",{className:"install-theme-info"},Object(m.createElement)("h3",{className:"theme-name"},t.name),Object(m.createElement)("div",{className:"theme-by"},t.categories.map((function(t){return e.capitalizeFirstLetter(t)})).join(", ")),Object(m.createElement)("img",{className:"theme-screenshot",src:t.image,alt:t.name}),Object(m.createElement)("div",{className:"palette-title-wrap"},Object(m.createElement)("h2",{className:"palette-title"},x("Optional: Choose Color Scheme","kadence-starter-templates")),Object(m.createElement)(z,{label:x("clear"),className:"kst-clear-palette",disabled:!e.state.colorPalette,icon:"image-rotate",iconSize:10,onClick:function(){return e.setState({colorPalette:""})}})),Object(m.createElement)(T,{className:"kst-palette-group","aria-label":x("Select a Palette","kadence-starter-templates")},h()(e.state.palettes,(function(t){var n=t.palette,r=t.colors;return Object(m.createElement)(z,{className:"kst-palette-btn",isPrimary:n===e.state.colorPalette,"aria-pressed":n===e.state.colorPalette,onClick:function(){return e.setState({colorPalette:n})}},h()(r,(function(e,t){return Object(m.createElement)("div",{key:t,style:{width:30,height:30,marginBottom:0,marginRight:"3px",transform:"scale(1)",transition:"100ms transform ease"},className:"kadence-swatche-item-wrap"},Object(m.createElement)("span",{className:"kadence-swatch-item",style:{height:"100%",display:"block",width:"100%",border:"1px solid rgb(218, 218, 218)",borderRadius:"50%",color:"".concat(e),boxShadow:"inset 0 0 0 ".concat(15,"px"),transition:"100ms box-shadow ease"}}))})))}))),Object(m.createElement)("p",{className:"desc-small"},x("*You can change this after import.","kadence-starter-templates"))),Object(m.createElement)("div",{className:"kadence-starter-required-plugins"},Object(m.createElement)("h3",null,x("Required Plugins","kadence-starter-templates")),Object(m.createElement)("ul",{className:"kadence-required-wrap"},h()(t.plugins,(function(e){var t=e.state,r=e.title;return"active"!==t&&(n=!1),Object(m.createElement)("li",{className:"plugin-required"},r," - ",Object(m.createElement)("span",{class:"plugin-status"},"notactive"===t?x("Not Installed","kadence-starter-templates"):t))}))),!n&&Object(m.createElement)("p",{className:"desc-small"},x("*Missing/Inactive plugins will be installed on import.","kadence-starter-templates")))),Object(m.createElement)("div",{class:"wp-full-overlay-footer"},Object(m.createElement)("div",{class:"kadence-starter-templates-preview-actions"},Object(m.createElement)("button",{className:"kst-import-btn button-hero button button-primary",isDisabled:void 0!==t.pro&&t.pro&&"true"!==kadenceStarterParams.pro,onClick:function(){return e.setState({isImporting:!0})}},x("Import","kadence-starter-templates"))))),Object(m.createElement)("div",{class:"wp-full-overlay-main"},Object(m.createElement)("iframe",{id:"kadence-starter-preview",src:r})))},a=function(){var t=e.state.templates.filter((function(t){return t.key===e.state.activeTemplate}))[0];return Object(m.createElement)(w,null,Object(m.createElement)("div",{className:"kst-grid-single-item"},Object(m.createElement)("div",{className:"kst-template-item"},Object(m.createElement)("div",{className:"kst-import-btn"},Object(m.createElement)("img",{src:t.image,alt:t.name}),Object(m.createElement)("div",{className:"demo-title"},Object(m.createElement)("h4",null,t.name))))),Object(m.createElement)(S,{className:"kst-import-modal",title:x("Import Starter Template"),onRequestClose:function(){return!e.state.isFetching&&e.setState({activeTemplate:"",colorPalette:"",focusMode:!1,isImporting:!1,progress:""})}},Object(m.createElement)("div",{className:"kadence_starter_templates_notice"},kadenceStarterParams.notice),Object(m.createElement)("h3",null,x("Starter Template Plugins","kadence-starter-templates")),Object(m.createElement)("ul",{className:"kadence-required-wrap"},h()(t.plugins,(function(e){e.state;var t=e.title;return Object(m.createElement)("li",{className:"plugin-required"},t)}))),e.state.colorPalette&&Object(m.createElement)(w,null,Object(m.createElement)("h3",null,x("Selected Color Palette","kadence-starter-templates")),h()(e.state.palettes,(function(t){var n=t.palette,r=t.colors;if(n===e.state.colorPalette)return Object(m.createElement)("div",{className:"kst-palette-btn kst-selected-color-palette"},h()(r,(function(e,t){return Object(m.createElement)("div",{key:t,style:{width:22,height:22,marginBottom:0,marginRight:"3px",transform:"scale(1)",transition:"100ms transform ease"},className:"kadence-swatche-item-wrap"},Object(m.createElement)("span",{className:"kadence-swatch-item",style:{height:"100%",display:"block",width:"100%",border:"1px solid rgb(218, 218, 218)",borderRadius:"50%",color:"".concat(e),boxShadow:"inset 0 0 0 ".concat(15,"px"),transition:"100ms box-shadow ease"}}))})))}))),"plugins"===e.state.progress&&Object(m.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.plugin_progress),"content"===e.state.progress&&Object(m.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.content_progress),"contentNew"===e.state.progress&&Object(m.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.content_new_progress),"customizer"===e.state.progress&&Object(m.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.customizer_progress),"widgets"===e.state.progress&&Object(m.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.widgets_progress),e.state.isFetching&&Object(m.createElement)(N,null),!kadenceStarterParams.isKadence&&Object(m.createElement)("div",{class:"kadence_starter_templates_response"},Object(m.createElement)("h2",null,x("This Starter Template Requires the Kadence Theme","kadence-starter-templates")),Object(m.createElement)(A,{href:"https://www.kadencewp.com/kadence-theme/"},x("Get Free Theme","kadence-blocks"))),kadenceStarterParams.isKadence&&Object(m.createElement)(z,{className:"kt-defaults-save",isPrimary:!0,disabled:e.state.isFetching,onClick:function(){e.runPluginInstall(t.key)}},x("Start Importing"))))},i=function(){return Object(m.createElement)("div",{className:"templates-grid"},h()(e.state.templates,(function(t){var n=t.name,r=t.key,o=t.image,a=(t.content,t.categories),i=t.keywords,c=t.pro;if(("all"===e.state.category||a.includes(e.state.category))&&(!e.state.search||i&&i.some((function(t){return t.toLowerCase().includes(e.state.search.toLowerCase())}))))return Object(m.createElement)("div",{className:"kst-template-item"},Object(m.createElement)(z,{key:r,className:"kst-import-btn",isSmall:!0,isDisabled:void 0!==c&&c&&"true"!==kadenceStarterParams.pro,onClick:function(){return e.focusMode(r)}},Object(m.createElement)(g.a,null,Object(m.createElement)("img",{src:o,alt:n})),Object(m.createElement)("div",{className:"demo-title"},Object(m.createElement)("h4",null,n))),void 0!==c&&c&&Object(m.createElement)(w,null,Object(m.createElement)("span",{className:"kb-pro-template"},x("Pro","kadence-blocks")),"true"!==kadenceStarterParams.pro&&Object(m.createElement)("div",{className:"kt-popover-pro-notice"},Object(m.createElement)("h2",null,x("Kadence Pro required for this item","kadence-starter-sites")," "),Object(m.createElement)(A,{href:"https://www.kadencewp.com/pro/"},x("Upgrade to Pro","kadence-blocks")))))})))};return Object(m.createElement)(w,null,Object(m.createElement)((function(){return Object(m.createElement)("div",{className:"main-panel"},e.state.focusMode&&Object(m.createElement)(w,null,e.state.isImporting&&Object(m.createElement)(a,null),!e.state.isImporting&&Object(m.createElement)(o,null)),!e.state.focusMode&&!e.state.finished&&Object(m.createElement)(i,null))}),null))}}]),n}(k);wp.domReady((function(){E(Object(m.createElement)(M,null),document.querySelector(".kadence_starter_dashboard_main"))}))},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){var r=n(50),o=n(114),a=n(124),i=n(2),c=n(125);e.exports=function(e){return"function"==typeof e?e:null==e?a:"object"==typeof e?i(e)?o(e[0],e[1]):r(e):c(e)}},function(e,t,n){var r=n(51),o=n(113),a=n(38);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?a(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},function(e,t,n){var r=n(25),o=n(30);e.exports=function(e,t,n,a){var i=n.length,c=i,s=!a;if(null==e)return!c;for(e=Object(e);i--;){var u=n[i];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i<c;){var l=(u=n[i])[0],f=e[l],p=u[1];if(s&&u[2]){if(void 0===f&&!(l in e))return!1}else{var d=new r;if(a)var v=a(f,p,l,e,t,d);if(!(void 0===v?o(p,f,3,a,d):v))return!1}}return!0}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(9),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():o.call(t,n,1),--this.size,!0)}},function(e,t,n){var r=n(9);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(9);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(9);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(8);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(8),o=n(14),a=n(17);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(27),o=n(65),a=n(16),i=n(29),c=/^\[object .+?Constructor\]$/,s=Function.prototype,u=Object.prototype,l=s.toString,f=u.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?p:c).test(i(e))}},function(e,t,n){var r=n(10),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,c=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,c),n=e[c];try{e[c]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[c]=n:delete e[c]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r,o=n(66),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(1)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(69),o=n(8),a=n(14);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),string:new r}}},function(e,t,n){var r=n(70),o=n(71),a=n(72),i=n(73),c=n(74);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=a,s.prototype.has=i,s.prototype.set=c,e.exports=s},function(e,t,n){var r=n(11);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var r=n(11),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(11),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},function(e,t,n){var r=n(11);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,n){var r=n(12);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(12);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(12);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(12);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},function(e,t,n){var r=n(25),o=n(31),a=n(86),i=n(90),c=n(108),s=n(2),u=n(33),l=n(36),f="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,d,v,m){var b=s(e),h=s(t),y=b?"[object Array]":c(e),g=h?"[object Array]":c(t),j=(y="[object Arguments]"==y?f:y)==f,_=(g="[object Arguments]"==g?f:g)==f,x=y==g;if(x&&u(e)){if(!u(t))return!1;b=!0,j=!1}if(x&&!j)return m||(m=new r),b||l(e)?o(e,t,n,d,v,m):a(e,t,y,n,d,v,m);if(!(1&n)){var O=j&&p.call(e,"__wrapped__"),w=_&&p.call(t,"__wrapped__");if(O||w){var k=O?e.value():e,E=w?t.value():t;return m||(m=new r),v(k,E,n,d,m)}}return!!x&&(m||(m=new r),i(e,t,n,d,v,m))}},function(e,t,n){var r=n(17),o=n(82),a=n(83);function i(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}i.prototype.add=i.prototype.push=o,i.prototype.has=a,e.exports=i},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,n){var r=n(10),o=n(87),a=n(26),i=n(31),c=n(88),s=n(89),u=r?r.prototype:void 0,l=u?u.valueOf:void 0;e.exports=function(e,t,n,r,u,f,p){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return a(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var d=c;case"[object Set]":var v=1&r;if(d||(d=s),e.size!=t.size&&!v)return!1;var m=p.get(e);if(m)return m==t;r|=2,p.set(e,t);var b=i(d(e),d(t),r,u,f,p);return p.delete(e),b;case"[object Symbol]":if(l)return l.call(e)==l.call(t)}return!1}},function(e,t,n){var r=n(1).Uint8Array;e.exports=r},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},function(e,t,n){var r=n(91),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,a,i,c){var s=1&n,u=r(e),l=u.length;if(l!=r(t).length&&!s)return!1;for(var f=l;f--;){var p=u[f];if(!(s?p in t:o.call(t,p)))return!1}var d=c.get(e);if(d&&c.get(t))return d==t;var v=!0;c.set(e,t),c.set(t,e);for(var m=s;++f<l;){var b=e[p=u[f]],h=t[p];if(a)var y=s?a(h,b,p,t,e,c):a(b,h,p,e,t,c);if(!(void 0===y?b===h||i(b,h,n,a,c):y)){v=!1;break}m||(m="constructor"==p)}if(v&&!m){var g=e.constructor,j=t.constructor;g==j||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof j&&j instanceof j||(v=!1)}return c.delete(e),c.delete(t),v}},function(e,t,n){var r=n(92),o=n(94),a=n(18);e.exports=function(e){return r(e,a,o)}},function(e,t,n){var r=n(93),o=n(2);e.exports=function(e,t,n){var a=t(e);return o(e)?a:r(a,n(e))}},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},function(e,t,n){var r=n(95),o=n(96),a=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols,c=i?function(e){return null==e?[]:(e=Object(e),r(i(e),(function(t){return a.call(e,t)})))}:o;e.exports=c},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(98),o=n(32),a=n(2),i=n(33),c=n(35),s=n(36),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=a(e),l=!n&&o(e),f=!n&&!l&&i(e),p=!n&&!l&&!f&&s(e),d=n||l||f||p,v=d?r(e.length,String):[],m=v.length;for(var b in e)!t&&!u.call(e,b)||d&&("length"==b||f&&("offset"==b||"parent"==b)||p&&("buffer"==b||"byteLength"==b||"byteOffset"==b)||c(b,m))||v.push(b);return v}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t,n){var r=n(5),o=n(6);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},function(e,t){e.exports=function(){return!1}},function(e,t,n){var r=n(5),o=n(19),a=n(6),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,e.exports=function(e){return a(e)&&o(e.length)&&!!i[r(e)]}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(28),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o&&r.process,c=function(){try{var e=a&&a.require&&a.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=c}).call(this,n(34)(e))},function(e,t,n){var r=n(105),o=n(106),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))a.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(107)(Object.keys,Object);e.exports=r},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(109),o=n(14),a=n(110),i=n(111),c=n(112),s=n(5),u=n(29),l=u(r),f=u(o),p=u(a),d=u(i),v=u(c),m=s;(r&&"[object DataView]"!=m(new r(new ArrayBuffer(1)))||o&&"[object Map]"!=m(new o)||a&&"[object Promise]"!=m(a.resolve())||i&&"[object Set]"!=m(new i)||c&&"[object WeakMap]"!=m(new c))&&(m=function(e){var t=s(e),n="[object Object]"==t?e.constructor:void 0,r=n?u(n):"";if(r)switch(r){case l:return"[object DataView]";case f:return"[object Map]";case p:return"[object Promise]";case d:return"[object Set]";case v:return"[object WeakMap]"}return t}),e.exports=m},function(e,t,n){var r=n(4)(n(1),"DataView");e.exports=r},function(e,t,n){var r=n(4)(n(1),"Promise");e.exports=r},function(e,t,n){var r=n(4)(n(1),"Set");e.exports=r},function(e,t,n){var r=n(4)(n(1),"WeakMap");e.exports=r},function(e,t,n){var r=n(37),o=n(18);e.exports=function(e){for(var t=o(e),n=t.length;n--;){var a=t[n],i=e[a];t[n]=[a,i,r(i)]}return t}},function(e,t,n){var r=n(30),o=n(115),a=n(121),i=n(21),c=n(37),s=n(38),u=n(13);e.exports=function(e,t){return i(e)&&c(t)?s(u(e),t):function(n){var i=o(n,e);return void 0===i&&i===t?a(n,e):r(t,i,3)}}},function(e,t,n){var r=n(39);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},function(e,t,n){var r=n(117),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,i=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,n,r,o){t.push(r?o.replace(a,"$1"):n||e)})),t}));e.exports=i},function(e,t,n){var r=n(118);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},function(e,t,n){var r=n(17);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i)||a,i};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},function(e,t,n){var r=n(120);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){var r=n(10),o=n(24),a=n(2),i=n(22),c=r?r.prototype:void 0,s=c?c.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(a(t))return o(t,e)+"";if(i(t))return s?s.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},function(e,t,n){var r=n(122),o=n(123);e.exports=function(e,t){return null!=e&&o(e,t,r)}},function(e,t){e.exports=function(e,t){return null!=e&&t in Object(e)}},function(e,t,n){var r=n(40),o=n(32),a=n(2),i=n(35),c=n(19),s=n(13);e.exports=function(e,t,n){for(var u=-1,l=(t=r(t,e)).length,f=!1;++u<l;){var p=s(t[u]);if(!(f=null!=e&&n(e,p)))break;e=e[p]}return f||++u!=l?f:!!(l=null==e?0:e.length)&&c(l)&&i(p,l)&&(a(e)||o(e))}},function(e,t){e.exports=function(e){return e}},function(e,t,n){var r=n(126),o=n(127),a=n(21),i=n(13);e.exports=function(e){return a(e)?r(i(e)):o(e)}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,n){var r=n(39);e.exports=function(e){return function(t){return r(t,e)}}},function(e,t,n){var r=n(129),o=n(20);e.exports=function(e,t){var n=-1,a=o(e)?Array(e.length):[];return r(e,(function(e,r,o){a[++n]=t(e,r,o)})),a}},function(e,t,n){var r=n(130),o=n(133)(r);e.exports=o},function(e,t,n){var r=n(131),o=n(18);e.exports=function(e,t){return e&&r(e,t,o)}},function(e,t,n){var r=n(132)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),c=i.length;c--;){var s=i[e?c:++o];if(!1===n(a[s],s,a))break}return t}}},function(e,t,n){var r=n(20);e.exports=function(e,t){return function(n,o){if(null==n)return n;if(!r(n))return e(n,o);for(var a=n.length,i=t?a:-1,c=Object(n);(t?i--:++i<a)&&!1!==o(c[i],i,c););return n}}},function(e,t){!function(){e.exports=this.React}()},function(e,t,n){e.exports=n(136)()},function(e,t,n){"use strict";var r=n(137);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){!function(){e.exports=this.ReactDOM}()},function(e,t,n){var r,o;void 0===(o="function"==typeof(r=function(){function e(e,t){return function(n,r,o,a){n[e]?n[e](r,o,a):n[t]&&n[t]("on"+r,o)}}return{add:e("addEventListener","attachEvent"),remove:e("removeEventListener","detachEvent")}})?r.call(t,n,t,e):r)||(e.exports=o)},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,i=parseInt,c="object"==typeof t&&t&&t.Object===Object&&t,s="object"==typeof self&&self&&self.Object===Object&&self,u=c||s||Function("return this")(),l=Object.prototype.toString,f=Math.max,p=Math.min,d=function(){return u.Date.now()};function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==l.call(e)}(e))return NaN;if(v(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=v(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var c=o.test(e);return c||a.test(e)?i(e.slice(2),c?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r,o,a,i,c,s,u=0,l=!1,b=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,a=o;return r=o=void 0,u=t,i=e.apply(a,n)}function g(e){return u=e,c=setTimeout(_,t),l?y(e):i}function j(e){var n=e-s;return void 0===s||n>=t||n<0||b&&e-u>=a}function _(){var e=d();if(j(e))return x(e);c=setTimeout(_,function(e){var n=t-(e-s);return b?p(n,a-(e-u)):n}(e))}function x(e){return c=void 0,h&&r?y(e):(r=o=void 0,i)}function O(){var e=d(),n=j(e);if(r=arguments,o=this,s=e,n){if(void 0===c)return g(s);if(b)return c=setTimeout(_,t),y(s)}return void 0===c&&(c=setTimeout(_,t)),i}return t=m(t)||0,v(n)&&(l=!!n.leading,a=(b="maxWait"in n)?f(m(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h),O.cancel=function(){void 0!==c&&clearTimeout(c),u=0,r=s=o=c=void 0},O.flush=function(){return void 0===c?i:x(d())},O}}).call(this,n(15))},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,i=parseInt,c="object"==typeof t&&t&&t.Object===Object&&t,s="object"==typeof self&&self&&self.Object===Object&&self,u=c||s||Function("return this")(),l=Object.prototype.toString,f=Math.max,p=Math.min,d=function(){return u.Date.now()};function v(e,t,n){var r,o,a,i,c,s,u=0,l=!1,v=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,a=o;return r=o=void 0,u=t,i=e.apply(a,n)}function g(e){return u=e,c=setTimeout(_,t),l?y(e):i}function j(e){var n=e-s;return void 0===s||n>=t||n<0||v&&e-u>=a}function _(){var e=d();if(j(e))return x(e);c=setTimeout(_,function(e){var n=t-(e-s);return v?p(n,a-(e-u)):n}(e))}function x(e){return c=void 0,h&&r?y(e):(r=o=void 0,i)}function O(){var e=d(),n=j(e);if(r=arguments,o=this,s=e,n){if(void 0===c)return g(s);if(v)return c=setTimeout(_,t),y(s)}return void 0===c&&(c=setTimeout(_,t)),i}return t=b(t)||0,m(n)&&(l=!!n.leading,a=(v="maxWait"in n)?f(b(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h),O.cancel=function(){void 0!==c&&clearTimeout(c),u=0,r=s=o=c=void 0},O.flush=function(){return void 0===c?i:x(d())},O}function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function b(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==l.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var c=o.test(e);return c||a.test(e)?i(e.slice(2),c?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return m(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),v(e,t,{leading:r,maxWait:t,trailing:o})}}).call(this,n(15))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return"undefined"!=typeof getComputedStyle?getComputedStyle(e,null).getPropertyValue(t):e.style[t]},o=function(e){return r(e,"overflow")+r(e,"overflow-y")+r(e,"overflow-x")};t.default=function(e){if(!(e instanceof HTMLElement))return window;for(var t=e;t&&t!==document.body&&t!==document.documentElement&&t.parentNode;){if(/(scroll|auto)/.test(o(t)))return t;t=t.parentNode}return window}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n,r){if(function(e){return null===e.offsetParent}(t))return!1;var o=void 0,i=void 0,c=void 0,s=void 0;if(void 0===n||n===window)o=window.pageYOffset,c=window.pageXOffset,i=o+window.innerHeight,s=c+window.innerWidth;else{if(!e(n,window,r))return!1;var u=(0,a.default)(n);o=u.top,c=u.left,i=o+n.offsetHeight,s=c+n.offsetWidth}var l=(0,a.default)(t);return o<=l.top+t.offsetHeight+r.top&&i>=l.top-r.bottom&&c<=l.left+t.offsetWidth+r.left&&s>=l.left-r.right};var r,o=n(144),a=(r=o)&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}}}]);
|
1 |
+
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=46)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t,n){var r=n(28),o="object"==typeof self&&self&&self.Object===Object&&self,a=r||o||Function("return this")();e.exports=a},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r=n(24),o=n(49),a=n(128),i=n(2);e.exports=function(e,t){return(i(e)?r:a)(e,o(t,3))}},function(e,t,n){var r=n(62),o=n(67);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t,n){var r=n(10),o=n(63),a=n(64),i=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?o(e):a(e)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){var r=n(52),o=n(53),a=n(54),i=n(55),c=n(56);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=a,s.prototype.has=i,s.prototype.set=c,e.exports=s},function(e,t,n){var r=n(26);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(1).Symbol;e.exports=r},function(e,t,n){var r=n(4)(Object,"create");e.exports=r},function(e,t,n){var r=n(76);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){var r=n(22);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},function(e,t,n){var r=n(4)(n(1),"Map");e.exports=r},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r=n(68),o=n(75),a=n(77),i=n(78),c=n(79);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=a,s.prototype.has=i,s.prototype.set=c,e.exports=s},function(e,t,n){var r=n(97),o=n(104),a=n(20);e.exports=function(e){return a(e)?r(e):o(e)}},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t,n){var r=n(27),o=n(19);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t,n){var r=n(2),o=n(22),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||(i.test(e)||!a.test(e)||null!=t&&e in Object(t))}},function(e,t,n){var r=n(5),o=n(6);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}},function(e,t,n){var r=n(8),o=n(57),a=n(58),i=n(59),c=n(60),s=n(61);function u(e){var t=this.__data__=new r(e);this.size=t.size}u.prototype.clear=o,u.prototype.delete=a,u.prototype.get=i,u.prototype.has=c,u.prototype.set=s,e.exports=u},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(5),o=n(16);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(15))},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){var r=n(80),o=n(6);e.exports=function e(t,n,a,i,c){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!=t&&n!=n:r(t,n,a,i,e,c))}},function(e,t,n){var r=n(81),o=n(84),a=n(85);e.exports=function(e,t,n,i,c,s){var u=1&n,l=e.length,f=t.length;if(l!=f&&!(u&&f>l))return!1;var p=s.get(e);if(p&&s.get(t))return p==t;var d=-1,m=!0,v=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++d<l;){var b=e[d],h=t[d];if(i)var y=u?i(h,b,d,t,e,s):i(b,h,d,e,t,s);if(void 0!==y){if(y)continue;m=!1;break}if(v){if(!o(t,(function(e,t){if(!a(v,t)&&(b===e||c(b,e,n,i,s)))return v.push(t)}))){m=!1;break}}else if(b!==h&&!c(b,h,n,i,s)){m=!1;break}}return s.delete(e),s.delete(t),m}},function(e,t,n){var r=n(99),o=n(6),a=Object.prototype,i=a.hasOwnProperty,c=a.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(e){return o(e)&&i.call(e,"callee")&&!c.call(e,"callee")};e.exports=s},function(e,t,n){(function(e){var r=n(1),o=n(100),a=t&&!t.nodeType&&t,i=a&&"object"==typeof e&&e&&!e.nodeType&&e,c=i&&i.exports===a?r.Buffer:void 0,s=(c?c.isBuffer:void 0)||o;e.exports=s}).call(this,n(34)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t,n){var r=n(101),o=n(102),a=n(103),i=a&&a.isTypedArray,c=i?o(i):r;e.exports=c},function(e,t,n){var r=n(16);e.exports=function(e){return e==e&&!r(e)}},function(e,t){e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},function(e,t,n){var r=n(40),o=n(13);e.exports=function(e,t){for(var n=0,a=(t=r(t,e)).length;null!=e&&n<a;)e=e[o(t[n++])];return n&&n==a?e:void 0}},function(e,t,n){var r=n(2),o=n(21),a=n(116),i=n(119);e.exports=function(e,t){return r(e)?e:o(e,t)?[e]:a(i(e))}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(47);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){var r=n(48),o=n(7);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(134),a=d(o),i=d(n(135)),c=n(138),s=n(139),u=d(n(140)),l=d(n(141)),f=d(n(142)),p=d(n(143));function d(e){return e&&e.__esModule?e:{default:e}}var m=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.lazyLoadHandler=n.lazyLoadHandler.bind(n),e.throttle>0&&(e.debounce?n.lazyLoadHandler=(0,u.default)(n.lazyLoadHandler,e.throttle):n.lazyLoadHandler=(0,l.default)(n.lazyLoadHandler,e.throttle)),n.state={visible:!1},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"componentDidMount",value:function(){this._mounted=!0;var e=this.getEventNode();this.lazyLoadHandler(),this.lazyLoadHandler.flush&&this.lazyLoadHandler.flush(),(0,s.add)(window,"resize",this.lazyLoadHandler),(0,s.add)(e,"scroll",this.lazyLoadHandler),e!==window&&(0,s.add)(window,"scroll",this.lazyLoadHandler)}},{key:"componentWillReceiveProps",value:function(){this.state.visible||this.lazyLoadHandler()}},{key:"shouldComponentUpdate",value:function(e,t){return t.visible}},{key:"componentWillUnmount",value:function(){this._mounted=!1,this.lazyLoadHandler.cancel&&this.lazyLoadHandler.cancel(),this.detachListeners()}},{key:"getEventNode",value:function(){return(0,f.default)((0,c.findDOMNode)(this))}},{key:"getOffset",value:function(){var e=this.props,t=e.offset,n=e.offsetVertical,r=e.offsetHorizontal,o=e.offsetTop,a=e.offsetBottom,i=e.offsetLeft,c=e.offsetRight,s=e.threshold||t,u=n||s,l=r||s;return{top:o||u,bottom:a||u,left:i||l,right:c||l}}},{key:"lazyLoadHandler",value:function(){if(this._mounted){var e=this.getOffset(),t=(0,c.findDOMNode)(this),n=this.getEventNode();if((0,p.default)(t,n,e)){var r=this.props.onContentVisible;this.setState({visible:!0},(function(){r&&r()})),this.detachListeners()}}}},{key:"detachListeners",value:function(){var e=this.getEventNode();(0,s.remove)(window,"resize",this.lazyLoadHandler),(0,s.remove)(e,"scroll",this.lazyLoadHandler),e!==window&&(0,s.remove)(window,"scroll",this.lazyLoadHandler)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.height,i=e.width,c=this.state.visible,s={height:r,width:i},u="LazyLoad"+(c?" is-visible":"")+(n?" "+n:"");return a.default.createElement(this.props.elementType,{className:u,style:s},c&&o.Children.only(t))}}]),t}(o.Component);t.default=m,m.propTypes={children:i.default.node.isRequired,className:i.default.string,debounce:i.default.bool,elementType:i.default.string,height:i.default.oneOfType([i.default.string,i.default.number]),offset:i.default.number,offsetBottom:i.default.number,offsetHorizontal:i.default.number,offsetLeft:i.default.number,offsetRight:i.default.number,offsetTop:i.default.number,offsetVertical:i.default.number,threshold:i.default.number,throttle:i.default.number,width:i.default.oneOfType([i.default.string,i.default.number]),onContentVisible:i.default.func},m.defaultProps={elementType:"div",debounce:!0,offset:0,offsetBottom:0,offsetHorizontal:0,offsetLeft:0,offsetRight:0,offsetTop:0,offsetVertical:0,throttle:250}},function(e,t,n){"use strict";n.r(t);var r=n(41),o=n.n(r),a=n(42),i=n.n(a),c=n(7),s=n.n(c),u=n(43),l=n.n(u),f=n(44),p=n.n(f),d=n(23),m=n.n(d),v=n(0),b=n(3),h=n.n(b),y=n(45),g=n.n(y);function j(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m()(e);if(t){var o=m()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p()(this,n)}}var _=wp.i18n,x=_.__,O=(_.sprintf,wp.element),w=O.Fragment,k=O.Component,E=O.render,P=wp.components,S=P.Modal,N=P.Spinner,T=P.ButtonGroup,z=P.Button,A=P.ExternalLink,M=wp.apiFetch,L=function(e){l()(n,e);var t=j(n);function n(){var e;return o()(this,n),(e=t.apply(this,arguments)).runAjax=e.runAjax.bind(s()(e)),e.runPluginInstall=e.runPluginInstall.bind(s()(e)),e.focusMode=e.focusMode.bind(s()(e)),e.state={category:"all",activeTemplate:"",colorPalette:"",search:null,isFetching:!1,isImporting:!1,progress:"",focusMode:!1,finished:!1,templates:kadenceStarterParams.templates?kadenceStarterParams.templates:[],palettes:kadenceStarterParams.palettes?kadenceStarterParams.palettes:[]},M.setFetchHandler((function(e){var t=e.url,n=e.path,r=e.data,o=e.method;return axios({url:t||n,method:o,data:r})})),e}return i()(n,[{key:"capitalizeFirstLetter",value:function(e){return e.charAt(0).toUpperCase()+e.slice(1)}},{key:"focusMode",value:function(e){this.setState({activeTemplate:e,focusMode:!0})}},{key:"runPluginInstall",value:function(e){this.setState({progress:"plugins",isFetching:!0});var t=new FormData;t.append("action","kadence_import_install_plugins"),t.append("security",kadenceStarterParams.ajax_nonce),t.append("selected",e),this.runAjax(t)}},{key:"runAjax",value:function(e){var t=this;jQuery.ajax({method:"POST",url:kadenceStarterParams.ajax_url,data:e,contentType:!1,processData:!1}).done((function(n,r,o){if(void 0!==n.status&&"newAJAX"===n.status)t.state.progress="contentNew",t.runAjax(e);else if(void 0!==n.status&&"customizerAJAX"===n.status){t.setState({progress:"customizer"}),(a=new FormData).append("action","kadence_import_customizer_data"),a.append("security",kadenceStarterParams.ajax_nonce),a.append("wp_customize","on"),t.runAjax(a)}else if(void 0!==n.status&&"afterAllImportAJAX"===n.status){t.setState({progress:"widgets"}),(a=new FormData).append("action","kadence_after_import_data"),a.append("security",kadenceStarterParams.ajax_nonce),t.runAjax(a)}else if(void 0!==n.status&&"pluginSuccess"===n.status){var a;t.setState({progress:"content"}),(a=new FormData).append("action","kadence_import_demo_data"),a.append("security",kadenceStarterParams.ajax_nonce),a.append("selected",t.state.activeTemplate),a.append("palette",t.state.colorPalette),t.runAjax(a)}else void 0!==n.message?(jQuery(".kadence_starter_templates_finished").append("<p>"+n.message+"</p>"),t.setState({finished:!0,isFetching:!1,activeTemplate:"",focusMode:!1,isImporting:!1,progress:""})):(jQuery(".kadence_starter_templates_error").append('<div class="notice kadence_starter_templates_response notice-error"><p>'+n+"</p></div>"),t.setState({finished:!0,isFetching:!1,activeTemplate:"",focusMode:!1,isImporting:!1,progress:""}))})).fail((function(e){jQuery(".kadence_starter_templates_error").append('<div class="notice kadence_starter_templates_response notice-error"><p>Error: '+e.statusText+" ("+e.status+")</p></div>"),t.setState({finished:!0,isFetching:!1,activeTemplate:"",focusMode:!1,isImporting:!1,progress:""})}))}},{key:"render",value:function(){for(var e=this,t=["all"],n=0;n<this.state.templates.length;n++)for(var r=0;r<this.state.templates[n].categories.length;r++)t.includes(this.state.templates[n].categories[r])||t.push(this.state.templates[n].categories[r]);t.map((function(t){return{value:t,label:e.capitalizeFirstLetter(t)}}));var o=function(){var t=e.state.templates.filter((function(t){return t.key===e.state.activeTemplate}))[0],n=!0,r=!1,o=e.state.colorPalette?t.url+"?previewcolor="+e.state.colorPalette:t.url;return Object(v.createElement)("div",{className:"kadence-starter-templates-preview theme-install-overlay wp-full-overlay expanded",style:{display:"block"}},Object(v.createElement)("div",{className:"wp-full-overlay-sidebar"},Object(v.createElement)("div",{className:"wp-full-overlay-header"},Object(v.createElement)("button",{className:"kst-close-focus-btn close-full-overlay",onClick:function(){return e.setState({activeTemplate:"",colorPalette:"",focusMode:!1})}})),Object(v.createElement)("div",{className:"wp-full-overlay-sidebar-content"},Object(v.createElement)("div",{className:"install-theme-info"},Object(v.createElement)("h3",{className:"theme-name"},t.name),Object(v.createElement)("div",{className:"theme-by"},t.categories.map((function(t){return e.capitalizeFirstLetter(t)})).join(", ")),Object(v.createElement)("img",{className:"theme-screenshot",src:t.image,alt:t.name}),Object(v.createElement)("div",{className:"palette-title-wrap"},Object(v.createElement)("h2",{className:"palette-title"},x("Optional: Choose Color Scheme","kadence-starter-templates")),Object(v.createElement)(z,{label:x("clear"),className:"kst-clear-palette",disabled:!e.state.colorPalette,icon:"image-rotate",iconSize:10,onClick:function(){return e.setState({colorPalette:""})}})),Object(v.createElement)(T,{className:"kst-palette-group","aria-label":x("Select a Palette","kadence-starter-templates")},h()(e.state.palettes,(function(t){var n=t.palette,r=t.colors;return Object(v.createElement)(z,{className:"kst-palette-btn",isPrimary:n===e.state.colorPalette,"aria-pressed":n===e.state.colorPalette,onClick:function(){return e.setState({colorPalette:n})}},h()(r,(function(e,t){return Object(v.createElement)("div",{key:t,style:{width:30,height:30,marginBottom:0,marginRight:"3px",transform:"scale(1)",transition:"100ms transform ease"},className:"kadence-swatche-item-wrap"},Object(v.createElement)("span",{className:"kadence-swatch-item",style:{height:"100%",display:"block",width:"100%",border:"1px solid rgb(218, 218, 218)",borderRadius:"50%",color:"".concat(e),boxShadow:"inset 0 0 0 ".concat(15,"px"),transition:"100ms box-shadow ease"}}))})))}))),Object(v.createElement)("p",{className:"desc-small"},x("*You can change this after import.","kadence-starter-templates"))),Object(v.createElement)("div",{className:"kadence-starter-required-plugins"},Object(v.createElement)("h3",null,x("Required Plugins","kadence-starter-templates")),Object(v.createElement)("ul",{className:"kadence-required-wrap"},h()(t.plugins,(function(e){var t=e.state,o=e.title,a=e.src;return"active"!==t&&(n=!1,"thirdparty"===a&&(r=!0)),Object(v.createElement)("li",{className:"plugin-required"},o," - ",Object(v.createElement)("span",{class:"plugin-status"},"notactive"===t?x("Not Installed","kadence-starter-templates"):t))}))),!n&&Object(v.createElement)(w,null,r&&Object(v.createElement)("p",{className:"desc-small"},x("*Install Missing/Inactive Premium plugins to import.","kadence-starter-templates")),!r&&Object(v.createElement)("p",{className:"desc-small"},x("*Missing/Inactive plugins will be installed on import.","kadence-starter-templates"))))),Object(v.createElement)("div",{class:"wp-full-overlay-footer"},Object(v.createElement)("div",{class:"kadence-starter-templates-preview-actions"},Object(v.createElement)("button",{className:"kst-import-btn button-hero button button-primary",isDisabled:void 0!==t.pro&&t.pro&&"true"!==kadenceStarterParams.pro,onClick:function(){return e.setState({isImporting:!0})}},x("Import","kadence-starter-templates"))))),Object(v.createElement)("div",{class:"wp-full-overlay-main"},Object(v.createElement)("iframe",{id:"kadence-starter-preview",src:o})))},a=function(){var t=e.state.templates.filter((function(t){return t.key===e.state.activeTemplate}))[0],n=!1;return Object(v.createElement)(w,null,Object(v.createElement)("div",{className:"kst-grid-single-item"},Object(v.createElement)("div",{className:"kst-template-item"},Object(v.createElement)("div",{className:"kst-import-btn"},Object(v.createElement)("img",{src:t.image,alt:t.name}),Object(v.createElement)("div",{className:"demo-title"},Object(v.createElement)("h4",null,t.name))))),Object(v.createElement)(S,{className:"kst-import-modal",title:x("Import Starter Template"),onRequestClose:function(){return!e.state.isFetching&&e.setState({activeTemplate:"",colorPalette:"",focusMode:!1,isImporting:!1,progress:""})}},kadenceStarterParams.has_content&&Object(v.createElement)("div",{className:"kadence_starter_templates_notice"},kadenceStarterParams.notice),Object(v.createElement)("h3",null,x("Starter Template Plugins","kadence-starter-templates")),h()(t.plugins,(function(e){var t=e.state,r=(e.title,e.src);"active"!==t&&"thirdparty"===r&&(n=!0)})),n&&Object(v.createElement)("p",{className:"desc-small install-third-party-notice"},x("*This starter template requires premium third-party plugins. Please install missing/inactive premium plugins to import.","kadence-starter-templates")),Object(v.createElement)("ul",{className:"kadence-required-wrap"},h()(t.plugins,(function(e){var t=e.state,n=e.title,r=e.src;return Object(v.createElement)("li",{className:"plugin-required"},n," ","active"!==t&&"thirdparty"===r?Object(v.createElement)("span",{class:"plugin-install-required"},x("Please install and activate this third-party premium Plugin")):"")}))),e.state.colorPalette&&Object(v.createElement)(w,null,Object(v.createElement)("h3",null,x("Selected Color Palette","kadence-starter-templates")),h()(e.state.palettes,(function(t){var n=t.palette,r=t.colors;if(n===e.state.colorPalette)return Object(v.createElement)("div",{className:"kst-palette-btn kst-selected-color-palette"},h()(r,(function(e,t){return Object(v.createElement)("div",{key:t,style:{width:22,height:22,marginBottom:0,marginRight:"3px",transform:"scale(1)",transition:"100ms transform ease"},className:"kadence-swatche-item-wrap"},Object(v.createElement)("span",{className:"kadence-swatch-item",style:{height:"100%",display:"block",width:"100%",border:"1px solid rgb(218, 218, 218)",borderRadius:"50%",color:"".concat(e),boxShadow:"inset 0 0 0 ".concat(15,"px"),transition:"100ms box-shadow ease"}}))})))}))),"plugins"===e.state.progress&&Object(v.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.plugin_progress),"content"===e.state.progress&&Object(v.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.content_progress),"contentNew"===e.state.progress&&Object(v.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.content_new_progress),"customizer"===e.state.progress&&Object(v.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.customizer_progress),"widgets"===e.state.progress&&Object(v.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.widgets_progress),e.state.isFetching&&Object(v.createElement)(N,null),!kadenceStarterParams.isKadence&&Object(v.createElement)("div",{class:"kadence_starter_templates_response"},Object(v.createElement)("h2",null,x("This Starter Template Requires the Kadence Theme","kadence-starter-templates")),Object(v.createElement)(A,{href:"https://kadence-theme.com/"},x("Get Free Theme","kadence-blocks"))),kadenceStarterParams.isKadence&&Object(v.createElement)(w,null,n&&Object(v.createElement)(z,{className:"kt-defaults-save",isPrimary:!0,disabled:e.state.isFetching,onClick:function(){e.runPluginInstall(t.key)}},x("Skip and Import with Partial Content")),!n&&Object(v.createElement)(z,{className:"kt-defaults-save",isPrimary:!0,disabled:e.state.isFetching,onClick:function(){e.runPluginInstall(t.key)}},x("Start Importing")))))},i=function(){return Object(v.createElement)("div",{className:"templates-grid"},h()(e.state.templates,(function(t){var n=t.name,r=t.key,o=t.image,a=(t.content,t.categories),i=t.keywords,c=t.pro;if(("all"===e.state.category||a.includes(e.state.category))&&(!e.state.search||i&&i.some((function(t){return t.toLowerCase().includes(e.state.search.toLowerCase())}))))return Object(v.createElement)("div",{className:"kst-template-item"},Object(v.createElement)(z,{key:r,className:"kst-import-btn",isSmall:!0,isDisabled:void 0!==c&&c&&"true"!==kadenceStarterParams.pro,onClick:function(){return e.focusMode(r)}},Object(v.createElement)(g.a,null,Object(v.createElement)("img",{src:o,alt:n})),Object(v.createElement)("div",{className:"demo-title"},Object(v.createElement)("h4",null,n))),void 0!==c&&c&&Object(v.createElement)(w,null,Object(v.createElement)("span",{className:"kb-pro-template"},x("Pro","kadence-blocks")),"true"!==kadenceStarterParams.pro&&Object(v.createElement)("div",{className:"kt-popover-pro-notice"},Object(v.createElement)("h2",null,x("Kadence Pro required for this item","kadence-starter-sites")," "),Object(v.createElement)(A,{href:"https://www.kadencewp.com/pro/"},x("Upgrade to Pro","kadence-blocks")))))})))};return Object(v.createElement)(w,null,Object(v.createElement)((function(){return Object(v.createElement)("div",{className:"main-panel"},e.state.focusMode&&Object(v.createElement)(w,null,e.state.isImporting&&Object(v.createElement)(a,null),!e.state.isImporting&&Object(v.createElement)(o,null)),!e.state.focusMode&&!e.state.finished&&Object(v.createElement)(i,null))}),null))}}]),n}(k);wp.domReady((function(){E(Object(v.createElement)(L,null),document.querySelector(".kadence_starter_dashboard_main"))}))},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){var r=n(50),o=n(114),a=n(124),i=n(2),c=n(125);e.exports=function(e){return"function"==typeof e?e:null==e?a:"object"==typeof e?i(e)?o(e[0],e[1]):r(e):c(e)}},function(e,t,n){var r=n(51),o=n(113),a=n(38);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?a(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},function(e,t,n){var r=n(25),o=n(30);e.exports=function(e,t,n,a){var i=n.length,c=i,s=!a;if(null==e)return!c;for(e=Object(e);i--;){var u=n[i];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i<c;){var l=(u=n[i])[0],f=e[l],p=u[1];if(s&&u[2]){if(void 0===f&&!(l in e))return!1}else{var d=new r;if(a)var m=a(f,p,l,e,t,d);if(!(void 0===m?o(p,f,3,a,d):m))return!1}}return!0}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(9),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():o.call(t,n,1),--this.size,!0)}},function(e,t,n){var r=n(9);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(9);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(9);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(8);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(8),o=n(14),a=n(17);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(27),o=n(65),a=n(16),i=n(29),c=/^\[object .+?Constructor\]$/,s=Function.prototype,u=Object.prototype,l=s.toString,f=u.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?p:c).test(i(e))}},function(e,t,n){var r=n(10),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,c=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,c),n=e[c];try{e[c]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[c]=n:delete e[c]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r,o=n(66),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(1)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(69),o=n(8),a=n(14);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),string:new r}}},function(e,t,n){var r=n(70),o=n(71),a=n(72),i=n(73),c=n(74);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=a,s.prototype.has=i,s.prototype.set=c,e.exports=s},function(e,t,n){var r=n(11);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var r=n(11),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(11),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},function(e,t,n){var r=n(11);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,n){var r=n(12);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(12);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(12);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(12);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},function(e,t,n){var r=n(25),o=n(31),a=n(86),i=n(90),c=n(108),s=n(2),u=n(33),l=n(36),f="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,d,m,v){var b=s(e),h=s(t),y=b?"[object Array]":c(e),g=h?"[object Array]":c(t),j=(y="[object Arguments]"==y?f:y)==f,_=(g="[object Arguments]"==g?f:g)==f,x=y==g;if(x&&u(e)){if(!u(t))return!1;b=!0,j=!1}if(x&&!j)return v||(v=new r),b||l(e)?o(e,t,n,d,m,v):a(e,t,y,n,d,m,v);if(!(1&n)){var O=j&&p.call(e,"__wrapped__"),w=_&&p.call(t,"__wrapped__");if(O||w){var k=O?e.value():e,E=w?t.value():t;return v||(v=new r),m(k,E,n,d,v)}}return!!x&&(v||(v=new r),i(e,t,n,d,m,v))}},function(e,t,n){var r=n(17),o=n(82),a=n(83);function i(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}i.prototype.add=i.prototype.push=o,i.prototype.has=a,e.exports=i},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,n){var r=n(10),o=n(87),a=n(26),i=n(31),c=n(88),s=n(89),u=r?r.prototype:void 0,l=u?u.valueOf:void 0;e.exports=function(e,t,n,r,u,f,p){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return a(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var d=c;case"[object Set]":var m=1&r;if(d||(d=s),e.size!=t.size&&!m)return!1;var v=p.get(e);if(v)return v==t;r|=2,p.set(e,t);var b=i(d(e),d(t),r,u,f,p);return p.delete(e),b;case"[object Symbol]":if(l)return l.call(e)==l.call(t)}return!1}},function(e,t,n){var r=n(1).Uint8Array;e.exports=r},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},function(e,t,n){var r=n(91),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,a,i,c){var s=1&n,u=r(e),l=u.length;if(l!=r(t).length&&!s)return!1;for(var f=l;f--;){var p=u[f];if(!(s?p in t:o.call(t,p)))return!1}var d=c.get(e);if(d&&c.get(t))return d==t;var m=!0;c.set(e,t),c.set(t,e);for(var v=s;++f<l;){var b=e[p=u[f]],h=t[p];if(a)var y=s?a(h,b,p,t,e,c):a(b,h,p,e,t,c);if(!(void 0===y?b===h||i(b,h,n,a,c):y)){m=!1;break}v||(v="constructor"==p)}if(m&&!v){var g=e.constructor,j=t.constructor;g==j||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof j&&j instanceof j||(m=!1)}return c.delete(e),c.delete(t),m}},function(e,t,n){var r=n(92),o=n(94),a=n(18);e.exports=function(e){return r(e,a,o)}},function(e,t,n){var r=n(93),o=n(2);e.exports=function(e,t,n){var a=t(e);return o(e)?a:r(a,n(e))}},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},function(e,t,n){var r=n(95),o=n(96),a=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols,c=i?function(e){return null==e?[]:(e=Object(e),r(i(e),(function(t){return a.call(e,t)})))}:o;e.exports=c},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(98),o=n(32),a=n(2),i=n(33),c=n(35),s=n(36),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=a(e),l=!n&&o(e),f=!n&&!l&&i(e),p=!n&&!l&&!f&&s(e),d=n||l||f||p,m=d?r(e.length,String):[],v=m.length;for(var b in e)!t&&!u.call(e,b)||d&&("length"==b||f&&("offset"==b||"parent"==b)||p&&("buffer"==b||"byteLength"==b||"byteOffset"==b)||c(b,v))||m.push(b);return m}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t,n){var r=n(5),o=n(6);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},function(e,t){e.exports=function(){return!1}},function(e,t,n){var r=n(5),o=n(19),a=n(6),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,e.exports=function(e){return a(e)&&o(e.length)&&!!i[r(e)]}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(28),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o&&r.process,c=function(){try{var e=a&&a.require&&a.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=c}).call(this,n(34)(e))},function(e,t,n){var r=n(105),o=n(106),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))a.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(107)(Object.keys,Object);e.exports=r},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(109),o=n(14),a=n(110),i=n(111),c=n(112),s=n(5),u=n(29),l=u(r),f=u(o),p=u(a),d=u(i),m=u(c),v=s;(r&&"[object DataView]"!=v(new r(new ArrayBuffer(1)))||o&&"[object Map]"!=v(new o)||a&&"[object Promise]"!=v(a.resolve())||i&&"[object Set]"!=v(new i)||c&&"[object WeakMap]"!=v(new c))&&(v=function(e){var t=s(e),n="[object Object]"==t?e.constructor:void 0,r=n?u(n):"";if(r)switch(r){case l:return"[object DataView]";case f:return"[object Map]";case p:return"[object Promise]";case d:return"[object Set]";case m:return"[object WeakMap]"}return t}),e.exports=v},function(e,t,n){var r=n(4)(n(1),"DataView");e.exports=r},function(e,t,n){var r=n(4)(n(1),"Promise");e.exports=r},function(e,t,n){var r=n(4)(n(1),"Set");e.exports=r},function(e,t,n){var r=n(4)(n(1),"WeakMap");e.exports=r},function(e,t,n){var r=n(37),o=n(18);e.exports=function(e){for(var t=o(e),n=t.length;n--;){var a=t[n],i=e[a];t[n]=[a,i,r(i)]}return t}},function(e,t,n){var r=n(30),o=n(115),a=n(121),i=n(21),c=n(37),s=n(38),u=n(13);e.exports=function(e,t){return i(e)&&c(t)?s(u(e),t):function(n){var i=o(n,e);return void 0===i&&i===t?a(n,e):r(t,i,3)}}},function(e,t,n){var r=n(39);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},function(e,t,n){var r=n(117),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,i=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,n,r,o){t.push(r?o.replace(a,"$1"):n||e)})),t}));e.exports=i},function(e,t,n){var r=n(118);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},function(e,t,n){var r=n(17);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i)||a,i};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},function(e,t,n){var r=n(120);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){var r=n(10),o=n(24),a=n(2),i=n(22),c=r?r.prototype:void 0,s=c?c.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(a(t))return o(t,e)+"";if(i(t))return s?s.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},function(e,t,n){var r=n(122),o=n(123);e.exports=function(e,t){return null!=e&&o(e,t,r)}},function(e,t){e.exports=function(e,t){return null!=e&&t in Object(e)}},function(e,t,n){var r=n(40),o=n(32),a=n(2),i=n(35),c=n(19),s=n(13);e.exports=function(e,t,n){for(var u=-1,l=(t=r(t,e)).length,f=!1;++u<l;){var p=s(t[u]);if(!(f=null!=e&&n(e,p)))break;e=e[p]}return f||++u!=l?f:!!(l=null==e?0:e.length)&&c(l)&&i(p,l)&&(a(e)||o(e))}},function(e,t){e.exports=function(e){return e}},function(e,t,n){var r=n(126),o=n(127),a=n(21),i=n(13);e.exports=function(e){return a(e)?r(i(e)):o(e)}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,n){var r=n(39);e.exports=function(e){return function(t){return r(t,e)}}},function(e,t,n){var r=n(129),o=n(20);e.exports=function(e,t){var n=-1,a=o(e)?Array(e.length):[];return r(e,(function(e,r,o){a[++n]=t(e,r,o)})),a}},function(e,t,n){var r=n(130),o=n(133)(r);e.exports=o},function(e,t,n){var r=n(131),o=n(18);e.exports=function(e,t){return e&&r(e,t,o)}},function(e,t,n){var r=n(132)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),c=i.length;c--;){var s=i[e?c:++o];if(!1===n(a[s],s,a))break}return t}}},function(e,t,n){var r=n(20);e.exports=function(e,t){return function(n,o){if(null==n)return n;if(!r(n))return e(n,o);for(var a=n.length,i=t?a:-1,c=Object(n);(t?i--:++i<a)&&!1!==o(c[i],i,c););return n}}},function(e,t){!function(){e.exports=this.React}()},function(e,t,n){e.exports=n(136)()},function(e,t,n){"use strict";var r=n(137);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){!function(){e.exports=this.ReactDOM}()},function(e,t,n){var r,o;void 0===(o="function"==typeof(r=function(){function e(e,t){return function(n,r,o,a){n[e]?n[e](r,o,a):n[t]&&n[t]("on"+r,o)}}return{add:e("addEventListener","attachEvent"),remove:e("removeEventListener","detachEvent")}})?r.call(t,n,t,e):r)||(e.exports=o)},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,i=parseInt,c="object"==typeof t&&t&&t.Object===Object&&t,s="object"==typeof self&&self&&self.Object===Object&&self,u=c||s||Function("return this")(),l=Object.prototype.toString,f=Math.max,p=Math.min,d=function(){return u.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==l.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var c=o.test(e);return c||a.test(e)?i(e.slice(2),c?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r,o,a,i,c,s,u=0,l=!1,b=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,a=o;return r=o=void 0,u=t,i=e.apply(a,n)}function g(e){return u=e,c=setTimeout(_,t),l?y(e):i}function j(e){var n=e-s;return void 0===s||n>=t||n<0||b&&e-u>=a}function _(){var e=d();if(j(e))return x(e);c=setTimeout(_,function(e){var n=t-(e-s);return b?p(n,a-(e-u)):n}(e))}function x(e){return c=void 0,h&&r?y(e):(r=o=void 0,i)}function O(){var e=d(),n=j(e);if(r=arguments,o=this,s=e,n){if(void 0===c)return g(s);if(b)return c=setTimeout(_,t),y(s)}return void 0===c&&(c=setTimeout(_,t)),i}return t=v(t)||0,m(n)&&(l=!!n.leading,a=(b="maxWait"in n)?f(v(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h),O.cancel=function(){void 0!==c&&clearTimeout(c),u=0,r=s=o=c=void 0},O.flush=function(){return void 0===c?i:x(d())},O}}).call(this,n(15))},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,i=parseInt,c="object"==typeof t&&t&&t.Object===Object&&t,s="object"==typeof self&&self&&self.Object===Object&&self,u=c||s||Function("return this")(),l=Object.prototype.toString,f=Math.max,p=Math.min,d=function(){return u.Date.now()};function m(e,t,n){var r,o,a,i,c,s,u=0,l=!1,m=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,a=o;return r=o=void 0,u=t,i=e.apply(a,n)}function g(e){return u=e,c=setTimeout(_,t),l?y(e):i}function j(e){var n=e-s;return void 0===s||n>=t||n<0||m&&e-u>=a}function _(){var e=d();if(j(e))return x(e);c=setTimeout(_,function(e){var n=t-(e-s);return m?p(n,a-(e-u)):n}(e))}function x(e){return c=void 0,h&&r?y(e):(r=o=void 0,i)}function O(){var e=d(),n=j(e);if(r=arguments,o=this,s=e,n){if(void 0===c)return g(s);if(m)return c=setTimeout(_,t),y(s)}return void 0===c&&(c=setTimeout(_,t)),i}return t=b(t)||0,v(n)&&(l=!!n.leading,a=(m="maxWait"in n)?f(b(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h),O.cancel=function(){void 0!==c&&clearTimeout(c),u=0,r=s=o=c=void 0},O.flush=function(){return void 0===c?i:x(d())},O}function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function b(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==l.call(e)}(e))return NaN;if(v(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=v(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var c=o.test(e);return c||a.test(e)?i(e.slice(2),c?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return v(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),m(e,t,{leading:r,maxWait:t,trailing:o})}}).call(this,n(15))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return"undefined"!=typeof getComputedStyle?getComputedStyle(e,null).getPropertyValue(t):e.style[t]},o=function(e){return r(e,"overflow")+r(e,"overflow-y")+r(e,"overflow-x")};t.default=function(e){if(!(e instanceof HTMLElement))return window;for(var t=e;t&&t!==document.body&&t!==document.documentElement&&t.parentNode;){if(/(scroll|auto)/.test(o(t)))return t;t=t.parentNode}return window}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n,r){if(function(e){return null===e.offsetParent}(t))return!1;var o=void 0,i=void 0,c=void 0,s=void 0;if(void 0===n||n===window)o=window.pageYOffset,c=window.pageXOffset,i=o+window.innerHeight,s=c+window.innerWidth;else{if(!e(n,window,r))return!1;var u=(0,a.default)(n);o=u.top,c=u.left,i=o+n.offsetHeight,s=c+n.offsetWidth}var l=(0,a.default)(t);return o<=l.top+t.offsetHeight+r.top&&i>=l.top-r.bottom&&c<=l.left+t.offsetWidth+r.left&&s>=l.left-r.right};var r,o=n(144),a=(r=o)&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}}}]);
|
class-kadence-starter-templates.php
CHANGED
@@ -171,13 +171,11 @@ class Starter_Templates {
|
|
171 |
update_option( 'show_on_front', 'page' );
|
172 |
update_option( 'page_on_front', $homepage->ID ); // Front Page.
|
173 |
}
|
174 |
-
wp_delete_post( 1 );
|
175 |
|
176 |
} elseif ( 'agency_free' === $selected_import['import_file_name'] ) {
|
177 |
|
178 |
// Assign menus to their locations.
|
179 |
$main_menu = get_term_by( 'name', 'Agency Menu', 'nav_menu' );
|
180 |
-
|
181 |
set_theme_mod(
|
182 |
'nav_menu_locations',
|
183 |
array(
|
@@ -194,7 +192,6 @@ class Starter_Templates {
|
|
194 |
$blogpage = get_page_by_title( 'Blog' );
|
195 |
update_option( 'page_for_posts', $blogpage->ID ); // Blog Page.
|
196 |
}
|
197 |
-
wp_delete_post( 1 );
|
198 |
|
199 |
} elseif ( 'food' === $selected_import['import_file_name'] ) {
|
200 |
|
@@ -218,8 +215,6 @@ class Starter_Templates {
|
|
218 |
$blogpage = get_page_by_title( 'Recipes' );
|
219 |
update_option( 'page_for_posts', $blogpage->ID ); // Blog Page.
|
220 |
}
|
221 |
-
// Remove Hello Post.
|
222 |
-
wp_delete_post( 1 );
|
223 |
|
224 |
} elseif ( 'shopping' === $selected_import['import_file_name'] ) {
|
225 |
// Assign Woo Pages.
|
@@ -246,8 +241,6 @@ class Starter_Templates {
|
|
246 |
$blogpage = get_page_by_title( 'Shop News' );
|
247 |
update_option( 'page_for_posts', $blogpage->ID ); // Blog Page.
|
248 |
}
|
249 |
-
// Remove Hello Post.
|
250 |
-
wp_delete_post( 1 );
|
251 |
|
252 |
} elseif ( 'sass' === $selected_import['import_file_name'] ) {
|
253 |
// Assign menus to their locations.
|
@@ -269,8 +262,6 @@ class Starter_Templates {
|
|
269 |
update_option( 'show_on_front', 'page' );
|
270 |
update_option( 'page_on_front', $homepage->ID ); // Front Page.
|
271 |
}
|
272 |
-
// Remove Hello Post.
|
273 |
-
wp_delete_post( 1 );
|
274 |
|
275 |
} elseif ( 'yoga' === $selected_import['import_file_name'] ) {
|
276 |
// Assign menus to their locations.
|
@@ -290,8 +281,25 @@ class Starter_Templates {
|
|
290 |
update_option( 'show_on_front', 'page' );
|
291 |
update_option( 'page_on_front', $homepage->ID ); // Front Page.
|
292 |
}
|
293 |
-
|
294 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
295 |
|
296 |
}
|
297 |
if ( $selected_palette && ! empty( $selected_palette ) ) {
|
@@ -309,6 +317,18 @@ class Starter_Templates {
|
|
309 |
$default['palette'][8]['color'] = $palette_presets[ $selected_palette ][8]['color'];
|
310 |
update_option( 'kadence_global_palette', json_encode( $default ) );
|
311 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
312 |
}
|
313 |
}
|
314 |
/**
|
@@ -344,7 +364,7 @@ class Starter_Templates {
|
|
344 |
'slug' => 'woocommerce',
|
345 |
'path' => 'woocommerce/woocommerce.php',
|
346 |
'title' => 'Woocommerce',
|
347 |
-
'
|
348 |
'state' => Plugin_Check::active_check( 'woocommerce/woocommerce.php' ),
|
349 |
);
|
350 |
$kadence_blocks = array(
|
@@ -352,7 +372,7 @@ class Starter_Templates {
|
|
352 |
'slug' => 'kadence-blocks',
|
353 |
'path' => 'kadence-blocks/kadence-blocks.php',
|
354 |
'title' => 'Kadence Blocks',
|
355 |
-
'
|
356 |
'state' => Plugin_Check::active_check( 'kadence-blocks/kadence-blocks.php' ),
|
357 |
);
|
358 |
$kadence_blocks_pro = array(
|
@@ -360,7 +380,7 @@ class Starter_Templates {
|
|
360 |
'slug' => 'kadence-blocks-pro',
|
361 |
'path' => 'kadence-blocks-pro/kadence-blocks-pro.php',
|
362 |
'title' => 'Kadence Block Pro',
|
363 |
-
'
|
364 |
'state' => Plugin_Check::active_check( 'kadence-blocks-pro/kadence-blocks-pro.php' ),
|
365 |
);
|
366 |
$wpzoom_recipe_card = array(
|
@@ -368,9 +388,17 @@ class Starter_Templates {
|
|
368 |
'slug' => 'wpzoom-recipe-card',
|
369 |
'path' => 'recipe-card-blocks-by-wpzoom/wpzoom-recipe-card.php',
|
370 |
'title' => 'Recipe Card Blocks by WPZOOM',
|
371 |
-
'
|
372 |
'state' => Plugin_Check::active_check( 'recipe-card-blocks-by-wpzoom/wpzoom-recipe-card.php' ),
|
373 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
374 |
if ( 'notactive' !== $kadence_blocks_pro['state'] ) {
|
375 |
$agency = array(
|
376 |
'import_file_name' => 'agency',
|
@@ -383,7 +411,7 @@ class Starter_Templates {
|
|
383 |
'import_notice' => '',
|
384 |
'plugins' => array(
|
385 |
$kadence_blocks,
|
386 |
-
$kadence_blocks_pro
|
387 |
),
|
388 |
);
|
389 |
} else {
|
@@ -435,7 +463,7 @@ class Starter_Templates {
|
|
435 |
'import_file_name' => 'yoga',
|
436 |
'categories' => array( 'Business' ),
|
437 |
'import_file_url' => 'https://kadence.design/importer/kadence/yoga_site/demo_content.xml',
|
438 |
-
'import_widget_file_url' => '',
|
439 |
'import_customizer_file_url' => 'https://kadence.design/importer/kadence/yoga_site/theme_options.json',
|
440 |
'preview_url' => 'https://demos.kadencewp.com/blocks-active/',
|
441 |
'import_preview_image_url' => 'https://kadence.design/importer/kadence/yoga_site/preview-image.jpg',
|
@@ -457,6 +485,20 @@ class Starter_Templates {
|
|
457 |
$kadence_blocks,
|
458 |
),
|
459 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
460 |
);
|
461 |
return $demos;
|
462 |
}
|
@@ -489,13 +531,15 @@ class Starter_Templates {
|
|
489 |
define( 'KADENCE_STARTER_TEMPLATES_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
|
490 |
}
|
491 |
if ( ! defined( 'KADENCE_STARTER_TEMPLATES_VERSION' ) ) {
|
492 |
-
define( 'KADENCE_STARTER_TEMPLATES_VERSION', '1.0.
|
493 |
}
|
494 |
}
|
495 |
/**
|
496 |
* Include all plugin files.
|
497 |
*/
|
498 |
private function include_plugin_files() {
|
|
|
|
|
499 |
require_once KADENCE_STARTER_TEMPLATES_PATH . 'inc/class-plugin-check.php';
|
500 |
require_once KADENCE_STARTER_TEMPLATES_PATH . 'inc/class-helpers.php';
|
501 |
require_once KADENCE_STARTER_TEMPLATES_PATH . 'inc/class-import-actions.php';
|
@@ -576,18 +620,27 @@ class Starter_Templates {
|
|
576 |
$woocommerce = array(
|
577 |
'title' => 'Woocommerce',
|
578 |
'state' => Plugin_Check::active_check( 'woocommerce/woocommerce.php' ),
|
|
|
579 |
);
|
580 |
$kadence_blocks = array(
|
581 |
'title' => 'Kadence Blocks',
|
582 |
'state' => Plugin_Check::active_check( 'kadence-blocks/kadence-blocks.php' ),
|
|
|
583 |
);
|
584 |
$kadence_blocks_pro = array(
|
585 |
'title' => 'Kadence Block Pro',
|
586 |
'state' => Plugin_Check::active_check( 'kadence-blocks-pro/kadence-blocks-pro.php' ),
|
|
|
587 |
);
|
588 |
$wpzoom_recipe_card = array(
|
589 |
'title' => 'Recipe Card Blocks by WPZOOM',
|
590 |
'state' => Plugin_Check::active_check( 'recipe-card-blocks-by-wpzoom/wpzoom-recipe-card.php' ),
|
|
|
|
|
|
|
|
|
|
|
|
|
591 |
);
|
592 |
if ( 'notactive' !== $kadence_blocks_pro['state'] ) {
|
593 |
$agency = array(
|
@@ -695,6 +748,23 @@ class Starter_Templates {
|
|
695 |
),
|
696 |
'image' => 'https://kadence.design/importer/kadence/sass_site/preview-image.jpg',
|
697 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
698 |
);
|
699 |
$palettes = array(
|
700 |
array(
|
@@ -782,6 +852,7 @@ class Starter_Templates {
|
|
782 |
'isKadence' => class_exists( 'Kadence\Theme' ),
|
783 |
'templates' => $templates,
|
784 |
'palettes' => $palettes,
|
|
|
785 |
'notice' => esc_html__( 'Please Note: This importer is designed for new/empty sites with no content.', 'kadence-starter-templates' ),
|
786 |
'plugin_progress' => esc_html__( 'Checking/Installing/Activating Required Plugins', 'kadence-starter-templates' ),
|
787 |
'content_progress' => esc_html__( 'Importing Demo Content...', 'kadence-starter-templates' ),
|
@@ -815,7 +886,7 @@ class Starter_Templates {
|
|
815 |
}
|
816 |
|
817 |
foreach( $info['plugins'] as $key => $plugin ) {
|
818 |
-
if ( 'notactive' === $plugin['state'] ) {
|
819 |
$api = plugins_api(
|
820 |
'plugin_information',
|
821 |
array(
|
@@ -943,6 +1014,12 @@ class Starter_Templates {
|
|
943 |
* Default actions:
|
944 |
* 1 - Before content import WP action (with priority 10).
|
945 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
946 |
do_action( 'kadence-starter-templates/before_content_import_execution', $this->selected_import_files, $this->import_files, $this->selected_index, $this->selected_palette );
|
947 |
}
|
948 |
|
171 |
update_option( 'show_on_front', 'page' );
|
172 |
update_option( 'page_on_front', $homepage->ID ); // Front Page.
|
173 |
}
|
|
|
174 |
|
175 |
} elseif ( 'agency_free' === $selected_import['import_file_name'] ) {
|
176 |
|
177 |
// Assign menus to their locations.
|
178 |
$main_menu = get_term_by( 'name', 'Agency Menu', 'nav_menu' );
|
|
|
179 |
set_theme_mod(
|
180 |
'nav_menu_locations',
|
181 |
array(
|
192 |
$blogpage = get_page_by_title( 'Blog' );
|
193 |
update_option( 'page_for_posts', $blogpage->ID ); // Blog Page.
|
194 |
}
|
|
|
195 |
|
196 |
} elseif ( 'food' === $selected_import['import_file_name'] ) {
|
197 |
|
215 |
$blogpage = get_page_by_title( 'Recipes' );
|
216 |
update_option( 'page_for_posts', $blogpage->ID ); // Blog Page.
|
217 |
}
|
|
|
|
|
218 |
|
219 |
} elseif ( 'shopping' === $selected_import['import_file_name'] ) {
|
220 |
// Assign Woo Pages.
|
241 |
$blogpage = get_page_by_title( 'Shop News' );
|
242 |
update_option( 'page_for_posts', $blogpage->ID ); // Blog Page.
|
243 |
}
|
|
|
|
|
244 |
|
245 |
} elseif ( 'sass' === $selected_import['import_file_name'] ) {
|
246 |
// Assign menus to their locations.
|
262 |
update_option( 'show_on_front', 'page' );
|
263 |
update_option( 'page_on_front', $homepage->ID ); // Front Page.
|
264 |
}
|
|
|
|
|
265 |
|
266 |
} elseif ( 'yoga' === $selected_import['import_file_name'] ) {
|
267 |
// Assign menus to their locations.
|
281 |
update_option( 'show_on_front', 'page' );
|
282 |
update_option( 'page_on_front', $homepage->ID ); // Front Page.
|
283 |
}
|
284 |
+
|
285 |
+
} elseif ( 'ldcourse' === $selected_import['import_file_name'] ) {
|
286 |
+
// Assign menus to their locations.
|
287 |
+
$main_menu = get_term_by( 'name', 'Primary Menu', 'nav_menu' );
|
288 |
+
|
289 |
+
set_theme_mod(
|
290 |
+
'nav_menu_locations',
|
291 |
+
array(
|
292 |
+
'primary' => $main_menu->term_id,
|
293 |
+
'mobile' => $main_menu->term_id,
|
294 |
+
)
|
295 |
+
);
|
296 |
+
|
297 |
+
// Assign front page.
|
298 |
+
$homepage = get_page_by_title( 'Home' );
|
299 |
+
if ( isset( $homepage ) && $homepage->ID ) {
|
300 |
+
update_option( 'show_on_front', 'page' );
|
301 |
+
update_option( 'page_on_front', $homepage->ID ); // Front Page.
|
302 |
+
}
|
303 |
|
304 |
}
|
305 |
if ( $selected_palette && ! empty( $selected_palette ) ) {
|
317 |
$default['palette'][8]['color'] = $palette_presets[ $selected_palette ][8]['color'];
|
318 |
update_option( 'kadence_global_palette', json_encode( $default ) );
|
319 |
}
|
320 |
+
} else if ( 'ldcourse' === $selected_import['import_file_name'] ) {
|
321 |
+
$default = json_decode( '{"palette":[{"color":"#3182CE","slug":"palette1","name":"Palette Color 1"},{"color":"#2B6CB0","slug":"palette2","name":"Palette Color 2"},{"color":"#1A202C","slug":"palette3","name":"Palette Color 3"},{"color":"#2D3748","slug":"palette4","name":"Palette Color 4"},{"color":"#4A5568","slug":"palette5","name":"Palette Color 5"},{"color":"#718096","slug":"palette6","name":"Palette Color 6"},{"color":"#EDF2F7","slug":"palette7","name":"Palette Color 7"},{"color":"#F7FAFC","slug":"palette8","name":"Palette Color 8"},{"color":"#ffffff","slug":"palette9","name":"Palette Color 9"}],"second-palette":[{"color":"#3182CE","slug":"palette1","name":"Palette Color 1"},{"color":"#2B6CB0","slug":"palette2","name":"Palette Color 2"},{"color":"#1A202C","slug":"palette3","name":"Palette Color 3"},{"color":"#2D3748","slug":"palette4","name":"Palette Color 4"},{"color":"#4A5568","slug":"palette5","name":"Palette Color 5"},{"color":"#718096","slug":"palette6","name":"Palette Color 6"},{"color":"#EDF2F7","slug":"palette7","name":"Palette Color 7"},{"color":"#F7FAFC","slug":"palette8","name":"Palette Color 8"},{"color":"#ffffff","slug":"palette9","name":"Palette Color 9"}],"third-palette":[{"color":"#3182CE","slug":"palette1","name":"Palette Color 1"},{"color":"#2B6CB0","slug":"palette2","name":"Palette Color 2"},{"color":"#1A202C","slug":"palette3","name":"Palette Color 3"},{"color":"#2D3748","slug":"palette4","name":"Palette Color 4"},{"color":"#4A5568","slug":"palette5","name":"Palette Color 5"},{"color":"#718096","slug":"palette6","name":"Palette Color 6"},{"color":"#EDF2F7","slug":"palette7","name":"Palette Color 7"},{"color":"#F7FAFC","slug":"palette8","name":"Palette Color 8"},{"color":"#ffffff","slug":"palette9","name":"Palette Color 9"}],"active":"palette"}', true );
|
322 |
+
$default['palette'][0]['color'] = "#2cb1bc";
|
323 |
+
$default['palette'][1]['color'] = "#13919b";
|
324 |
+
$default['palette'][2]['color'] = "#0f2a43";
|
325 |
+
$default['palette'][3]['color'] = "#133453";
|
326 |
+
$default['palette'][4]['color'] = "#587089";
|
327 |
+
$default['palette'][5]['color'] = "#829ab1";
|
328 |
+
$default['palette'][6]['color'] = "#e0fcff";
|
329 |
+
$default['palette'][7]['color'] = "#f5f7fa";
|
330 |
+
$default['palette'][8]['color'] = "#ffffff";
|
331 |
+
update_option( 'kadence_global_palette', json_encode( $default ) );
|
332 |
}
|
333 |
}
|
334 |
/**
|
364 |
'slug' => 'woocommerce',
|
365 |
'path' => 'woocommerce/woocommerce.php',
|
366 |
'title' => 'Woocommerce',
|
367 |
+
'src' => 'repo',
|
368 |
'state' => Plugin_Check::active_check( 'woocommerce/woocommerce.php' ),
|
369 |
);
|
370 |
$kadence_blocks = array(
|
372 |
'slug' => 'kadence-blocks',
|
373 |
'path' => 'kadence-blocks/kadence-blocks.php',
|
374 |
'title' => 'Kadence Blocks',
|
375 |
+
'src' => 'repo',
|
376 |
'state' => Plugin_Check::active_check( 'kadence-blocks/kadence-blocks.php' ),
|
377 |
);
|
378 |
$kadence_blocks_pro = array(
|
380 |
'slug' => 'kadence-blocks-pro',
|
381 |
'path' => 'kadence-blocks-pro/kadence-blocks-pro.php',
|
382 |
'title' => 'Kadence Block Pro',
|
383 |
+
'src' => 'bundle',
|
384 |
'state' => Plugin_Check::active_check( 'kadence-blocks-pro/kadence-blocks-pro.php' ),
|
385 |
);
|
386 |
$wpzoom_recipe_card = array(
|
388 |
'slug' => 'wpzoom-recipe-card',
|
389 |
'path' => 'recipe-card-blocks-by-wpzoom/wpzoom-recipe-card.php',
|
390 |
'title' => 'Recipe Card Blocks by WPZOOM',
|
391 |
+
'src' => 'repo',
|
392 |
'state' => Plugin_Check::active_check( 'recipe-card-blocks-by-wpzoom/wpzoom-recipe-card.php' ),
|
393 |
);
|
394 |
+
$learn_dash = array(
|
395 |
+
'base' => 'sfwd-lms',
|
396 |
+
'slug' => 'sfwd_lms',
|
397 |
+
'path' => 'sfwd-lms/sfwd_lms.php',
|
398 |
+
'title' => 'LearnDash',
|
399 |
+
'src' => 'thirdparty',
|
400 |
+
'state' => Plugin_Check::active_check( 'sfwd-lms/sfwd_lms.php' ),
|
401 |
+
);
|
402 |
if ( 'notactive' !== $kadence_blocks_pro['state'] ) {
|
403 |
$agency = array(
|
404 |
'import_file_name' => 'agency',
|
411 |
'import_notice' => '',
|
412 |
'plugins' => array(
|
413 |
$kadence_blocks,
|
414 |
+
$kadence_blocks_pro,
|
415 |
),
|
416 |
);
|
417 |
} else {
|
463 |
'import_file_name' => 'yoga',
|
464 |
'categories' => array( 'Business' ),
|
465 |
'import_file_url' => 'https://kadence.design/importer/kadence/yoga_site/demo_content.xml',
|
466 |
+
'import_widget_file_url' => 'https://kadence.design/importer/kadence/yoga_site/widget_data.json',
|
467 |
'import_customizer_file_url' => 'https://kadence.design/importer/kadence/yoga_site/theme_options.json',
|
468 |
'preview_url' => 'https://demos.kadencewp.com/blocks-active/',
|
469 |
'import_preview_image_url' => 'https://kadence.design/importer/kadence/yoga_site/preview-image.jpg',
|
485 |
$kadence_blocks,
|
486 |
),
|
487 |
),
|
488 |
+
array(
|
489 |
+
'import_file_name' => 'ldcourse',
|
490 |
+
'categories' => array( 'Business' ),
|
491 |
+
'import_file_url' => 'https://kadence.design/importer/kadence/ld_single_course/demo_content.xml',
|
492 |
+
'import_widget_file_url' => 'https://kadence.design/importer/kadence/ld_single_course/widget_data.json',
|
493 |
+
'import_customizer_file_url' => 'https://kadence.design/importer/kadence/ld_single_course/theme_options.json',
|
494 |
+
'preview_url' => 'https://demos.kadencewp.com/course/',
|
495 |
+
'import_preview_image_url' => 'https://kadence.design/importer/kadence/ld_single_course/preview-image.jpg',
|
496 |
+
'import_notice' => '',
|
497 |
+
'plugins' => array(
|
498 |
+
$kadence_blocks,
|
499 |
+
$learn_dash,
|
500 |
+
),
|
501 |
+
),
|
502 |
);
|
503 |
return $demos;
|
504 |
}
|
531 |
define( 'KADENCE_STARTER_TEMPLATES_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
|
532 |
}
|
533 |
if ( ! defined( 'KADENCE_STARTER_TEMPLATES_VERSION' ) ) {
|
534 |
+
define( 'KADENCE_STARTER_TEMPLATES_VERSION', '1.0.4' );
|
535 |
}
|
536 |
}
|
537 |
/**
|
538 |
* Include all plugin files.
|
539 |
*/
|
540 |
private function include_plugin_files() {
|
541 |
+
require_once KADENCE_STARTER_TEMPLATES_PATH . 'inc/class-author-meta.php';
|
542 |
+
require_once KADENCE_STARTER_TEMPLATES_PATH . 'inc/class-import-export-option.php';
|
543 |
require_once KADENCE_STARTER_TEMPLATES_PATH . 'inc/class-plugin-check.php';
|
544 |
require_once KADENCE_STARTER_TEMPLATES_PATH . 'inc/class-helpers.php';
|
545 |
require_once KADENCE_STARTER_TEMPLATES_PATH . 'inc/class-import-actions.php';
|
620 |
$woocommerce = array(
|
621 |
'title' => 'Woocommerce',
|
622 |
'state' => Plugin_Check::active_check( 'woocommerce/woocommerce.php' ),
|
623 |
+
'src' => 'repo',
|
624 |
);
|
625 |
$kadence_blocks = array(
|
626 |
'title' => 'Kadence Blocks',
|
627 |
'state' => Plugin_Check::active_check( 'kadence-blocks/kadence-blocks.php' ),
|
628 |
+
'src' => 'repo',
|
629 |
);
|
630 |
$kadence_blocks_pro = array(
|
631 |
'title' => 'Kadence Block Pro',
|
632 |
'state' => Plugin_Check::active_check( 'kadence-blocks-pro/kadence-blocks-pro.php' ),
|
633 |
+
'src' => 'bundle',
|
634 |
);
|
635 |
$wpzoom_recipe_card = array(
|
636 |
'title' => 'Recipe Card Blocks by WPZOOM',
|
637 |
'state' => Plugin_Check::active_check( 'recipe-card-blocks-by-wpzoom/wpzoom-recipe-card.php' ),
|
638 |
+
'src' => 'repo',
|
639 |
+
);
|
640 |
+
$learn_dash = array(
|
641 |
+
'title' => 'LearnDash',
|
642 |
+
'state' => Plugin_Check::active_check( 'sfwd-lms/sfwd_lms.php' ),
|
643 |
+
'src' => 'thirdparty',
|
644 |
);
|
645 |
if ( 'notactive' !== $kadence_blocks_pro['state'] ) {
|
646 |
$agency = array(
|
748 |
),
|
749 |
'image' => 'https://kadence.design/importer/kadence/sass_site/preview-image.jpg',
|
750 |
),
|
751 |
+
array(
|
752 |
+
'key' => 5,
|
753 |
+
'slug' => 'ldcourse',
|
754 |
+
'name' => __( 'LearnDash Course', 'kadence-starter-templates' ),
|
755 |
+
'keywords' => array(
|
756 |
+
__( 'course', 'kadence-starter-templates' ),
|
757 |
+
__( 'learndash', 'kadence-starter-templates' ),
|
758 |
+
__( 'business', 'kadence-starter-templates' ),
|
759 |
+
),
|
760 |
+
'url' => 'https://demos.kadencewp.com/course/',
|
761 |
+
'categories' => array( 'business' ),
|
762 |
+
'plugins' => array(
|
763 |
+
$kadence_blocks,
|
764 |
+
$learn_dash,
|
765 |
+
),
|
766 |
+
'image' => 'https://kadence.design/importer/kadence/ld_single_course/preview-image.jpg',
|
767 |
+
),
|
768 |
);
|
769 |
$palettes = array(
|
770 |
array(
|
852 |
'isKadence' => class_exists( 'Kadence\Theme' ),
|
853 |
'templates' => $templates,
|
854 |
'palettes' => $palettes,
|
855 |
+
'has_content' => ( 1 < wp_count_posts()->publish ? true : false ),
|
856 |
'notice' => esc_html__( 'Please Note: This importer is designed for new/empty sites with no content.', 'kadence-starter-templates' ),
|
857 |
'plugin_progress' => esc_html__( 'Checking/Installing/Activating Required Plugins', 'kadence-starter-templates' ),
|
858 |
'content_progress' => esc_html__( 'Importing Demo Content...', 'kadence-starter-templates' ),
|
886 |
}
|
887 |
|
888 |
foreach( $info['plugins'] as $key => $plugin ) {
|
889 |
+
if ( 'notactive' === $plugin['state'] && 'thirdparty' !== $plugin['src'] ) {
|
890 |
$api = plugins_api(
|
891 |
'plugin_information',
|
892 |
array(
|
1014 |
* Default actions:
|
1015 |
* 1 - Before content import WP action (with priority 10).
|
1016 |
*/
|
1017 |
+
/**
|
1018 |
+
* Clean up default contents.
|
1019 |
+
*/
|
1020 |
+
wp_delete_post( 1, true ); // Hello World.
|
1021 |
+
wp_delete_post( 2, true ); // Sample Page.
|
1022 |
+
wp_delete_comment( 1, true ); // WordPress comment.
|
1023 |
do_action( 'kadence-starter-templates/before_content_import_execution', $this->selected_import_files, $this->import_files, $this->selected_index, $this->selected_palette );
|
1024 |
}
|
1025 |
|
inc/class-author-meta.php
ADDED
@@ -0,0 +1,193 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Adds the author meta for use in the Kadence Theme Author box.
|
4 |
+
*
|
5 |
+
* Used in the Kadence Theme
|
6 |
+
*
|
7 |
+
* @since 1.0.4
|
8 |
+
* @package Kadence Starter Templates
|
9 |
+
*/
|
10 |
+
|
11 |
+
namespace Kadence_Starter_Templates;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Adds and Saves extra profile fields for author box.
|
15 |
+
*/
|
16 |
+
class Author_Meta {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* @var null
|
20 |
+
*/
|
21 |
+
private static $instance = null;
|
22 |
+
/**
|
23 |
+
* Instance Control
|
24 |
+
*/
|
25 |
+
public static function get_instance() {
|
26 |
+
if ( is_null( self::$instance ) ) {
|
27 |
+
self::$instance = new self();
|
28 |
+
}
|
29 |
+
return self::$instance;
|
30 |
+
}
|
31 |
+
/**
|
32 |
+
* Class constructor
|
33 |
+
*
|
34 |
+
* @access public
|
35 |
+
* @return void
|
36 |
+
*/
|
37 |
+
public function __construct() {
|
38 |
+
add_action( 'show_user_profile', array( $this, 'extra_profile_fields' ) );
|
39 |
+
add_action( 'edit_user_profile', array( $this, 'extra_profile_fields' ) );
|
40 |
+
add_action( 'personal_options_update', array( $this, 'save_extra_profile_fields' ) );
|
41 |
+
add_action( 'edit_user_profile_update', array( $this, 'save_extra_profile_fields' ) );
|
42 |
+
}
|
43 |
+
/**
|
44 |
+
* Adds extra profile fields for author box.
|
45 |
+
*
|
46 |
+
* @param object $user the user object.
|
47 |
+
*/
|
48 |
+
public function extra_profile_fields( $user ) {
|
49 |
+
if ( current_user_can( 'edit_posts' ) && current_user_can( 'edit_user', $user->ID ) ) {
|
50 |
+
?>
|
51 |
+
<?php wp_nonce_field( 'kadence-profile-extras', 'kadence-profile-nonce' ); ?>
|
52 |
+
<h3><?php echo esc_html__( 'Extra profile information for author box', 'kadence' ); ?></h3>
|
53 |
+
<table class="form-table">
|
54 |
+
<tr>
|
55 |
+
<th>
|
56 |
+
<label for="occupation">
|
57 |
+
<?php esc_html_e( 'Occupation', 'kadence' ); ?>
|
58 |
+
</label>
|
59 |
+
</th>
|
60 |
+
<td>
|
61 |
+
<input type="text" name="occupation" id="occupation" value="<?php echo esc_attr( get_the_author_meta( 'occupation', $user->ID ) ); ?>" class="regular-text" /><br />
|
62 |
+
<span class="description"><?php esc_html_e( 'Please enter your Occupation.', 'kadence' ); ?></span>
|
63 |
+
</td>
|
64 |
+
</tr>
|
65 |
+
<tr>
|
66 |
+
<th>
|
67 |
+
<label for="facebook">Facebook</label></th>
|
68 |
+
<td>
|
69 |
+
<input type="text" name="facebook" id="facebook" value="<?php echo esc_attr( get_the_author_meta( 'facebook', $user->ID ) ); ?>" class="regular-text" /><br />
|
70 |
+
<span class="description"><?php esc_html_e( 'Please enter your Facebook url. (be sure to include http://)', 'kadence' ); ?></span>
|
71 |
+
</td>
|
72 |
+
</tr>
|
73 |
+
<tr>
|
74 |
+
<th>
|
75 |
+
<label for="twitter">Twitter</label>
|
76 |
+
</th>
|
77 |
+
<td>
|
78 |
+
<input type="text" name="twitter" id="twitter" value="<?php echo esc_attr( get_the_author_meta( 'twitter', $user->ID ) ); ?>" class="regular-text" /><br />
|
79 |
+
<span class="description"><?php esc_html_e( 'Please enter your Twitter url. (be sure to include http://)', 'kadence' ); ?></span>
|
80 |
+
</td>
|
81 |
+
</tr>
|
82 |
+
<tr>
|
83 |
+
<th>
|
84 |
+
<label for="instagram">Instagram</label>
|
85 |
+
</th>
|
86 |
+
<td>
|
87 |
+
<input type="text" name="instagram" id="instagram" value="<?php echo esc_attr( get_the_author_meta( 'instagram', $user->ID ) ); ?>" class="regular-text" /><br />
|
88 |
+
<span class="description"><?php esc_html_e( 'Please enter your Instagram url. (be sure to include http://)', 'kadence' ); ?></span>
|
89 |
+
</td>
|
90 |
+
</tr>
|
91 |
+
<tr>
|
92 |
+
<th>
|
93 |
+
<label for="youtube">YouTube</label>
|
94 |
+
</th>
|
95 |
+
<td>
|
96 |
+
<input type="text" name="youtube" id="youtube" value="<?php echo esc_attr( get_the_author_meta( 'youtube', $user->ID ) ); ?>" class="regular-text" /><br />
|
97 |
+
<span class="description"><?php esc_html_e( 'Please enter your YouTube url. (be sure to include http://)', 'kadence' ); ?></span>
|
98 |
+
</td>
|
99 |
+
</tr>
|
100 |
+
<tr>
|
101 |
+
<th>
|
102 |
+
<label for="flickr">Flickr</label>
|
103 |
+
</th>
|
104 |
+
<td>
|
105 |
+
<input type="text" name="flickr" id="flickr" value="<?php echo esc_attr( get_the_author_meta( 'flickr', $user->ID ) ); ?>" class="regular-text" /><br />
|
106 |
+
<span class="description"><?php esc_html_e( 'Please enter your Flickr url. (be sure to include http://)', 'kadence' ); ?></span>
|
107 |
+
</td>
|
108 |
+
</tr>
|
109 |
+
<tr>
|
110 |
+
<th>
|
111 |
+
<label for="vimeo">Vimeo</label>
|
112 |
+
</th>
|
113 |
+
<td>
|
114 |
+
<input type="text" name="vimeo" id="vimeo" value="<?php echo esc_attr( get_the_author_meta( 'vimeo', $user->ID ) ); ?>" class="regular-text" /><br />
|
115 |
+
<span class="description"><?php esc_html_e( 'Please enter your Vimeo url. (be sure to include http://)', 'kadence' ); ?></span>
|
116 |
+
</td>
|
117 |
+
</tr>
|
118 |
+
<tr>
|
119 |
+
<th>
|
120 |
+
<label for="linkedin">Linkedin</label>
|
121 |
+
</th>
|
122 |
+
<td>
|
123 |
+
<input type="text" name="linkedin" id="linkedin" value="<?php echo esc_attr( get_the_author_meta( 'linkedin', $user->ID ) ); ?>" class="regular-text" /><br />
|
124 |
+
<span class="description"><?php esc_html_e( 'Please enter your Linkedin url. (be sure to include http://)', 'kadence' ); ?></span>
|
125 |
+
</td>
|
126 |
+
</tr>
|
127 |
+
<tr>
|
128 |
+
<th>
|
129 |
+
<label for="dribbble">Dribbble</label>
|
130 |
+
</th>
|
131 |
+
<td>
|
132 |
+
<input type="text" name="dribbble" id="dribbble" value="<?php echo esc_attr( get_the_author_meta( 'dribbble', $user->ID ) ); ?>" class="regular-text" /><br />
|
133 |
+
<span class="description"><?php esc_html_e( 'Please enter your Dribbble url. (be sure to include http://)', 'kadence' ); ?></span>
|
134 |
+
</td>
|
135 |
+
</tr>
|
136 |
+
<tr>
|
137 |
+
<th>
|
138 |
+
<label for="pinterest">Pinterest</label>
|
139 |
+
</th>
|
140 |
+
<td>
|
141 |
+
<input type="text" name="pinterest" id="pinterest" value="<?php echo esc_attr( get_the_author_meta( 'pinterest', $user->ID ) ); ?>" class="regular-text" /><br />
|
142 |
+
<span class="description"><?php esc_html_e( 'Please enter your Pinterest url. (be sure to include http://)', 'kadence' ); ?></span>
|
143 |
+
</td>
|
144 |
+
</tr>
|
145 |
+
</table>
|
146 |
+
<?php
|
147 |
+
}
|
148 |
+
}
|
149 |
+
/**
|
150 |
+
* Saves extra profile fields for author box.
|
151 |
+
*
|
152 |
+
* @param number $user_id the user id.
|
153 |
+
*/
|
154 |
+
public function save_extra_profile_fields( $user_id ) {
|
155 |
+
if ( ! current_user_can( 'edit_posts' ) || ! current_user_can( 'edit_user', $user_id ) ) {
|
156 |
+
return false;
|
157 |
+
}
|
158 |
+
if ( ! isset( $_POST['kadence-profile-nonce'] ) || ! wp_verify_nonce( sanitize_key( $_POST['kadence-profile-nonce'] ), 'kadence-profile-extras' ) ) {
|
159 |
+
return;
|
160 |
+
}
|
161 |
+
if ( isset( $_POST['occupation'] ) ) {
|
162 |
+
update_user_meta( $user_id, 'occupation', sanitize_text_field( wp_unslash( $_POST['occupation'] ) ) );
|
163 |
+
}
|
164 |
+
if ( isset( $_POST['twitter'] ) ) {
|
165 |
+
update_user_meta( $user_id, 'twitter', esc_url_raw( $_POST['twitter'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash
|
166 |
+
}
|
167 |
+
if ( isset( $_POST['facebook'] ) ) {
|
168 |
+
update_user_meta( $user_id, 'facebook', esc_url_raw( $_POST['facebook'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash
|
169 |
+
}
|
170 |
+
if ( isset( $_POST['youtube'] ) ) {
|
171 |
+
update_user_meta( $user_id, 'youtube', esc_url_raw( $_POST['youtube'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash
|
172 |
+
}
|
173 |
+
if ( isset( $_POST['flickr'] ) ) {
|
174 |
+
update_user_meta( $user_id, 'flickr', esc_url_raw( $_POST['flickr'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash
|
175 |
+
}
|
176 |
+
if ( isset( $_POST['vimeo'] ) ) {
|
177 |
+
update_user_meta( $user_id, 'vimeo', esc_url_raw( $_POST['vimeo'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash
|
178 |
+
}
|
179 |
+
if ( isset( $_POST['linkedin'] ) ) {
|
180 |
+
update_user_meta( $user_id, 'linkedin', esc_url_raw( $_POST['linkedin'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash
|
181 |
+
}
|
182 |
+
if ( isset( $_POST['dribbble'] ) ) {
|
183 |
+
update_user_meta( $user_id, 'dribbble', esc_url_raw( $_POST['dribbble'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash
|
184 |
+
}
|
185 |
+
if ( isset( $_POST['pinterest'] ) ) {
|
186 |
+
update_user_meta( $user_id, 'pinterest', esc_url_raw( $_POST['pinterest'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash
|
187 |
+
}
|
188 |
+
if ( isset( $_POST['instagram'] ) ) {
|
189 |
+
update_user_meta( $user_id, 'instagram', esc_url_raw( $_POST['instagram'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash
|
190 |
+
}
|
191 |
+
}
|
192 |
+
}
|
193 |
+
Author_Meta::get_instance();
|
inc/class-customizer-option.php
CHANGED
@@ -11,6 +11,8 @@
|
|
11 |
|
12 |
namespace Kadence_Starter_Templates;
|
13 |
|
|
|
|
|
14 |
final class CustomizerOption extends \WP_Customize_Setting {
|
15 |
/**
|
16 |
* Import an option value for this setting.
|
11 |
|
12 |
namespace Kadence_Starter_Templates;
|
13 |
|
14 |
+
use WP_Customize_Setting;
|
15 |
+
|
16 |
final class CustomizerOption extends \WP_Customize_Setting {
|
17 |
/**
|
18 |
* Import an option value for this setting.
|
inc/class-import-customizer-option.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* A class that extends WP_Customize_Setting so we can access
|
4 |
+
* the protected updated method when importing options.
|
5 |
+
*
|
6 |
+
* Used in the Customizer importer.
|
7 |
+
*
|
8 |
+
* @since 1.0.4
|
9 |
+
* @package Kadence Starter Templates
|
10 |
+
*/
|
11 |
+
|
12 |
+
namespace Kadence_Starter_Templates;
|
13 |
+
|
14 |
+
use WP_Customize_Setting;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* A class that extends WP_Customize_Setting so we can access
|
18 |
+
* the protected updated method when importing options.
|
19 |
+
*/
|
20 |
+
final class Import_Option extends \WP_Customize_Setting {
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Import an option value for this setting.
|
24 |
+
*
|
25 |
+
* @since 0.3
|
26 |
+
* @param mixed $value The option value.
|
27 |
+
* @return void
|
28 |
+
*/
|
29 |
+
public function import( $value ) {
|
30 |
+
$this->update( $value );
|
31 |
+
}
|
32 |
+
}
|
inc/class-import-export-control.php
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Import Export customize control extends the WP_Customize_Control class.
|
4 |
+
*
|
5 |
+
* @package Kadence Starter Templates
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace Kadence_Starter_Templates;
|
9 |
+
|
10 |
+
use WP_Customize_Control;
|
11 |
+
|
12 |
+
if ( ! class_exists( 'WP_Customize_Control' ) ) {
|
13 |
+
return;
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Class Kadence_Starter_Control_Import_Export
|
18 |
+
*
|
19 |
+
* @access public
|
20 |
+
*/
|
21 |
+
class Kadence_Starter_Control_Import_Export extends WP_Customize_Control {
|
22 |
+
/**
|
23 |
+
* Control type
|
24 |
+
*
|
25 |
+
* @var string
|
26 |
+
*/
|
27 |
+
public $type = 'kadence_starter_import_export_control';
|
28 |
+
/**
|
29 |
+
* Empty Render Function to prevent errors.
|
30 |
+
*/
|
31 |
+
public function render_content() {
|
32 |
+
?>
|
33 |
+
<span class="customize-control-title">
|
34 |
+
<?php esc_html_e( 'Export', 'kadence' ); ?>
|
35 |
+
</span>
|
36 |
+
<span class="description customize-control-description">
|
37 |
+
<?php esc_html_e( 'Click the button below to export the customization settings for this theme.', 'kadence' ); ?>
|
38 |
+
</span>
|
39 |
+
<input type="button" class="button kadence-starter-export kadence-starter-button" name="kadence-starter-export-button" value="<?php esc_attr_e( 'Export', 'kadence' ); ?>" />
|
40 |
+
|
41 |
+
<hr class="kt-theme-hr" />
|
42 |
+
|
43 |
+
<span class="customize-control-title">
|
44 |
+
<?php esc_html_e( 'Import', 'kadence' ); ?>
|
45 |
+
</span>
|
46 |
+
<span class="description customize-control-description">
|
47 |
+
<?php esc_html_e( 'Upload a file to import customization settings for this theme.', 'kadence' ); ?>
|
48 |
+
</span>
|
49 |
+
<div class="kadence-starter-import-controls">
|
50 |
+
<input type="file" name="kadence-starter-import-file" class="kadence-starter-import-file" />
|
51 |
+
<?php wp_nonce_field( 'kadence-starter-importing', 'kadence-starter-import' ); ?>
|
52 |
+
</div>
|
53 |
+
<div class="kadence-starter-uploading"><?php esc_html_e( 'Uploading...', 'kadence' ); ?></div>
|
54 |
+
<input type="button" class="button kadence-starter-import kadence-starter-button" name="kadence-starter-import-button" value="<?php esc_attr_e( 'Import', 'kadence' ); ?>" />
|
55 |
+
|
56 |
+
<hr class="kt-theme-hr" />
|
57 |
+
<span class="customize-control-title">
|
58 |
+
<?php esc_html_e( 'Reset', 'kadence' ); ?>
|
59 |
+
</span>
|
60 |
+
<span class="description customize-control-description">
|
61 |
+
<?php esc_html_e( 'Click the button to reset all theme settings.', 'kadence' ); ?>
|
62 |
+
</span>
|
63 |
+
<input type="button" class="components-button is-destructive kadence-starter-reset kadence-starter-button" name="kadence-starter-reset-button" value="<?php esc_attr_e( 'Reset', 'kadence' ); ?>" />
|
64 |
+
<?php
|
65 |
+
}
|
66 |
+
}
|
inc/class-import-export-option.php
ADDED
@@ -0,0 +1,459 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Class for the Customizer Import/Export and Reset.
|
4 |
+
* This is based on the Beaver Builders Import Export plugin.
|
5 |
+
*
|
6 |
+
* Used in the Customizer importer.
|
7 |
+
*
|
8 |
+
* @since 1.0.4
|
9 |
+
* @package Kadence Starter Templates
|
10 |
+
*/
|
11 |
+
|
12 |
+
namespace Kadence_Starter_Templates;
|
13 |
+
|
14 |
+
use WP_Customize_Control;
|
15 |
+
use WP_Filesystem;
|
16 |
+
use function add_action;
|
17 |
+
use function add_filter;
|
18 |
+
use function wp_enqueue_style;
|
19 |
+
use function get_template_directory;
|
20 |
+
use function wp_style_add_data;
|
21 |
+
use function get_theme_file_uri;
|
22 |
+
use function get_theme_file_path;
|
23 |
+
use function wp_styles;
|
24 |
+
use function esc_attr;
|
25 |
+
use function esc_url;
|
26 |
+
use function wp_style_is;
|
27 |
+
use function _doing_it_wrong;
|
28 |
+
use function wp_print_styles;
|
29 |
+
use function get_option;
|
30 |
+
use function wp_get_attachment_thumb_url;
|
31 |
+
use function apply_filters;
|
32 |
+
use function wp_get_attachment_url;
|
33 |
+
use function wp_get_attachment_metadata;
|
34 |
+
|
35 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
36 |
+
exit;
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Class for Customizer Import Export
|
41 |
+
*
|
42 |
+
* @category class
|
43 |
+
*/
|
44 |
+
class Customizer_Import_Export {
|
45 |
+
|
46 |
+
/**
|
47 |
+
* An array of core options that shouldn't be imported.
|
48 |
+
* @access private
|
49 |
+
* @var array $core_options
|
50 |
+
*/
|
51 |
+
static private $core_options = array(
|
52 |
+
'blogname',
|
53 |
+
'blogdescription',
|
54 |
+
'show_on_front',
|
55 |
+
'page_on_front',
|
56 |
+
'page_for_posts',
|
57 |
+
);
|
58 |
+
|
59 |
+
/**
|
60 |
+
* @var null
|
61 |
+
*/
|
62 |
+
private static $instance = null;
|
63 |
+
/**
|
64 |
+
* Instance Control
|
65 |
+
*/
|
66 |
+
public static function get_instance() {
|
67 |
+
if ( is_null( self::$instance ) ) {
|
68 |
+
self::$instance = new self();
|
69 |
+
}
|
70 |
+
return self::$instance;
|
71 |
+
}
|
72 |
+
/**
|
73 |
+
* Class constructor
|
74 |
+
*
|
75 |
+
* @access public
|
76 |
+
* @return void
|
77 |
+
*/
|
78 |
+
public function __construct() {
|
79 |
+
add_action( 'customize_register', array( $this, 'import_export_requests' ), 999999 );
|
80 |
+
add_action( 'customize_register', array( $this, 'register_controls' ) );
|
81 |
+
add_action( 'customize_register', array( $this, 'import_export_setup' ) );
|
82 |
+
add_action( 'customize_controls_print_scripts', array( $this, 'controls_print_scripts' ) );
|
83 |
+
add_filter( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_customizer_scripts' ) );
|
84 |
+
// Ajax handler for reset.
|
85 |
+
add_action( 'wp_ajax_kadence_starter_reset', array( $this, 'ajax_reset' ) );
|
86 |
+
}
|
87 |
+
/**
|
88 |
+
* Enqueue Customizer scripts
|
89 |
+
*
|
90 |
+
* @access public
|
91 |
+
* @return void
|
92 |
+
*/
|
93 |
+
public function enqueue_customizer_scripts() {
|
94 |
+
wp_enqueue_style( 'kadence-starter-import-export', KADENCE_STARTER_TEMPLATES_URL . 'assets/css/starter-import-export.css', array( 'wp-components' ), KADENCE_STARTER_TEMPLATES_VERSION );
|
95 |
+
wp_enqueue_script( 'kadence-starter-import-export', KADENCE_STARTER_TEMPLATES_URL . 'assets/js/starter-import-export.min.js', array( 'jquery' ), KADENCE_STARTER_TEMPLATES_VERSION, true );
|
96 |
+
wp_localize_script(
|
97 |
+
'kadence-starter-import-export',
|
98 |
+
'kadenceStarterImport',
|
99 |
+
array(
|
100 |
+
'resetConfirm' => __( "Attention! This will remove all customizations to this theme!\n\nThis action is irreversible!", 'kadence' ),
|
101 |
+
'emptyImport' => __( 'Please choose a file to import.', 'kadence-starter-templates' ),
|
102 |
+
'customizerURL' => admin_url( 'customize.php' ),
|
103 |
+
'nonce' => array(
|
104 |
+
'reset' => wp_create_nonce( 'kadence-starter-reseting' ),
|
105 |
+
'export' => wp_create_nonce( 'kadence-starter-exporting' ),
|
106 |
+
),
|
107 |
+
)
|
108 |
+
);
|
109 |
+
}
|
110 |
+
/**
|
111 |
+
* Reset to default values via Ajax request
|
112 |
+
*
|
113 |
+
* @access public
|
114 |
+
* @return void
|
115 |
+
*/
|
116 |
+
public function ajax_reset() {
|
117 |
+
// Check request.
|
118 |
+
if ( ! check_ajax_referer( 'kadence-starter-reseting', 'nonce', false ) ) {
|
119 |
+
wp_send_json_error( 'invalid_nonce' );
|
120 |
+
}
|
121 |
+
|
122 |
+
// Check if user is allowed to reset values.
|
123 |
+
if ( ! current_user_can( 'edit_theme_options' ) ) {
|
124 |
+
wp_send_json_error( 'invalid_permissions' );
|
125 |
+
}
|
126 |
+
|
127 |
+
// Reset to default values.
|
128 |
+
delete_option( 'theme_mods_' . get_option( 'stylesheet' ) );
|
129 |
+
delete_option( 'kadence_global_palette' );
|
130 |
+
wp_send_json_success();
|
131 |
+
}
|
132 |
+
/**
|
133 |
+
* Add Control.
|
134 |
+
*
|
135 |
+
* @access public
|
136 |
+
* @param object $wp_customize the customizer object.
|
137 |
+
* @return void
|
138 |
+
*/
|
139 |
+
public function register_controls( $wp_customize ) {
|
140 |
+
require_once KADENCE_STARTER_TEMPLATES_PATH . 'inc/class-import-export-control.php'; // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound
|
141 |
+
}
|
142 |
+
/**
|
143 |
+
* Add Customizer Setup
|
144 |
+
*
|
145 |
+
* @access public
|
146 |
+
* @param object $wp_customize the object.
|
147 |
+
* @return void
|
148 |
+
*/
|
149 |
+
public static function import_export_setup( $wp_customize ) {
|
150 |
+
$section_config = array(
|
151 |
+
'title' => __( 'Import/Export', 'kadence-starter-templates' ),
|
152 |
+
'priority' => 999,
|
153 |
+
);
|
154 |
+
$wp_customize->add_section( 'kadence_starter_import_export', $section_config );
|
155 |
+
$control_config = array(
|
156 |
+
'settings' => array(),
|
157 |
+
'priority' => 2,
|
158 |
+
'section' => 'kadence_starter_import_export',
|
159 |
+
'label' => esc_html__( 'Import/Export', 'kadence' ),
|
160 |
+
);
|
161 |
+
$wp_customize->add_control( new Kadence_Starter_Control_Import_Export( $wp_customize, 'kadence_starter_import_export', $control_config ) );
|
162 |
+
|
163 |
+
}
|
164 |
+
/**
|
165 |
+
* Check to see if we need to do an export or import.
|
166 |
+
* @param object $wp_customize An instance of WP_Customize_Manager.
|
167 |
+
* @return void
|
168 |
+
*/
|
169 |
+
public static function import_export_requests( $wp_customize ) {
|
170 |
+
// Check if user is allowed to change values.
|
171 |
+
if ( current_user_can( 'edit_theme_options' ) ) {
|
172 |
+
if ( isset( $_REQUEST['kadence-starter-export'] ) ) {
|
173 |
+
self::export_data( $wp_customize );
|
174 |
+
}
|
175 |
+
if ( isset( $_REQUEST['kadence-starter-import'] ) && isset( $_FILES['kadence-starter-import-file'] ) ) {
|
176 |
+
self::import_data( $wp_customize );
|
177 |
+
}
|
178 |
+
}
|
179 |
+
}
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Export Theme settings.
|
183 |
+
*
|
184 |
+
* @access private
|
185 |
+
* @param object $wp_customize An instance of WP_Customize_Manager.
|
186 |
+
* @return void
|
187 |
+
*/
|
188 |
+
private static function export_data( $wp_customize ) {
|
189 |
+
if ( ! wp_verify_nonce( $_REQUEST['kadence-starter-export'], 'kadence-starter-exporting' ) ) {
|
190 |
+
return;
|
191 |
+
}
|
192 |
+
$template = 'kadence';
|
193 |
+
$charset = get_option( 'blog_charset' );
|
194 |
+
$mods = get_theme_mods();
|
195 |
+
$data = array(
|
196 |
+
'template' => $template,
|
197 |
+
'mods' => $mods ? $mods : array(),
|
198 |
+
'options' => array(),
|
199 |
+
);
|
200 |
+
|
201 |
+
// Get options from the Customizer API.
|
202 |
+
$settings = $wp_customize->settings();
|
203 |
+
foreach ( $settings as $key => $setting ) {
|
204 |
+
|
205 |
+
if ( 'option' == $setting->type ) {
|
206 |
+
|
207 |
+
// Don't save widget data.
|
208 |
+
if ( 'widget_' === substr( strtolower( $key ), 0, 7 ) ) {
|
209 |
+
continue;
|
210 |
+
}
|
211 |
+
|
212 |
+
// Don't save sidebar data.
|
213 |
+
if ( 'sidebars_' === substr( strtolower( $key ), 0, 9 ) ) {
|
214 |
+
continue;
|
215 |
+
}
|
216 |
+
|
217 |
+
// Don't save core options.
|
218 |
+
if ( in_array( $key, self::$core_options ) ) {
|
219 |
+
continue;
|
220 |
+
}
|
221 |
+
|
222 |
+
$data['options'][ $key ] = $setting->value();
|
223 |
+
}
|
224 |
+
}
|
225 |
+
if ( function_exists( 'wp_get_custom_css_post' ) ) {
|
226 |
+
$data['wp_css'] = wp_get_custom_css();
|
227 |
+
}
|
228 |
+
|
229 |
+
// Set the download headers.
|
230 |
+
header( 'Content-disposition: attachment; filename=kadence-theme-export.dat' );
|
231 |
+
header( 'Content-Type: application/octet-stream; charset=' . $charset );
|
232 |
+
|
233 |
+
// Serialize the export data.
|
234 |
+
echo serialize( $data );
|
235 |
+
|
236 |
+
// Start the download.
|
237 |
+
die();
|
238 |
+
}
|
239 |
+
/**
|
240 |
+
* Imports uploaded kadence woo email settings
|
241 |
+
*
|
242 |
+
* @access private
|
243 |
+
* @param object $wp_customize An instance of WP_Customize_Manager.
|
244 |
+
* @return void
|
245 |
+
*/
|
246 |
+
private static function import_data( $wp_customize ) {
|
247 |
+
// Make sure we have a valid nonce.
|
248 |
+
if ( ! wp_verify_nonce( $_REQUEST['kadence-starter-import'], 'kadence-starter-importing' ) ) {
|
249 |
+
return;
|
250 |
+
}
|
251 |
+
// Make sure WordPress upload support is loaded.
|
252 |
+
if ( ! function_exists( 'wp_handle_upload' ) ) {
|
253 |
+
require_once( ABSPATH . 'wp-admin/includes/file.php' );
|
254 |
+
}
|
255 |
+
// Load the export/import option class.
|
256 |
+
require_once KADENCE_STARTER_TEMPLATES_PATH . 'inc/class-import-customizer-option.php'; // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound
|
257 |
+
|
258 |
+
// Setup global vars.
|
259 |
+
global $wp_customize;
|
260 |
+
global $kadence_starter_import_error;
|
261 |
+
global $wp_filesystem;
|
262 |
+
|
263 |
+
// Setup internal vars.
|
264 |
+
$kadence_starter_import_error = false;
|
265 |
+
$template = 'kadence';
|
266 |
+
$overrides = array( 'test_form' => false, 'test_type' => false, 'mimes' => array( 'dat' => 'text/plain' ) );
|
267 |
+
$file = wp_handle_upload( $_FILES['kadence-starter-import-file'], $overrides );
|
268 |
+
|
269 |
+
// Make sure we have an uploaded file.
|
270 |
+
if ( isset( $file['error'] ) ) {
|
271 |
+
$kadence_starter_import_error = $file['error'];
|
272 |
+
return;
|
273 |
+
}
|
274 |
+
if ( ! file_exists( $file['file'] ) ) {
|
275 |
+
$kadence_starter_import_error = __( 'Error importing settings! Please try again.', 'kadence-starter-templates' );
|
276 |
+
return;
|
277 |
+
}
|
278 |
+
if ( ! is_object( $wp_filesystem ) ) {
|
279 |
+
require_once ABSPATH . '/wp-admin/includes/file.php';
|
280 |
+
WP_Filesystem();
|
281 |
+
}
|
282 |
+
|
283 |
+
// Get the upload data.
|
284 |
+
$data = '';
|
285 |
+
if ( $wp_filesystem->exists( $file['file'] ) ) {
|
286 |
+
$raw = $wp_filesystem->get_contents( $file['file'] );
|
287 |
+
$data = @unserialize( $raw );
|
288 |
+
}
|
289 |
+
|
290 |
+
// Remove the uploaded file.
|
291 |
+
unlink( $file['file'] );
|
292 |
+
|
293 |
+
// Data checks.
|
294 |
+
if ( 'array' != gettype( $data ) ) {
|
295 |
+
$kadence_starter_import_error = __( 'Error importing settings! Please check that you uploaded a customizer export file.', 'kadence-starter-templates' );
|
296 |
+
return;
|
297 |
+
}
|
298 |
+
if ( ! isset( $data['template'] ) ) {
|
299 |
+
$kadence_starter_import_error = __( 'Error importing settings! Please check that you uploaded a customizer export file.', 'kadence-starter-templates' );
|
300 |
+
return;
|
301 |
+
}
|
302 |
+
if ( $data['template'] != $template ) {
|
303 |
+
$kadence_starter_import_error = __( 'Error importing settings! The settings you uploaded are not for the Kadence Theme.', 'kadence-starter-templates' );
|
304 |
+
return;
|
305 |
+
}
|
306 |
+
// Import images.
|
307 |
+
$data['mods'] = self::import_images( $data['mods'] );
|
308 |
+
|
309 |
+
// Import custom options.
|
310 |
+
if ( isset( $data['options'] ) ) {
|
311 |
+
foreach ( $data['options'] as $option_key => $option_value ) {
|
312 |
+
$option = new Import_Option(
|
313 |
+
$wp_customize,
|
314 |
+
$option_key,
|
315 |
+
array(
|
316 |
+
'default' => '',
|
317 |
+
'type' => 'option',
|
318 |
+
'capability' => 'edit_theme_options'
|
319 |
+
)
|
320 |
+
);
|
321 |
+
$option->import( $option_value );
|
322 |
+
}
|
323 |
+
}
|
324 |
+
// If wp_css is set then import it.
|
325 |
+
if ( function_exists( 'wp_update_custom_css_post' ) && isset( $data['wp_css'] ) && '' !== $data['wp_css'] ) {
|
326 |
+
wp_update_custom_css_post( $data['wp_css'] );
|
327 |
+
}
|
328 |
+
// Call the customize_save action.
|
329 |
+
do_action( 'customize_save', $wp_customize );
|
330 |
+
|
331 |
+
// Loop through the mods.
|
332 |
+
foreach ( $data['mods'] as $key => $val ) {
|
333 |
+
|
334 |
+
// Call the customize_save_ dynamic action.
|
335 |
+
do_action( 'customize_save_' . $key, $wp_customize );
|
336 |
+
|
337 |
+
// Save the mod.
|
338 |
+
set_theme_mod( $key, $val );
|
339 |
+
}
|
340 |
+
|
341 |
+
// Call the customize_save_after action.
|
342 |
+
do_action( 'customize_save_after', $wp_customize );
|
343 |
+
}
|
344 |
+
|
345 |
+
/**
|
346 |
+
* Imports images for settings saved as mods.
|
347 |
+
*
|
348 |
+
* @since 0.1
|
349 |
+
* @access private
|
350 |
+
* @param array $mods An array of customizer mods.
|
351 |
+
* @return array The mods array with any new import data.
|
352 |
+
*/
|
353 |
+
private static function import_images( $mods ) {
|
354 |
+
foreach ( $mods as $key => $val ) {
|
355 |
+
|
356 |
+
if ( self::is_image_url( $val ) ) {
|
357 |
+
|
358 |
+
$data = self::sideload_image( $val );
|
359 |
+
|
360 |
+
if ( ! is_wp_error( $data ) ) {
|
361 |
+
|
362 |
+
$mods[ $key ] = $data->url;
|
363 |
+
|
364 |
+
// Handle header image controls.
|
365 |
+
if ( isset( $mods[ $key . '_data' ] ) ) {
|
366 |
+
$mods[ $key . '_data' ] = $data;
|
367 |
+
update_post_meta( $data->attachment_id, '_wp_attachment_is_custom_header', get_stylesheet() );
|
368 |
+
}
|
369 |
+
}
|
370 |
+
}
|
371 |
+
}
|
372 |
+
|
373 |
+
return $mods;
|
374 |
+
}
|
375 |
+
/**
|
376 |
+
* Taken from the core media_sideload_image function and
|
377 |
+
* modified to return an array of data instead of html.
|
378 |
+
*
|
379 |
+
* @since 0.1
|
380 |
+
* @access private
|
381 |
+
* @param string $file The image file path.
|
382 |
+
* @return array An array of image data.
|
383 |
+
*/
|
384 |
+
private static function _sideload_image( $file ) {
|
385 |
+
$data = new stdClass();
|
386 |
+
|
387 |
+
if ( ! function_exists( 'media_handle_sideload' ) ) {
|
388 |
+
require_once( ABSPATH . 'wp-admin/includes/media.php' );
|
389 |
+
require_once( ABSPATH . 'wp-admin/includes/file.php' );
|
390 |
+
require_once( ABSPATH . 'wp-admin/includes/image.php' );
|
391 |
+
}
|
392 |
+
if ( ! empty( $file ) ) {
|
393 |
+
|
394 |
+
// Set variables for storage, fix file filename for query strings.
|
395 |
+
preg_match( '/[^\?]+\.(jpe?g|jpe|gif|png)\b/i', $file, $matches );
|
396 |
+
$file_array = array();
|
397 |
+
$file_array['name'] = basename( $matches[0] );
|
398 |
+
|
399 |
+
// Download file to temp location.
|
400 |
+
$file_array['tmp_name'] = download_url( $file );
|
401 |
+
|
402 |
+
// If error storing temporarily, return the error.
|
403 |
+
if ( is_wp_error( $file_array['tmp_name'] ) ) {
|
404 |
+
return $file_array['tmp_name'];
|
405 |
+
}
|
406 |
+
|
407 |
+
// Do the validation and storage stuff.
|
408 |
+
$id = media_handle_sideload( $file_array, 0 );
|
409 |
+
|
410 |
+
// If error storing permanently, unlink.
|
411 |
+
if ( is_wp_error( $id ) ) {
|
412 |
+
@unlink( $file_array['tmp_name'] );
|
413 |
+
return $id;
|
414 |
+
}
|
415 |
+
|
416 |
+
// Build the object to return.
|
417 |
+
$meta = wp_get_attachment_metadata( $id );
|
418 |
+
$data->attachment_id = $id;
|
419 |
+
$data->url = wp_get_attachment_url( $id );
|
420 |
+
$data->thumbnail_url = wp_get_attachment_thumb_url( $id );
|
421 |
+
$data->height = $meta['height'];
|
422 |
+
$data->width = $meta['width'];
|
423 |
+
}
|
424 |
+
|
425 |
+
return $data;
|
426 |
+
}
|
427 |
+
|
428 |
+
/**
|
429 |
+
* Checks to see whether a string is an image url or not.
|
430 |
+
*
|
431 |
+
* @since 0.1
|
432 |
+
* @access private
|
433 |
+
* @param string $string The string to check.
|
434 |
+
* @return bool Whether the string is an image url or not.
|
435 |
+
*/
|
436 |
+
private static function is_image_url( $string = '' ) {
|
437 |
+
if ( is_string( $string ) ) {
|
438 |
+
if ( preg_match( '/\.(jpg|jpeg|png|gif)/i', $string ) ) {
|
439 |
+
return true;
|
440 |
+
}
|
441 |
+
}
|
442 |
+
|
443 |
+
return false;
|
444 |
+
}
|
445 |
+
/**
|
446 |
+
* Prints error scripts for the control.
|
447 |
+
*
|
448 |
+
* @since 0.1
|
449 |
+
* @return void
|
450 |
+
*/
|
451 |
+
public static function controls_print_scripts() {
|
452 |
+
global $kadence_starter_import_error;
|
453 |
+
|
454 |
+
if ( $kadence_starter_import_error ) {
|
455 |
+
echo '<script> alert("' . $kadence_starter_import_error . '"); </script>';
|
456 |
+
}
|
457 |
+
}
|
458 |
+
}
|
459 |
+
Customizer_Import_Export::get_instance();
|
inc/react/src/index.js
CHANGED
@@ -127,6 +127,7 @@ class KadenceImporter extends Component {
|
|
127 |
const itemArray = this.state.templates.filter( ( { key } ) => key === this.state.activeTemplate );
|
128 |
const item = itemArray[0];
|
129 |
let pluginsActive = true;
|
|
|
130 |
const url = ( this.state.colorPalette ? item.url + '?previewcolor=' + this.state.colorPalette : item.url );
|
131 |
return (
|
132 |
<div className="kadence-starter-templates-preview theme-install-overlay wp-full-overlay expanded" style={{ display:'block'}}>
|
@@ -199,9 +200,12 @@ class KadenceImporter extends Component {
|
|
199 |
<div className="kadence-starter-required-plugins">
|
200 |
<h3>{ __( 'Required Plugins', 'kadence-starter-templates' ) }</h3>
|
201 |
<ul className="kadence-required-wrap">
|
202 |
-
{ map( item.plugins, ( { state, title } ) => {
|
203 |
if ( 'active' !== state ) {
|
204 |
pluginsActive = false;
|
|
|
|
|
|
|
205 |
}
|
206 |
return (
|
207 |
<li className="plugin-required">
|
@@ -211,7 +215,14 @@ class KadenceImporter extends Component {
|
|
211 |
} ) }
|
212 |
</ul>
|
213 |
{ ! pluginsActive && (
|
214 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
215 |
) }
|
216 |
</div>
|
217 |
</div>
|
@@ -238,6 +249,7 @@ class KadenceImporter extends Component {
|
|
238 |
const KadenceImportMode = () => {
|
239 |
const itemArray = this.state.templates.filter( ( { key } ) => key === this.state.activeTemplate );
|
240 |
const item = itemArray[0];
|
|
|
241 |
return (
|
242 |
<Fragment>
|
243 |
<div className="kst-grid-single-item">
|
@@ -254,15 +266,27 @@ class KadenceImporter extends Component {
|
|
254 |
className="kst-import-modal"
|
255 |
title={ __( 'Import Starter Template' ) }
|
256 |
onRequestClose={ () => this.state.isFetching ? false : this.setState( { activeTemplate: '', colorPalette: '', focusMode: false, isImporting: false, progress: '' } ) }>
|
257 |
-
|
258 |
-
|
259 |
-
|
|
|
|
|
260 |
<h3>{ __( 'Starter Template Plugins', 'kadence-starter-templates' ) }</h3>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
261 |
<ul className="kadence-required-wrap">
|
262 |
-
{ map( item.plugins, ( { state, title } ) => {
|
263 |
return (
|
264 |
<li className="plugin-required">
|
265 |
-
{ title }
|
266 |
</li>
|
267 |
);
|
268 |
} ) }
|
@@ -329,15 +353,26 @@ class KadenceImporter extends Component {
|
|
329 |
{ ! kadenceStarterParams.isKadence && (
|
330 |
<div class="kadence_starter_templates_response">
|
331 |
<h2>{ __( 'This Starter Template Requires the Kadence Theme', 'kadence-starter-templates' ) }</h2>
|
332 |
-
<ExternalLink href={ 'https://
|
333 |
</div>
|
334 |
) }
|
335 |
{ kadenceStarterParams.isKadence && (
|
336 |
-
<
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
341 |
) }
|
342 |
</Modal>
|
343 |
</Fragment>
|
127 |
const itemArray = this.state.templates.filter( ( { key } ) => key === this.state.activeTemplate );
|
128 |
const item = itemArray[0];
|
129 |
let pluginsActive = true;
|
130 |
+
let pluginsPremium = false;
|
131 |
const url = ( this.state.colorPalette ? item.url + '?previewcolor=' + this.state.colorPalette : item.url );
|
132 |
return (
|
133 |
<div className="kadence-starter-templates-preview theme-install-overlay wp-full-overlay expanded" style={{ display:'block'}}>
|
200 |
<div className="kadence-starter-required-plugins">
|
201 |
<h3>{ __( 'Required Plugins', 'kadence-starter-templates' ) }</h3>
|
202 |
<ul className="kadence-required-wrap">
|
203 |
+
{ map( item.plugins, ( { state, title, src } ) => {
|
204 |
if ( 'active' !== state ) {
|
205 |
pluginsActive = false;
|
206 |
+
if ( 'thirdparty' === src ) {
|
207 |
+
pluginsPremium = true;
|
208 |
+
}
|
209 |
}
|
210 |
return (
|
211 |
<li className="plugin-required">
|
215 |
} ) }
|
216 |
</ul>
|
217 |
{ ! pluginsActive && (
|
218 |
+
<Fragment>
|
219 |
+
{ pluginsPremium && (
|
220 |
+
<p className="desc-small">{__( '*Install Missing/Inactive Premium plugins to import.', 'kadence-starter-templates' ) }</p>
|
221 |
+
) }
|
222 |
+
{ !pluginsPremium && (
|
223 |
+
<p className="desc-small">{__( '*Missing/Inactive plugins will be installed on import.', 'kadence-starter-templates' ) }</p>
|
224 |
+
) }
|
225 |
+
</Fragment>
|
226 |
) }
|
227 |
</div>
|
228 |
</div>
|
249 |
const KadenceImportMode = () => {
|
250 |
const itemArray = this.state.templates.filter( ( { key } ) => key === this.state.activeTemplate );
|
251 |
const item = itemArray[0];
|
252 |
+
let pluginsPremium = false;
|
253 |
return (
|
254 |
<Fragment>
|
255 |
<div className="kst-grid-single-item">
|
266 |
className="kst-import-modal"
|
267 |
title={ __( 'Import Starter Template' ) }
|
268 |
onRequestClose={ () => this.state.isFetching ? false : this.setState( { activeTemplate: '', colorPalette: '', focusMode: false, isImporting: false, progress: '' } ) }>
|
269 |
+
{ kadenceStarterParams.has_content && (
|
270 |
+
<div className="kadence_starter_templates_notice">
|
271 |
+
{ kadenceStarterParams.notice }
|
272 |
+
</div>
|
273 |
+
) }
|
274 |
<h3>{ __( 'Starter Template Plugins', 'kadence-starter-templates' ) }</h3>
|
275 |
+
{ map( item.plugins, ( { state, title, src } ) => {
|
276 |
+
if ( 'active' !== state ) {
|
277 |
+
if ( 'thirdparty' === src ) {
|
278 |
+
pluginsPremium = true;
|
279 |
+
}
|
280 |
+
}
|
281 |
+
} ) }
|
282 |
+
{ pluginsPremium && (
|
283 |
+
<p className="desc-small install-third-party-notice">{ __( '*This starter template requires premium third-party plugins. Please install missing/inactive premium plugins to import.', 'kadence-starter-templates' ) }</p>
|
284 |
+
) }
|
285 |
<ul className="kadence-required-wrap">
|
286 |
+
{ map( item.plugins, ( { state, title, src } ) => {
|
287 |
return (
|
288 |
<li className="plugin-required">
|
289 |
+
{ title } { ( 'active' !== state && 'thirdparty' === src ? <span class="plugin-install-required">{ __( 'Please install and activate this third-party premium Plugin' ) }</span> : '' ) }
|
290 |
</li>
|
291 |
);
|
292 |
} ) }
|
353 |
{ ! kadenceStarterParams.isKadence && (
|
354 |
<div class="kadence_starter_templates_response">
|
355 |
<h2>{ __( 'This Starter Template Requires the Kadence Theme', 'kadence-starter-templates' ) }</h2>
|
356 |
+
<ExternalLink href={ 'https://kadence-theme.com/' }>{ __( 'Get Free Theme', 'kadence-blocks' ) }</ExternalLink>
|
357 |
</div>
|
358 |
) }
|
359 |
{ kadenceStarterParams.isKadence && (
|
360 |
+
<Fragment>
|
361 |
+
{ pluginsPremium && (
|
362 |
+
<Button className="kt-defaults-save" isPrimary disabled={ this.state.isFetching } onClick={ () => {
|
363 |
+
this.runPluginInstall( item.key );
|
364 |
+
} }>
|
365 |
+
{ __( 'Skip and Import with Partial Content' ) }
|
366 |
+
</Button>
|
367 |
+
) }
|
368 |
+
{ ! pluginsPremium && (
|
369 |
+
<Button className="kt-defaults-save" isPrimary disabled={ this.state.isFetching } onClick={ () => {
|
370 |
+
this.runPluginInstall( item.key );
|
371 |
+
} }>
|
372 |
+
{ __( 'Start Importing' ) }
|
373 |
+
</Button>
|
374 |
+
) }
|
375 |
+
</Fragment>
|
376 |
) }
|
377 |
</Modal>
|
378 |
</Fragment>
|
inc/react/src/starter-templates.scss
CHANGED
@@ -330,7 +330,7 @@ span.kt-license-status.k-active {
|
|
330 |
align-items: center;
|
331 |
justify-content: space-between;
|
332 |
}
|
333 |
-
@media ( max-width:
|
334 |
.kadence-starter-templates-preview .kadence-swatche-item-wrap {
|
335 |
width: 22px !important;
|
336 |
height: 22px !important;
|
@@ -347,6 +347,20 @@ h2.palette-title {
|
|
347 |
.kadence-starter-required-plugins {
|
348 |
padding: 10px 20px 10px;
|
349 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
350 |
.kadence-required-wrap {
|
351 |
font-weight: bold;
|
352 |
list-style: disc;
|
330 |
align-items: center;
|
331 |
justify-content: space-between;
|
332 |
}
|
333 |
+
@media ( max-width: 1860px ) {
|
334 |
.kadence-starter-templates-preview .kadence-swatche-item-wrap {
|
335 |
width: 22px !important;
|
336 |
height: 22px !important;
|
347 |
.kadence-starter-required-plugins {
|
348 |
padding: 10px 20px 10px;
|
349 |
}
|
350 |
+
p.install-third-party-notice {
|
351 |
+
max-width: 540px;
|
352 |
+
background: #fffaf0;
|
353 |
+
padding: 1em;
|
354 |
+
color: #c05621;
|
355 |
+
border: 1px solid #c05621;
|
356 |
+
font-weight: 600;
|
357 |
+
}
|
358 |
+
.plugin-install-required {
|
359 |
+
display: block;
|
360 |
+
font-style: oblique;
|
361 |
+
font-weight: 400;
|
362 |
+
color: #c05621;
|
363 |
+
}
|
364 |
.kadence-required-wrap {
|
365 |
font-weight: bold;
|
366 |
list-style: disc;
|
kadence-starter-templates.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Kadence Starter Templates
|
4 |
* Description: Choose the prebuilt website and click to import.
|
5 |
-
* Version: 1.0.
|
6 |
* Author: Kadence WP
|
7 |
* Author URI: https://kadencewp.com/
|
8 |
* License: GPLv2 or later
|
2 |
/**
|
3 |
* Plugin Name: Kadence Starter Templates
|
4 |
* Description: Choose the prebuilt website and click to import.
|
5 |
+
* Version: 1.0.4
|
6 |
* Author: Kadence WP
|
7 |
* Author URI: https://kadencewp.com/
|
8 |
* License: GPLv2 or later
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: britner
|
3 |
Tags: templates, gutenberg
|
4 |
Requires at least: 5.0
|
5 |
-
Tested up to: 5.5.
|
6 |
-
Stable tag: 1.0.
|
7 |
Requires PHP: 7.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -108,6 +108,10 @@ Absolutely not.
|
|
108 |
|
109 |
== Changelog ==
|
110 |
|
|
|
|
|
|
|
|
|
111 |
= 1.0.3 =
|
112 |
* Fix: Not loading in admin.
|
113 |
|
2 |
Contributors: britner
|
3 |
Tags: templates, gutenberg
|
4 |
Requires at least: 5.0
|
5 |
+
Tested up to: 5.5.1
|
6 |
+
Stable tag: 1.0.4
|
7 |
Requires PHP: 7.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
108 |
|
109 |
== Changelog ==
|
110 |
|
111 |
+
= 1.0.4 =
|
112 |
+
* Add: Customizer import/export (can't be part of Kadence Theme per WordPress review).
|
113 |
+
* Add: New Learn Dash Demo.
|
114 |
+
|
115 |
= 1.0.3 =
|
116 |
* Fix: Not loading in admin.
|
117 |
|