init commit
This commit is contained in:
609
inc/theme-settings/assets/css/settings.css
Normal file
609
inc/theme-settings/assets/css/settings.css
Normal file
@ -0,0 +1,609 @@
|
||||
/*====================================
|
||||
About Page Style
|
||||
====================================*/
|
||||
|
||||
pre.changelog {
|
||||
background-color: #f5f5f5;
|
||||
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(50%, #f5f5f5), color-stop(50%, #e6e6e6));
|
||||
background-image: -webkit-linear-gradient(#f5f5f5 50%, #e6e6e6 50%);
|
||||
background-image: linear-gradient(#f5f5f5 50%, #e6e6e6 50%);
|
||||
background-size: 50px 54.35px;
|
||||
border: 1px solid #d4d4d4;
|
||||
display: block;
|
||||
line-height: 19px;
|
||||
margin-bottom: 10px;
|
||||
overflow: visible;
|
||||
overflow-y: hidden;
|
||||
padding: 0 0 0 4px;
|
||||
font-size: 16px;
|
||||
line-height: 1.7;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
pre.changelog span {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.return-to-dashboard.sophia-after-dark {
|
||||
clear: both;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
p.sophia-after-dark-actions a.skip {
|
||||
opacity: .5;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
td {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.about-wrap {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.about-wrap table td h3 {
|
||||
margin: 15px 20px;
|
||||
padding-left: 20px;
|
||||
text-align: left;
|
||||
font-size: 16px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mt-nav-content-wrap table th h3 {
|
||||
margin: 10px 0;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
table td {
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.wrap table td .dashicons {
|
||||
font-size: 44px;
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wrap table {
|
||||
border: 1px solid #e1e1e1;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.wrap table th {
|
||||
width: 33%;
|
||||
}
|
||||
|
||||
.wrap table th:first-child {
|
||||
background-color: rgba(0, 0, 0, 0.03);
|
||||
}
|
||||
|
||||
.about-wrap table .table-feature-title>h3 {
|
||||
color: #404040;
|
||||
}
|
||||
|
||||
.mt-nav-content-wrap table th {
|
||||
background: #f3f3f3;
|
||||
}
|
||||
|
||||
tr:nth-child(2n) {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
|
||||
.wrap table td span {
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
.wrap table td .dashicons.dashicons-no {
|
||||
color: #CE2D2D;
|
||||
}
|
||||
|
||||
.wrap table td .dashicons.dashicons-yes {
|
||||
color: #24B37E;
|
||||
}
|
||||
|
||||
table tr .btn-wrapper {
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.theme-browser {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.theme-browser .theme .theme-actions,
|
||||
.theme-browser .theme.active .theme-actions {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
top: auto;
|
||||
-webkit-transform: none;
|
||||
transform: none;
|
||||
right: 0;
|
||||
padding: 9px 15px;
|
||||
box-shadow: inset 0 1px 0 rgba(0, 0, 0, .1);
|
||||
}
|
||||
|
||||
.author-credit .theme-version {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.author-credit .author-link a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.author-credit .author-link {
|
||||
margin: 15px 0 25px;
|
||||
color: #72777c;
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* RTL Ready
|
||||
*/
|
||||
|
||||
.rtl .about-wrap .about-text {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.rtl .theme-browser .theme .theme-name,
|
||||
.rtl .theme-browser .theme.active .theme-name {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.rtl .theme-browser .theme.active .theme-name {
|
||||
padding-left: 5%;
|
||||
}
|
||||
|
||||
.rtl .theme-browser .theme.active .theme-actions {
|
||||
left: 90%;
|
||||
}
|
||||
|
||||
.rtl .theme-browser .theme .theme-actions {
|
||||
left: 35%;
|
||||
}
|
||||
|
||||
@media (max-width: 1400px) {
|
||||
.about-wrap h1 {
|
||||
font-size: 30px;
|
||||
}
|
||||
.about-wrap .about-text {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
.about-wrap .about-text {
|
||||
font-size: 14px;
|
||||
}
|
||||
.about-wrap table td h3,
|
||||
.about-wrap table td {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 980px) {
|
||||
.about-wrap h1 {
|
||||
font-size: 25px;
|
||||
}
|
||||
.about-wrap .about-text,
|
||||
.sophia-after-dark-screenshot {
|
||||
float: none;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Welcome new css */
|
||||
|
||||
.mt-clearfix:after {
|
||||
clear: both;
|
||||
content: "";
|
||||
display: block;
|
||||
}
|
||||
|
||||
.mt-theme-info {
|
||||
background: #fff;
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
.mt-welcome-screenshot {
|
||||
width: 42%;
|
||||
float: right;
|
||||
border: 1px solid #e1e1e1;
|
||||
padding: 10px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.welcome-description-wrap {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.about-wrap .mt-about-title {
|
||||
display: block;
|
||||
float: left;
|
||||
width: auto;
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
margin: 0;
|
||||
text-transform: uppercase;
|
||||
vertical-align: middle;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.about-wrap .author-credit {
|
||||
display: block;
|
||||
font-size: 13px;
|
||||
float: right;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.author-credit .author-link {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.about-wrap .about-text {
|
||||
font-size: 14px;
|
||||
margin: 10px 0 0;
|
||||
}
|
||||
|
||||
.about-wrap .mt-nav-tab-content-wrapper .nav-tab-wrapper a {
|
||||
display: block;
|
||||
float: none;
|
||||
}
|
||||
|
||||
.mt-nav-tab-content-wrapper {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.nav-tab-wrapper {
|
||||
width: 18%;
|
||||
padding: 0;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.mt-nav-content-wrap {
|
||||
width: 82%;
|
||||
background: #fff;
|
||||
padding: 0px 40px 30px;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
min-height: 500px;
|
||||
}
|
||||
|
||||
.about-wrap .mt-nav-tab-content-wrapper .nav-tab-wrapper a {
|
||||
display: block;
|
||||
float: none;
|
||||
background: #fff;
|
||||
border: none;
|
||||
padding: 20px 20px;
|
||||
border-top: 1px solid #e1e1e1;
|
||||
border-left: 5px solid transparent;
|
||||
margin-left: 0;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.about-wrap .mt-nav-tab-content-wrapper .nav-tab-wrapper a:first-child {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.about-wrap .mt-nav-tab-content-wrapper .nav-tab-wrapper a.nav-tab.nav-tab-active,
|
||||
.about-wrap .mt-nav-tab-content-wrapper .nav-tab-wrapper a:hover {
|
||||
border-left: 5px solid #0071A1;
|
||||
color: #0071A1;
|
||||
}
|
||||
|
||||
.about-wrap .mt-nav-tab-content-wrapper .nav-tab-wrapper a .dashicons {
|
||||
font-size: 26px;
|
||||
margin: 0 15px 0px 0;
|
||||
vertical-align: top;
|
||||
position: relative;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.about-wrap .theme-features-wrap .two-col {
|
||||
margin-left: -3%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.about-wrap .theme-features-wrap .two-col .col {
|
||||
border: 1px solid #e1e1e1;
|
||||
width: 47%;
|
||||
margin-left: 3%;
|
||||
padding: 20px;
|
||||
margin-right: 0;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.about-wrap .theme-features-wrap .two-col .col h3 {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.mt-theme-demos .mt-each-demo {
|
||||
width: 30.33%;
|
||||
margin-left: 3%;
|
||||
margin-top: 3%;
|
||||
margin-right: 0;
|
||||
box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.mt-demo-pro::after {
|
||||
content: "Premium";
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 0px;
|
||||
background: #B71C1C;
|
||||
width: 90px;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
padding: 8px 0;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.mt-theme-demos .themes {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-left: -3%;
|
||||
}
|
||||
|
||||
.theme-id-container h2 {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
height: 18px;
|
||||
margin: 0;
|
||||
padding: 15px;
|
||||
box-shadow: inset 0 1px 0 rgba(0, 0, 0, .1);
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
background: #F6F6F6;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.theme-id-container .theme-actions {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
top: auto;
|
||||
-webkit-transform: none;
|
||||
transform: none;
|
||||
right: 0;
|
||||
padding: 9px 15px;
|
||||
box-shadow: inset 0 1px 0 rgba(0, 0, 0, .1);
|
||||
}
|
||||
|
||||
.theme-id-container .theme-actions a {
|
||||
display: inline-block;
|
||||
margin: 0 5px;
|
||||
float: none;
|
||||
}
|
||||
|
||||
table tr .btn-wrapper .button {
|
||||
font-size: 16px;
|
||||
padding: 5px 50px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.about-wrap .mt-upgrader-title {
|
||||
margin: 0 0 10px;
|
||||
font-size: 22px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.mt-upgrader-pro {
|
||||
background: #fff;
|
||||
padding: 20px;
|
||||
margin-top: 30px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.mt-upgrade-title-wrap {
|
||||
width: 85%;
|
||||
}
|
||||
|
||||
.mt-upgrader-btn {
|
||||
width: 15%;
|
||||
}
|
||||
|
||||
.wp-core-ui .mt-upgrader-btn a {
|
||||
font-size: 18px;
|
||||
width: 100%;
|
||||
display: block;
|
||||
text-align: center;
|
||||
padding: 10px 0;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.welcome-panel h4 {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.mt-popup-inner-wrap {
|
||||
padding: 4px 30px;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.mt-dashicons-no::before,
|
||||
.mt-dashicons-yes::before {
|
||||
display: inline-block;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
content: '';
|
||||
background-image: url(../images/cross.png);
|
||||
background-size: 30px auto;
|
||||
position: relative;
|
||||
top: -6px;
|
||||
}
|
||||
|
||||
.mt-dashicons-yes::before {
|
||||
background-image: url(../images/tick.png);
|
||||
}
|
||||
|
||||
.theme-features-wrap.welcome-panel {
|
||||
border: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.about-wrap .about-description {
|
||||
margin-top: 0;
|
||||
font-weight: 700;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.about-wrap .theme-features-wrap .two-col .col li {
|
||||
display: inline-block;
|
||||
width: 48%;
|
||||
vertical-align: top;
|
||||
margin: 8px 0;
|
||||
}
|
||||
|
||||
.about-wrap .changelog {
|
||||
background-size: 0;
|
||||
background: #fafafa;
|
||||
border: none;
|
||||
padding: 20px 20px;
|
||||
}
|
||||
|
||||
a.notice-dismiss {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.mt-get-started.updating-message::before {
|
||||
margin-top: 12px !important;
|
||||
}
|
||||
|
||||
.configure-msg {
|
||||
font-weight: 700;
|
||||
font-size: 20px;
|
||||
margin-top: 80px;
|
||||
text-align: center;
|
||||
display: block;
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
.theme-features-wrap.welcome-panel,
|
||||
.theme-features-wrap.welcome-panel::before {
|
||||
background: none;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
@media (max-width: 1400px) {
|
||||
.about-wrap .theme-features-wrap .two-col .col {
|
||||
border: 1px solid #e1e1e1;
|
||||
width: 47%;
|
||||
}
|
||||
.nav-tab-wrapper {
|
||||
width: 20%;
|
||||
}
|
||||
.mt-nav-content-wrap {
|
||||
width: 80%;
|
||||
}
|
||||
.mt-theme-demos .mt-each-demo {
|
||||
width: 47%;
|
||||
}
|
||||
.mt-upgrade-title-wrap {
|
||||
width: 75%;
|
||||
}
|
||||
.mt-upgrader-btn {
|
||||
width: 25%;
|
||||
}
|
||||
.about-wrap .theme-features-wrap .two-col .col li {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
.mt-upgrade-title-wrap {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
.mt-upgrader-btn {
|
||||
margin: 20px auto 0;
|
||||
width: auto;
|
||||
}
|
||||
.wp-core-ui .mt-upgrader-btn a {
|
||||
padding: 8px 20px;
|
||||
}
|
||||
.theme-id-container {
|
||||
position: relative;
|
||||
padding: 10px 0px;
|
||||
background: #F6F6F6;
|
||||
}
|
||||
.theme-id-container h2 {
|
||||
display: block;
|
||||
text-align: center;
|
||||
padding: 10px 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
.theme-id-container .theme-actions {
|
||||
position: static;
|
||||
text-align: center;
|
||||
background: #F6F6F6;
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.mt-theme-demos .mt-each-demo {
|
||||
width: 100%;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.nav-tab-wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
.mt-nav-content-wrap {
|
||||
width: 100%;
|
||||
padding: 0 30px;
|
||||
}
|
||||
.about-wrap .mt-nav-tab-content-wrapper .nav-tab-wrapper a {
|
||||
display: inline-block;
|
||||
margin-right: -4px;
|
||||
font-size: 14px;
|
||||
padding: 12px 10px;
|
||||
border-top: none;
|
||||
border-left: none;
|
||||
border-bottom: 5px solid transparent;
|
||||
}
|
||||
.about-wrap .mt-nav-tab-content-wrapper .nav-tab-wrapper a.nav-tab.nav-tab-active,
|
||||
.about-wrap .mt-nav-tab-content-wrapper .nav-tab-wrapper a:hover {
|
||||
border-left: none;
|
||||
border-bottom: 5px solid #0071A1;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.about-wrap .mt-nav-tab-content-wrapper .nav-tab-wrapper a {
|
||||
font: 0/0 a;
|
||||
}
|
||||
.mt-each-demo.theme:focus .more-details,
|
||||
.mt-each-demo.theme:hover .more-details,
|
||||
.mt-each-demo.theme:not(.active):focus .theme-actions,
|
||||
.mt-each-demo.theme:not(.active):hover .theme-actions {
|
||||
display: block;
|
||||
}
|
||||
.about-wrap .mt-nav-tab-content-wrapper .theme-features-wrap .two-col .col {
|
||||
width: 100%;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.wp-core-ui .mt-upgrader-btn a {
|
||||
padding: 0 20px;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
42
inc/theme-settings/assets/css/theme-review-notice.css
Normal file
42
inc/theme-settings/assets/css/theme-review-notice.css
Normal file
@ -0,0 +1,42 @@
|
||||
.theme-review-notice {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.theme-review-notice .links {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.theme-review-notice .links a {
|
||||
height: auto;
|
||||
padding: 3px 15px;
|
||||
margin-left: 10px;
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
.theme-review-notice .links a .dashicons {
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.theme-review-notice .links a.button-primary {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.theme-review-notice a.notice-dismiss {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#mt-theme-message {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.sophia-after-dark-message-close .notice-dismiss {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
a.notice-dismiss {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.mt-get-started.updating-message::before {
|
||||
margin-top: 12px !important;
|
||||
}
|
BIN
inc/theme-settings/assets/images/cross.png
Normal file
BIN
inc/theme-settings/assets/images/cross.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
BIN
inc/theme-settings/assets/images/tick.png
Normal file
BIN
inc/theme-settings/assets/images/tick.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
53
inc/theme-settings/assets/js/settings.js
Normal file
53
inc/theme-settings/assets/js/settings.js
Normal file
@ -0,0 +1,53 @@
|
||||
/**
|
||||
* Handles event for theme about page.
|
||||
*/
|
||||
|
||||
jQuery(document).ready(function($) {
|
||||
var WpAjaxurl = mtaboutObject.ajax_url;
|
||||
var _wpnonce = mtaboutObject._wpnonce;
|
||||
var action = mtaboutObject.action;
|
||||
|
||||
/**
|
||||
* Popup on click demo import if mysterythemes demo importer plugin is not activated.
|
||||
*/
|
||||
$( '.mtdi-demo-import' ).addClass( 'disabled' );
|
||||
|
||||
switch( action ) {
|
||||
case 'activate' : $( '.mt-activate-demo-import-plugin' ).on( 'click', function() {
|
||||
var _this = $( this );
|
||||
sophia_after_dark_do_plugin( 'activate_demo_importer_plugin', _this );
|
||||
});
|
||||
break;
|
||||
case 'install' : $( '.mt-install-demo-import-plugin' ).on( 'click', function() {
|
||||
var _this = $( this );
|
||||
sophia_after_dark_do_plugin( 'install_demo_importer_plugin', _this );
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
sophia_after_dark_do_plugin = function ( ajax_action, _this ) {
|
||||
$.ajax({
|
||||
method : "POST",
|
||||
url : WpAjaxurl,
|
||||
data : ({
|
||||
'action' : ajax_action,
|
||||
'_wpnonce' : _wpnonce
|
||||
}),
|
||||
beforeSend: function() {
|
||||
var loadingTxt = _this.data( 'process' );
|
||||
_this.addClass( 'updating-message' ).text( loadingTxt );
|
||||
},
|
||||
success: function( response ) {
|
||||
if( response.success ) {
|
||||
var loadedTxt = _this.data( 'done' );
|
||||
_this.removeClass( 'updating-message' ).text( loadedTxt );
|
||||
console.log( response.data.message );
|
||||
} else {
|
||||
console.log( response.data.message );
|
||||
}
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
53
inc/theme-settings/assets/js/theme-review-notice.js
Normal file
53
inc/theme-settings/assets/js/theme-review-notice.js
Normal file
@ -0,0 +1,53 @@
|
||||
jQuery(document).ready(function($) {
|
||||
"use strict";
|
||||
|
||||
var WpAjaxurl = mtaboutObject.ajax_url;
|
||||
var _wpnonce = mtaboutObject._wpnonce;
|
||||
var action = mtaboutObject.action;
|
||||
|
||||
switch( action ) {
|
||||
case 'activate' :
|
||||
$( '#mt-theme-message .mt-get-started' ).on( 'click', function() {
|
||||
var _this = $( this );
|
||||
sophia_after_dark_do_plugin( 'activate_demo_importer_plugin', _this );
|
||||
});
|
||||
break;
|
||||
case 'install' :
|
||||
$( '#mt-theme-message .mt-get-started' ).on( 'click', function() {
|
||||
var _this = $( this );
|
||||
sophia_after_dark_do_plugin( 'install_demo_importer_plugin', _this );
|
||||
});
|
||||
break;
|
||||
case 'redirect' :
|
||||
$( '#mt-theme-message .mt-get-started' ).on( 'click', function() {
|
||||
var _this = $( this );
|
||||
location.href = _this.data( 'redirect' );
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
function sophia_after_dark_do_plugin( ajax_action, _this ) {
|
||||
$.ajax({
|
||||
method : "POST",
|
||||
url : WpAjaxurl,
|
||||
data : ({
|
||||
'action' : ajax_action,
|
||||
'_wpnonce' : _wpnonce
|
||||
}),
|
||||
beforeSend: function() {
|
||||
var loadingTxt = _this.data( 'process' );
|
||||
_this.addClass( 'updating-message' ).text( loadingTxt );
|
||||
},
|
||||
success: function( response ) {
|
||||
if( response.success ) {
|
||||
var loadedTxt = _this.data( 'done' );
|
||||
_this.removeClass( 'updating-message' ).text( loadedTxt );
|
||||
console.log( response.data.message );
|
||||
} else {
|
||||
console.log( response.data.message );
|
||||
}
|
||||
location.href = _this.data( 'redirect' );
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
Reference in New Issue
Block a user