Version Description
- Support fonts import
- Added custom javascript for the login page
- Fixed PHP implode function compatibility
- Minor fixes
=
Download this release
Release Info
Developer | VideoUserManuals |
Plugin | White Label CMS |
Version | 2.1.2 |
Comparing to | |
See all releases |
Code changes from version 2.1.1 to 2.1.2
- assets/css/admin-settings.css +1 -1
- assets/css/admin.css +1 -1
- assets/js/admin-settings.js +1 -1
- assets/js/ays-beforeunload-shim.js +1 -1
- assets/js/jquery-areyousure.js +1 -1
- changelog.txt +33 -1
- includes/Functions.php +14 -1
- includes/classes/Admin_Menus.php +2 -1
- includes/classes/Admin_Script.php +13 -7
- includes/classes/Admin_Settings.php +2 -1
- includes/classes/Login.php +7 -1
- includes/classes/Messages.php +1 -4
- includes/classes/Upgrade.php +1 -0
- readme.txt +6 -35
- view/admin/parts/dashboard-custom-welcome-dashboard-panel.php +12 -0
- view/admin/parts/login-custom-css.php +4 -1
- view/admin/parts/login-custom-js.php +14 -0
- view/admin/parts/login.php +9 -0
- wlcms-plugin.php +2 -2
assets/css/admin-settings.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wlcms_wrapper{max-width:47rem;margin:30px auto 0}.wlcms_wrapper .wlcms_page_title img{padding-right:10px;width:70px;height:auto}.wlcms_wrapper .wlcms-advert-wrapper img{width:100%}.wlcms_wrapper .navigation{width:100%;padding-bottom:20px;padding-top:20px}.wlcms_wrapper .navigation ul{margin:0;padding:0;list-style:none;display:inline-block}.wlcms_wrapper .navigation li{display:inline-block}.wlcms_wrapper .navigation li a{background:none;color:#222;padding:10px 15px;text-decoration:none}.wlcms_wrapper .navigation li a.current{background:#ededed;color:#222;border-bottom:1px solid rgba(2,144,194,.51)}.wlcms_wrapper .navigation li a:active,.wlcms_wrapper .navigation li a:focus{outline:none!important;box-shadow:none}.wlcms_wrapper .navigation li a span{color:rgba(247,46,12,.87)}.wlcms_wrapper .navigation .wlcms-pull-right{float:right;padding-right:10px}.wlcms_wrapper .fixed{position:fixed;background:#f1f1f1;z-index:10000}@media screen and (max-width:550px){.wlcms_wrapper .fixed{position:inherit}}.wlcms_wrapper .wizard-steps li,.wlcms_wrapper .wizard-steps ul{width:100%;display:block}.wizard-step1{padding-top:0!important}.wlcms_wrapper .wlcms-body-header h2{position:relative}.wlcms_wrapper .wlcms-toggle-arrow{width:20px;height:20px;position:relative;cursor:pointer;float:right;text-decoration:none;border-bottom:none;box-shadow:none}.wlcms_wrapper .wlcms-toggle-arrow:after,.wlcms_wrapper .wlcms-toggle-arrow:before{content:"";display:block;width:13px;height:4px;background:#0184ba;position:absolute;top:5px;transition
|
1 |
+
.wlcms_wrapper{max-width:47rem;margin:30px auto 0}.wlcms_wrapper .wlcms_page_title img{padding-right:10px;width:70px;height:auto}.wlcms_wrapper .wlcms-advert-wrapper img{width:100%}.wlcms_wrapper .navigation{width:100%;padding-bottom:20px;padding-top:20px}.wlcms_wrapper .navigation ul{margin:0;padding:0;list-style:none;display:inline-block}.wlcms_wrapper .navigation li{display:inline-block}.wlcms_wrapper .navigation li a{background:none;color:#222;padding:10px 15px;text-decoration:none}.wlcms_wrapper .navigation li a.current{background:#ededed;color:#222;border-bottom:1px solid rgba(2,144,194,.51)}.wlcms_wrapper .navigation li a:active,.wlcms_wrapper .navigation li a:focus{outline:none!important;box-shadow:none}.wlcms_wrapper .navigation li a span{color:rgba(247,46,12,.87)}.wlcms_wrapper .navigation .wlcms-pull-right{float:right;padding-right:10px}.wlcms_wrapper .fixed{position:fixed;background:#f1f1f1;z-index:10000}@media screen and (max-width:550px){.wlcms_wrapper .fixed{position:inherit}}.wlcms_wrapper .wizard-steps li,.wlcms_wrapper .wizard-steps ul{width:100%;display:block}.wizard-step1{padding-top:0!important}.wlcms_wrapper .wlcms-body-header h2{position:relative}.wlcms_wrapper .wlcms-toggle-arrow{width:20px;height:20px;position:relative;cursor:pointer;float:right;text-decoration:none;border-bottom:none;box-shadow:none}.wlcms_wrapper .wlcms-toggle-arrow:after,.wlcms_wrapper .wlcms-toggle-arrow:before{content:"";display:block;width:13px;height:4px;background:#0184ba;position:absolute;top:5px;transition:transform .1s}.wlcms_wrapper .wlcms-toggle-arrow:before{left:0;border-top-left-radius:5px;border-bottom-left-radius:5px;transform:rotate(45deg)}.wlcms_wrapper .wlcms-toggle-arrow:after{transform:rotate(-45deg);right:0}.wlcms_wrapper .wlcms-toggle-arrow.active:before{transform:rotate(-45deg)}.wlcms_wrapper .wlcms-toggle-arrow.active:after{transform:rotate(45deg)}.wlcms_content{width:100%}.wlcms_content label.error{color:rgba(247,46,12,.87);margin-left:10px}.wlcms_content input.error{border:1px solid rgba(247,46,12,.87);box-shadow:inset 0 1px 2px rgba(247,46,12,.44)}.wlcms_content section{display:none}.wlcms_content section.current{display:block}.wlcms_content .sub-fields{padding-left:30px}.wlcms_content .wlcms-body-wrapper{border:1px solid #f1f1f1;margin-bottom:20px;background:#fff}.wlcms_content .wlcms-body-header{padding:16px 24px;border-bottom:1px solid #f1f1f1}.wlcms_content .wlcms-body-header h2{margin:0!important}.wlcms_content .wlcms-body-main{padding:24px}.wlcms-input-group{padding-bottom:10px}.wlcms-input-group label{font-weight:700;display:inline-block;padding-bottom:10px}.wlcms-input-group .wlcms-upload-thumbnail{position:relative;max-width:100px}.wlcms-input-group .wlcms-upload-thumbnail img{display:block;height:auto;max-width:100px;padding-bottom:5px}.wlcms-input-group .wlcms-upload-thumbnail .wlcms-remove-img{position:absolute;top:-10px;left:-10px;width:10px;height:10px;color:#404040;z-index:20;cursor:pointer}.wlcms-input-group .wlcms-upload-thumbnail .wlcms-remove-img:hover{color:#d54e21}.wlcms-input-group .wlcms-input{padding-bottom:10px}.wlcms-input-group .wlcms-help{padding-bottom:10px;font-size:11px}.wlcms-input-group .tab-login{position:relative}.wlcms-input-group .wlcms-login-live-preview{position:absolute}.wlcms-form{position:relative}.wlcms-form .wlcms-menus-settings .wlcms-input{padding-bottom:0}.wlcms-form .wlcms-menus-settings .toggle-label{padding-bottom:5px;padding-top:5px}.wlcms-form input[type=number],.wlcms-form input[type=phone],.wlcms-form input[type=text],.wlcms-form input[type=url]{width:50%;line-height:32px}.wlcms-form input[type=number]{height:40px}.wlcms_admin_wrapper .sub-fields,.wlcms_admin_wrapper .wlcms-input .toggle-label{padding-left:0}.wlcms-other-admins{padding-left:30px}.wlcms-menus-settings>ul{width:75%}.wlcms-input-group li,.wlcms-input-group li .wlcms-input{padding:0}.wlcms-input-group li label.toggle-label{padding-top:5px;padding-bottom:5px!important}.wlcms-toggle-wrapper ul ul{padding-left:30px}.wlcms-toggle{display:none!important}.wlcms-toggle,.wlcms-toggle *,.wlcms-toggle+.wlcms-toggle-btn,.wlcms-toggle:after,.wlcms-toggle :after,.wlcms-toggle:before,.wlcms-toggle :before{box-sizing:border-box}.wlcms-toggle+.wlcms-toggle-btn::-moz-selection,.wlcms-toggle::-moz-selection,.wlcms-toggle ::-moz-selection,.wlcms-toggle:after::-moz-selection,.wlcms-toggle :after::-moz-selection,.wlcms-toggle:before::-moz-selection,.wlcms-toggle :before::-moz-selection{background:none}.wlcms-toggle+.wlcms-toggle-btn::selection,.wlcms-toggle::selection,.wlcms-toggle ::selection,.wlcms-toggle:after::selection,.wlcms-toggle :after::selection,.wlcms-toggle:before::selection,.wlcms-toggle :before::selection{background:none}.wlcms-toggle+.wlcms-toggle-btn{outline:0;width:2em;height:1em;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.wlcms-toggle+.wlcms-toggle-btn:after,.wlcms-toggle+.wlcms-toggle-btn:before{position:relative;display:block;content:"";width:50%;height:100%}.wlcms-toggle+.wlcms-toggle-btn:after{left:0}.wlcms-toggle+.wlcms-toggle-btn:before{display:none}.wlcms-toggle:checked+.wlcms-toggle-btn:after{left:50%}.wlcms-toggle-light+.wlcms-toggle-btn{background:#9e9c9c;border-radius:1em;padding:1px;transition:all .4s ease}.wlcms-toggle-light+.wlcms-toggle-btn:after{border-radius:50%;background:#fff;transition:all .2s ease}.wlcms-toggle-light+.wlcms-toggle-btn.disabled{background-color:hsla(0,1%,61.6%,.1882352941)}.wlcms-toggle-light:checked+.wlcms-toggle-btn{background:#9fd6ae}.wlcms-toggle-light:checked+.wlcms-toggle-btn.disabled{background-color:hsla(0,1%,61.6%,.1882352941)}.wlcms-input-group .textarea-full{width:100%;min-height:300px;padding:10px 10px 10px 20px}.wlcms-input-group .toggle-label{padding-left:10px;padding-top:10px}.wlcms-input-group .toggle-label.disabled{color:rgba(103,102,102,.44)}textarea.wlcms-css{font-family:monospace}.wlcms_footer .wlcms-navigation{width:100%;padding-bottom:20px;padding-top:20px}.wlcms_footer .wlcms-navigation ul{margin:0;padding:0;list-style:none;display:inline-block}.wlcms_footer .wlcms-navigation li{display:inline-block}.wlcms_footer .wlcms-navigation li a{background:none;color:#222;padding:10px 15px}.wlcms_footer .wlcms-navigation li a.current{background:#ededed;color:#222}iframe.long-animate{width:100%;height:100%;position:absolute;border:0;display:none}.wlcms-preview-notice{text-align:center;position:absolute;top:20px;margin:0 auto;left:20px;font-weight:300;font-size:24px;background:rgba(218,217,217,.81);line-height:35px;padding:0 20px;color:#790404}*{margin:0;padding:0;box-sizing:border-box}.short-animate{transition:.5s ease-in-out}.long-animate{transition:.5s ease-in-out .5s}.lightbox{position:fixed;top:-100%;bottom:100%;left:0;right:0;background:rgba(35,40,45,.7);z-index:999990;opacity:0}.lightbox #wlcms-preview-content{position:absolute;margin:auto;top:0;left:0;right:0;bottom:0;max-width:0;max-height:0%}#lightbox-controls{position:fixed;height:70px;width:70px;top:-70px;right:0;z-index:999992;background:rgba(0,0,0,.1)}#close-lightbox{display:block;position:absolute;overflow:hidden;height:50px;width:50px;text-indent:-5000px;right:10px;top:10px;transform:rotate(45deg)}#close-lightbox:before{height:0;width:3px;left:24px;top:0;transition:.5s ease-in-out .5s}#close-lightbox:after,#close-lightbox:before{content:"";display:block;position:absolute;background:#fff;border-radius:2px}#close-lightbox:after{width:0;height:3px;top:24px;left:0;transition:.5s ease-in-out 1s}.lightbox:target{top:0;bottom:0;opacity:1}.lightbox:target #wlcms-preview-content{max-width:100%;max-height:100%}.lightbox:target~#lightbox-controls{top:0}.lightbox:target~#lightbox-controls #close-lightbox:after{width:50px}.lightbox:target~#lightbox-controls #close-lightbox:before{height:50px}
|
assets/css/admin.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.warning-text{color:rgba(240,116,95,.808);display:block}
|
1 |
+
.warning-text{color:rgba(240,116,95,.808);display:block}.not-wlcms-admin .update-plugins,.not-wlcms-admin tr[data-slug*=white-label-cms]{display:none!important}
|
assets/js/admin-settings.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r(r.s=0)}([function(e,t,r){r(1),r(6),e.exports=r(11)},function(e,t){jQuery(document).ready(function(){jQuery(".wlcms-next-step").on("click",function(){jQuery("#wlcms_tab_step-1").hide(),jQuery("#tab-step-1").hide(),jQuery("#wlcms_tab_step-2").show(),jQuery("#tab-step-2").show()}),jQuery(".wlcms-prev-step").on("click",function(){jQuery("#wlcms_tab_step-2").hide(),jQuery("#tab-step-2").hide(),jQuery("#wlcms_tab_step-1").show(),jQuery("#tab-step-1").show()}),jQuery("form.wlcms-form").areYouSure({message:"Changes that you made may not be saved"}),jQuery(".reset-confirm").click(function(){if(0==confirm("Are you sure you want to reset!"))return!1});var e=jQuery(".wlcms_wrapper .navigation"),t=e.offset();function r(e){var t=jQuery(".wlcms-form"),r=t.attr("action");-1!==r.indexOf("#")&&(hash=r.replace(/.*#/,"#"),r=r.replace(/#.*/,"")),t.attr({action:r+"#"+e})}jQuery(window).scroll(function(){var r=jQuery("#wpadminbar").height(),n=t.top-(e.height()+r);jQuery(this).scrollTop()>n?(e.addClass("fixed"),e.css({top:r}).width(jQuery(".wlcms_wrapper").width())):jQuery(this).scrollTop()<=t.top&&e.hasClass("fixed")&&e.removeClass("fixed")}),jQuery(".wlcms-navigation ul li a:not(.wlcms-ignore)").click(function(){var e=jQuery(this).attr("data-tab");jQuery(".wlcms-navigation ul li a").removeClass("current"),jQuery(".tab-content").removeClass("current"),jQuery(this).addClass("current"),jQuery(".wlcms_content section").removeClass("current"),jQuery(".wlcms_content section."+e).addClass("current"),r(e),jQuery("html, body").animate({scrollTop:0},400)});var n=window.location.hash;function i(){jQuery(".wlcms-remove-img").on("click",function(){var e=jQuery(this).parents(".wlcms-input-group");e.find(".wlcms-upload-thumbnail").html(""),e.find(".wlcms-upload-input").val("")})}""!=(n=n.replace("#",""))?(jQuery(".wlcms-navigation ul li a#wlcms_"+n).addClass("current"),jQuery(".wlcms_content section."+n).addClass("current"),r(n)):0==jQuery(".wlcms_content section.current").length&&(jQuery(".wlcms_content section").eq(0).addClass("current"),jQuery(".wlcms-navigation ul li").eq(0).find("a").addClass("current")),jQuery(".wlcms_upload").click(function(){var e=wp.media.editor.send.attachment,t=jQuery(this);return wp.media.editor.send.attachment=function(r,n){var a='<img id="'+n.id+'" src="'+n.url+'" />';a+='<span class="dashicons dashicons-dismiss wlcms-remove-img"></span>',t.parents(".wlcms-input-group").find(".wlcms-upload-thumbnail").html(a),t.parents(".wlcms-input-group").find(".wlcms-upload-input").val(n.url),i(),wp.media.editor.send.attachment=e},wp.media.editor.open(),!1}),i(),jQuery(".wlcms-color-field").wpColorPicker(),jQuery(".wlcms-preview-link").on("click",function(){jQuery("#wlcms-preview-content").html("...");var e=jQuery(".wlcms-form").serialize()+"&action=wlcms_save_login_preview_settings&_ajax_nonce="+wlcms_settings.wlcms_ajax_nonce;jQuery.ajax({type:"post",url:ajaxurl,data:e,success:function(e){jQuery("#wlcms-preview-content").html('<iframe allowtransparency="true" class="long-animate wlcms-preview-iframe" title="Login Preview" onmousewheel="" src="'+wlcms_settings.loginurl+'?wlcms-action=preview&preview_section=login&reauth=1"></iframe>'),jQuery("iframe.wlcms-preview-iframe").load(function(){var e=jQuery(this),t=e.contents();e.slideDown("slow"),t.find("body").prepend('<div style="text-align: center;position: absolute;top: 40px;margin: 0 30%;left: 0;font-weight: 300;font-size: 24px;background: #dad9d9cf;line-height: 35px;padding: 0;color: #790404;width: 40%;">Preview mode</div>'),t.find("form").attr("action","#"),t.find("#wp-submit").attr("type","button"),t.find("a").attr("href","#")})}})}),jQuery(".wlcms-dashboard-preview-link").on("click",function(){jQuery("#wlcms-dashboard-content").html("...");var e=jQuery(".wlcms-form").serialize()+"&action=wlcms_save_dashboard_preview_settings";jQuery.ajax({type:"post",url:ajaxurl,data:e,success:function(e){jQuery("#wlcms-preview-content").html('<iframe allowtransparency="true" class="long-animate wlcms-preview-iframe" title="Preview" onmousewheel="" src="'+wlcms_settings.adminurl+'?wlcms-action=preview&preview_section=dashboard"></iframe>'),jQuery("iframe.wlcms-preview-iframe").load(function(){var e=jQuery(this),t=e.contents();e.slideDown("slow"),t.find("body").prepend('<div style="text-align: center;position: absolute;top: 40px;margin: 0 30%;font-weight: 300;font-size: 24px;background: #dad9d9cf;line-height: 35px;padding: 0 20px;color: #790404;width: 40%;z-index:999999">Preview mode</div>'),t.find("a").each(function(){jQuery(this).attr("href","#")})})}})}),jQuery(".wlcms-select2").select2({width:"100%",placeholder:"Select"})}),jQuery.validator.addMethod("feedurl",function(e,t){return this.optional(t)||/^(?:(?:(?:https?|ftp|feed):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[
|
1 |
+
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r(r.s=0)}([function(e,t,r){r(1),r(6),e.exports=r(11)},function(e,t){jQuery(document).ready((function(){jQuery(".wlcms-next-step").on("click",(function(){jQuery("#wlcms_tab_step-1").hide(),jQuery("#tab-step-1").hide(),jQuery("#wlcms_tab_step-2").show(),jQuery("#tab-step-2").show()})),jQuery(".wlcms-prev-step").on("click",(function(){jQuery("#wlcms_tab_step-2").hide(),jQuery("#tab-step-2").hide(),jQuery("#wlcms_tab_step-1").show(),jQuery("#tab-step-1").show()})),jQuery("form.wlcms-form").areYouSure({message:"Changes that you made may not be saved"}),jQuery(".reset-confirm").click((function(){if(0==confirm("Are you sure you want to reset!"))return!1}));var e=jQuery(".wlcms_wrapper .navigation"),t=e.offset();function r(e){var t=jQuery(".wlcms-form"),r=t.attr("action");-1!==r.indexOf("#")&&(hash=r.replace(/.*#/,"#"),r=r.replace(/#.*/,"")),t.attr({action:r+"#"+e})}jQuery(window).scroll((function(){var r=jQuery("#wpadminbar").height(),n=t.top-(e.height()+r);jQuery(this).scrollTop()>n?(e.addClass("fixed"),e.css({top:r}).width(jQuery(".wlcms_wrapper").width())):jQuery(this).scrollTop()<=t.top&&e.hasClass("fixed")&&e.removeClass("fixed")})),jQuery(".wlcms-navigation ul li a:not(.wlcms-ignore)").click((function(){var e=jQuery(this).attr("data-tab");jQuery(".wlcms-navigation ul li a").removeClass("current"),jQuery(".tab-content").removeClass("current"),jQuery(this).addClass("current"),jQuery(".wlcms_content section").removeClass("current"),jQuery(".wlcms_content section."+e).addClass("current"),r(e),jQuery("html, body").animate({scrollTop:0},400)}));var n=window.location.hash;function i(){jQuery(".wlcms-remove-img").on("click",(function(){var e=jQuery(this).parents(".wlcms-input-group");e.find(".wlcms-upload-thumbnail").html(""),e.find(".wlcms-upload-input").val("")}))}""!=(n=n.replace("#",""))?(jQuery(".wlcms-navigation ul li a#wlcms_"+n).addClass("current"),jQuery(".wlcms_content section."+n).addClass("current"),r(n)):0==jQuery(".wlcms_content section.current").length&&(jQuery(".wlcms_content section").eq(0).addClass("current"),jQuery(".wlcms-navigation ul li").eq(0).find("a").addClass("current")),jQuery(".wlcms_upload").click((function(){var e=wp.media.editor.send.attachment,t=jQuery(this);return wp.media.editor.send.attachment=function(r,n){var a='<img id="'+n.id+'" src="'+n.url+'" />';a+='<span class="dashicons dashicons-dismiss wlcms-remove-img"></span>',t.parents(".wlcms-input-group").find(".wlcms-upload-thumbnail").html(a),t.parents(".wlcms-input-group").find(".wlcms-upload-input").val(n.url),i(),wp.media.editor.send.attachment=e},wp.media.editor.open(),!1})),i(),jQuery(".wlcms-color-field").wpColorPicker(),jQuery(".wlcms-preview-link").on("click",(function(){jQuery("#wlcms-preview-content").html("...");var e=jQuery(".wlcms-form").serialize()+"&action=wlcms_save_login_preview_settings&_ajax_nonce="+wlcms_settings.wlcms_ajax_nonce;jQuery.ajax({type:"post",url:ajaxurl,data:e,success:function(e){jQuery("#wlcms-preview-content").html('<iframe allowtransparency="true" class="long-animate wlcms-preview-iframe" title="Login Preview" onmousewheel="" src="'+wlcms_settings.loginurl+'?wlcms-action=preview&preview_section=login&reauth=1"></iframe>'),jQuery("iframe.wlcms-preview-iframe").load((function(){var e=jQuery(this),t=e.contents();e.slideDown("slow"),t.find("body").prepend('<div style="text-align: center;position: absolute;top: 40px;margin: 0 30%;left: 0;font-weight: 300;font-size: 24px;background: #dad9d9cf;line-height: 35px;padding: 0;color: #790404;width: 40%;">Preview mode</div>'),t.find("form").attr("action","#"),t.find("#wp-submit").attr("type","button"),t.find("a").attr("href","#")}))}})})),jQuery(".wlcms-dashboard-preview-link").on("click",(function(){jQuery("#wlcms-dashboard-content").html("...");var e=jQuery(".wlcms-form").serialize()+"&action=wlcms_save_dashboard_preview_settings";jQuery.ajax({type:"post",url:ajaxurl,data:e,success:function(e){jQuery("#wlcms-preview-content").html('<iframe allowtransparency="true" class="long-animate wlcms-preview-iframe" title="Preview" onmousewheel="" src="'+wlcms_settings.adminurl+'?wlcms-action=preview&preview_section=dashboard"></iframe>'),jQuery("iframe.wlcms-preview-iframe").load((function(){var e=jQuery(this),t=e.contents();e.slideDown("slow"),t.find("body").prepend('<div style="text-align: center;position: absolute;top: 40px;margin: 0 30%;font-weight: 300;font-size: 24px;background: #dad9d9cf;line-height: 35px;padding: 0 20px;color: #790404;width: 40%;z-index:999999">Preview mode</div>'),t.find("a").each((function(){jQuery(this).attr("href","#")}))}))}})})),jQuery(".wlcms-select2").select2({width:"100%",placeholder:"Select"})})),jQuery.validator.addMethod("feedurl",(function(e,t){return this.optional(t)||/^(?:(?:(?:https?|ftp|feed):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(e)}),"Please use a valid URL"),jQuery.validator.messages.url="Please use a valid URL",jQuery(document).ready((function(){jQuery('.main-toggle[type="checkbox"]').change((function(e){var t=jQuery(this).prop("checked"),r=jQuery(this).attr("data-revised"),n=jQuery(this).parents(".toggle-group").find(".sub-fields");n.length&&(t&&"1"!=r&&n.find('input[type="checkbox"]:checked').length==n.find('input[type="checkbox"]').length||!t&&"1"==r?n.hide():n.show())})).trigger("change"),jQuery(".wlcms-toggle-arrow").on("click",(function(){jQuery(this).toggleClass("active"),jQuery(this).next("ul").slideToggle()})),jQuery("#enable_wlcms_admin").on("change",(function(){jQuery(this).is(":checked")?jQuery(".menu-admin-wrapper").show():jQuery(".menu-admin-wrapper").hide()})).trigger("change"),jQuery(".enable_welcome_for_all_roles").on("change",(function(){var e=jQuery("#select_user_roles"+jQuery(this).data("section"));jQuery(this).is(":checked")?e.hide():e.show()})).trigger("change"),jQuery('.wlcms-toggle[type="checkbox"]').change((function(e){var t=jQuery(this).prop("checked"),r=jQuery(this).parent();r.siblings();r.find('input[type="checkbox"]').prop({checked:t}),function e(r){var n=r.parent().parent(),i=!0;if(r.siblings().each((function(){return i=jQuery(this).children('input[type="checkbox"]').prop("checked")===t})),i&&t)n.children('input[type="checkbox"]').prop({checked:t}),e(n);else if(i&&!t)n.children('input[type="checkbox"]').prop("checked",t),n.children('input[type="checkbox"]').prop("indeterminate",n.find('input[type="checkbox"]:checked').length>0),e(n);else{var a=!0;r.parents("li").children('input[type="checkbox"]').hasClass("main-toggle-reverse")&&(a=!1),r.parents("li").children('input[type="checkbox"]').prop({checked:a})}}(r)})),jQuery(".wlcms-menus-settings > ul > li").each((function(){jQuery(this).find('input[type="checkbox"]:checked').length==jQuery(this).find('input[type="checkbox"]').length?jQuery(this).find("ul.sub_menu_wrapper").hide():jQuery(this).find("ul.sub_menu_wrapper").show()}));jQuery(".wlcms-form").validate({ignore:".ignore",rules:{rss_feed_address:{required:!1,feedurl:!0}},invalidHandler:function(e,t){var r=t.errorList;jQuery(".wlcms-navigation ul li span").remove();var n=[];for(i=0;i<r.length;i++){var a=r[i].element,s=jQuery(a).closest("section").attr("id");-1===n.indexOf(s)&&n.push(s),console.log(s)}for(i=0;i<n.length;i++)jQuery(".wlcms-navigation ul li a#wlcms_tab-"+n[i]).append('<span class="dashicons dashicons-no-alt"></span>');var c=t.numberOfInvalids();if(c){var o=1==c?"You missed 1 field. It has been highlighted":"You missed "+c+" fields. They have been highlighted";jQuery("div.wlcms_messages span").html(o),jQuery("div.wlcms_messages").show()}else jQuery("div.wlcms_messages").hide()}});jQuery(".template_type").on("change",(function(){var e=jQuery(this).data("template_type"),t=jQuery(".template_type"+e).filter(":checked"),r=t.data("page_type");"html"==t.val()?(jQuery(".welcome-basicHtml"+e).show(),jQuery(".welcome-page"+e).hide()):(jQuery(".welcome-basicHtml"+e).hide(),jQuery(".welcome-page"+e).show(),"beaver"==r?(jQuery(".beaver_page"+e).next().show(),jQuery(".elementor_page"+e).next().hide()):(jQuery(".beaver_page"+e).next().hide(),jQuery(".elementor_page"+e).next().show()))})),jQuery(".template_type").trigger("change"),jQuery("form.wlcms-advert").on("submit",(function(){var e=jQuery("#ad-authorize").is(":checked"),t=jQuery("#inf_custom_GDPR");t.val(e+" "+t.data("date"))}))}))},,,,,function(e,t){},,,,,function(e,t){}]);
|
assets/js/ays-beforeunload-shim.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r(r.s=4)}({4:function(e,t,r){e.exports=r(5)},5:function(e,t){jQuery(function(){navigator.userAgent.toLowerCase().match(/iphone|ipad|ipod|opera/)&&$("a").bind("click",function(e){var t=$(e.target).closest("a").attr("href");if(void 0!==t&&!t.match(/^#/)&&""!=t.trim()){var r=$(window).triggerHandler("beforeunload",r);if(r&&""!=r)if(!confirm(r+"\n\nPress OK to leave this page or Cancel to stay."))return!1;return window.location.href=t,!1}})})}});
|
1 |
+
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r(r.s=4)}({4:function(e,t,r){e.exports=r(5)},5:function(e,t){jQuery((function(){navigator.userAgent.toLowerCase().match(/iphone|ipad|ipod|opera/)&&$("a").bind("click",(function(e){var t=$(e.target).closest("a").attr("href");if(void 0!==t&&!t.match(/^#/)&&""!=t.trim()){var r=$(window).triggerHandler("beforeunload",r);if(r&&""!=r)if(!confirm(r+"\n\nPress OK to leave this page or Cancel to stay."))return!1;return window.location.href=t,!1}}))}))}});
|
assets/js/jquery-areyousure.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r(r.s=2)}([,,function(e,t,r){e.exports=r(3)},function(e,t){var r;(r=jQuery).fn.areYouSure=function(e){var t=r.extend({message:"You have unsaved changes!",dirtyClass:"dirty",change:null,silent:!1,addRemoveFieldsMarksDirty:!1,fieldEvents:"change keyup propertychange input",fieldSelector:":input:not(input[type=submit]):not(input[type=button])"},e),n=function(e){if(e.hasClass("ays-ignore")||e.hasClass("aysIgnore")||e.attr("data-ays-ignore")||void 0===e.attr("name"))return null;if(e.is(":disabled"))return"ays-disabled";var t,n=e.attr("type");switch(e.is("select")&&(n="select"),n){case"checkbox":case"radio":t=e.is(":checked");break;case"select":t="",e.find("option").each(function(e){var n=r(this);n.is(":selected")&&(t+=n.val())});break;default:t=e.val()}return t},i=function(e){e.data("ays-orig",n(e))},a=function(e){var i=function(e){var t=e.data("ays-orig");return void 0!==t&&n(e)!=t},a=r(this).is("form")?r(this):r(this).parents("form");if(i(r(e.target)))s(a,!0);else{if($fields=a.find(t.fieldSelector),t.addRemoveFieldsMarksDirty&&a.data("ays-orig-field-count")!=$fields.length)return void s(a,!0);var o=!1;$fields.each(function(){if($field=r(this),i($field))return o=!0,!1}),s(a,o)}},o=function(e){var n=e.find(t.fieldSelector);r(n).each(function(){i(r(this))}),r(n).unbind(t.fieldEvents,a),r(n).bind(t.fieldEvents,a),e.data("ays-orig-field-count",r(n).length),s(e,!1)},s=function(e,r){var n=r!=e.hasClass(t.dirtyClass);e.toggleClass(t.dirtyClass,r),n&&(t.change&&t.change.call(e,e),r&&e.trigger("dirty.areYouSure",[e]),r||e.trigger("clean.areYouSure",[e]),e.trigger("change.areYouSure",[e]))},u=function(){var e=r(this),n=e.find(t.fieldSelector);r(n).each(function(){var e=r(this);e.data("ays-orig")||(i(e),e.bind(t.fieldEvents,a))}),e.trigger("checkform.areYouSure")},d=function(){o(r(this))};return t.silent||window.aysUnloadSet||(window.aysUnloadSet=!0,r(window).bind("beforeunload",function(){if($dirtyForms=r("form").filter("."+t.dirtyClass),0!=$dirtyForms.length){if(navigator.userAgent.toLowerCase().match(/msie|chrome/)){if(window.aysHasPrompted)return;window.aysHasPrompted=!0,window.setTimeout(function(){window.aysHasPrompted=!1},900)}return t.message}})),this.each(function(e){if(r(this).is("form")){var n=r(this);n.submit(function(){n.removeClass(t.dirtyClass)}),n.bind("reset",function(){s(n,!1)}),n.bind("rescan.areYouSure",u),n.bind("reinitialize.areYouSure",d),n.bind("checkform.areYouSure",a),o(n)}})}}]);
|
1 |
+
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r(r.s=2)}([,,function(e,t,r){e.exports=r(3)},function(e,t){var r;(r=jQuery).fn.areYouSure=function(e){var t=r.extend({message:"You have unsaved changes!",dirtyClass:"dirty",change:null,silent:!1,addRemoveFieldsMarksDirty:!1,fieldEvents:"change keyup propertychange input",fieldSelector:":input:not(input[type=submit]):not(input[type=button])"},e),n=function(e){if(e.hasClass("ays-ignore")||e.hasClass("aysIgnore")||e.attr("data-ays-ignore")||void 0===e.attr("name"))return null;if(e.is(":disabled"))return"ays-disabled";var t,n=e.attr("type");switch(e.is("select")&&(n="select"),n){case"checkbox":case"radio":t=e.is(":checked");break;case"select":t="",e.find("option").each((function(e){var n=r(this);n.is(":selected")&&(t+=n.val())}));break;default:t=e.val()}return t},i=function(e){e.data("ays-orig",n(e))},a=function(e){var i=function(e){var t=e.data("ays-orig");return void 0!==t&&n(e)!=t},a=r(this).is("form")?r(this):r(this).parents("form");if(i(r(e.target)))s(a,!0);else{if($fields=a.find(t.fieldSelector),t.addRemoveFieldsMarksDirty&&a.data("ays-orig-field-count")!=$fields.length)return void s(a,!0);var o=!1;$fields.each((function(){if($field=r(this),i($field))return o=!0,!1})),s(a,o)}},o=function(e){var n=e.find(t.fieldSelector);r(n).each((function(){i(r(this))})),r(n).unbind(t.fieldEvents,a),r(n).bind(t.fieldEvents,a),e.data("ays-orig-field-count",r(n).length),s(e,!1)},s=function(e,r){var n=r!=e.hasClass(t.dirtyClass);e.toggleClass(t.dirtyClass,r),n&&(t.change&&t.change.call(e,e),r&&e.trigger("dirty.areYouSure",[e]),r||e.trigger("clean.areYouSure",[e]),e.trigger("change.areYouSure",[e]))},u=function(){var e=r(this),n=e.find(t.fieldSelector);r(n).each((function(){var e=r(this);e.data("ays-orig")||(i(e),e.bind(t.fieldEvents,a))})),e.trigger("checkform.areYouSure")},d=function(){o(r(this))};return t.silent||window.aysUnloadSet||(window.aysUnloadSet=!0,r(window).bind("beforeunload",(function(){if($dirtyForms=r("form").filter("."+t.dirtyClass),0!=$dirtyForms.length){if(navigator.userAgent.toLowerCase().match(/msie|chrome/)){if(window.aysHasPrompted)return;window.aysHasPrompted=!0,window.setTimeout((function(){window.aysHasPrompted=!1}),900)}return t.message}}))),this.each((function(e){if(r(this).is("form")){var n=r(this);n.submit((function(){n.removeClass(t.dirtyClass)})),n.bind("reset",(function(){s(n,!1)})),n.bind("rescan.areYouSure",u),n.bind("reinitialize.areYouSure",d),n.bind("checkform.areYouSure",a),o(n)}}))}}]);
|
changelog.txt
CHANGED
@@ -1,7 +1,39 @@
|
|
1 |
== Changelog ==
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 2.0 =
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
= 1.6.4 =
|
7 |
Update images directory
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 2.1.1 =
|
4 |
+
* Fixed Dashboard for Beaver Builder margin and padding
|
5 |
+
|
6 |
+
= 2.1 =
|
7 |
+
* Support Internationalization
|
8 |
+
* Added a body class to differentiate WLCMS Admin or not, by adding body.not-wlcms-admin or and body.wlcms-admin
|
9 |
+
* Minor fixes
|
10 |
+
|
11 |
+
= 2.0.2.2 =
|
12 |
+
* Use space to remove howdy
|
13 |
+
* Change login logo url if custom logo setup
|
14 |
+
* Moved wlcms style to header
|
15 |
+
* Hiding Dashboard widgets can now configured by user role
|
16 |
+
* Minor fixes
|
17 |
+
|
18 |
+
= 2.0.2.1 =
|
19 |
+
|
20 |
+
* Bug fixed involving object cache which is causing redirect loop
|
21 |
+
* Fixed unable to upgrade themes and plugins
|
22 |
+
* Fixed legacy custom welcome dashboard
|
23 |
+
* Fixed legacy import
|
24 |
+
* Minor fixes
|
25 |
+
|
26 |
= 2.0 =
|
27 |
+
|
28 |
+
**Major Enhancements**
|
29 |
+
* Re-designed Setting form
|
30 |
+
* Added a wizard setting
|
31 |
+
* Added Side Menu logo
|
32 |
+
* Added more design control on the login form
|
33 |
+
* Login live preview
|
34 |
+
* Custom Welcome Panel now supports Elementor and Beaver Builder Pro Templates
|
35 |
+
* Revised menus system visibility
|
36 |
+
* Added Hide Front-end Admin Bar
|
37 |
|
38 |
= 1.6.4 =
|
39 |
Update images directory
|
includes/Functions.php
CHANGED
@@ -87,6 +87,19 @@ if (!function_exists('wlcms_add_js')) {
|
|
87 |
wlcms()->Admin_Script()->appendJs($js);
|
88 |
}
|
89 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
if (!function_exists('is_wlcms_admin')) {
|
91 |
function is_wlcms_admin()
|
92 |
{
|
@@ -285,4 +298,4 @@ if (isset($_GET['preview_section']) && $_GET['preview_section'] == 'login') {
|
|
285 |
return;
|
286 |
}
|
287 |
}
|
288 |
-
}
|
87 |
wlcms()->Admin_Script()->appendJs($js);
|
88 |
}
|
89 |
}
|
90 |
+
|
91 |
+
if (!function_exists('is_wlcms_super_admin')) {
|
92 |
+
function is_wlcms_super_admin()
|
93 |
+
{
|
94 |
+
if( ! current_user_can( 'install_plugins' ) ) return false;
|
95 |
+
|
96 |
+
$enable_wlcms_admin = (bool) wlcms_field_setting('enable_wlcms_admin');
|
97 |
+
if( ! is_wlcms_admin() && $enable_wlcms_admin ) return false;
|
98 |
+
|
99 |
+
return true;
|
100 |
+
}
|
101 |
+
}
|
102 |
+
|
103 |
if (!function_exists('is_wlcms_admin')) {
|
104 |
function is_wlcms_admin()
|
105 |
{
|
298 |
return;
|
299 |
}
|
300 |
}
|
301 |
+
}
|
includes/classes/Admin_Menus.php
CHANGED
@@ -425,7 +425,8 @@ class WLCMS_Admin_Menus
|
|
425 |
if (is_array($flat) && $flat > 0) :
|
426 |
foreach ($flat as $a) {
|
427 |
if ($this->excluded_admin_menu($a->id)) continue;
|
428 |
-
$
|
|
|
429 |
}
|
430 |
$sub_root = isset($parents[$root]) ? $parents[$root] : array();
|
431 |
endif;
|
425 |
if (is_array($flat) && $flat > 0) :
|
426 |
foreach ($flat as $a) {
|
427 |
if ($this->excluded_admin_menu($a->id)) continue;
|
428 |
+
$menu_parent = ($a->parent == '') ? false : $a->parent;
|
429 |
+
$parents[$menu_parent][] = $a;
|
430 |
}
|
431 |
$sub_root = isset($parents[$root]) ? $parents[$root] : array();
|
432 |
endif;
|
includes/classes/Admin_Script.php
CHANGED
@@ -4,6 +4,7 @@ class WLCMS_Admin_Script
|
|
4 |
{
|
5 |
|
6 |
private $css = array();
|
|
|
7 |
private $bulk_css = array();
|
8 |
private $hidded_elements = array();
|
9 |
private $js = array();
|
@@ -24,9 +25,10 @@ class WLCMS_Admin_Script
|
|
24 |
if (!is_user_logged_in()) {
|
25 |
return;
|
26 |
}
|
|
|
27 |
$scripts = "<!-- WLCMS Style-->\n";
|
28 |
-
if (count($this->css) || count($this->hidded_elements) || count($this->bulk_css)) {
|
29 |
-
$scripts .= sprintf('<style type="text/css">%s %s</style>', $this->compileCss(), $this->additional_css);
|
30 |
}
|
31 |
$scripts .= "\n<!-- WLCMS End Style-->";
|
32 |
echo $scripts;
|
@@ -74,15 +76,15 @@ class WLCMS_Admin_Script
|
|
74 |
|
75 |
private function _setHiddenCss()
|
76 |
{
|
77 |
-
$hidden = implode($this->hidded_elements
|
78 |
if (!empty($hidden)) {
|
79 |
-
$this->setCss($hidden, array('display' => 'none'));
|
80 |
}
|
81 |
}
|
82 |
|
83 |
private function _setBulkCss()
|
84 |
{
|
85 |
-
return implode($this->bulk_css
|
86 |
}
|
87 |
|
88 |
public function appendJs($js)
|
@@ -92,14 +94,18 @@ class WLCMS_Admin_Script
|
|
92 |
|
93 |
function compileJs()
|
94 |
{
|
95 |
-
return implode($this->js
|
96 |
}
|
97 |
|
|
|
|
|
|
|
|
|
98 |
function compileCss()
|
99 |
{
|
100 |
$this->_setHiddenCss();
|
101 |
|
102 |
-
if (!count($this->css)) {
|
103 |
return;
|
104 |
}
|
105 |
|
4 |
{
|
5 |
|
6 |
private $css = array();
|
7 |
+
private $admin_css = '';
|
8 |
private $bulk_css = array();
|
9 |
private $hidded_elements = array();
|
10 |
private $js = array();
|
25 |
if (!is_user_logged_in()) {
|
26 |
return;
|
27 |
}
|
28 |
+
|
29 |
$scripts = "<!-- WLCMS Style-->\n";
|
30 |
+
if (count($this->css) || count($this->hidded_elements) || count($this->bulk_css) || !empty($this->admin_css) ) {
|
31 |
+
$scripts .= sprintf('<style type="text/css">%s %s %s</style>', $this->admin_css, $this->compileCss(), $this->additional_css);
|
32 |
}
|
33 |
$scripts .= "\n<!-- WLCMS End Style-->";
|
34 |
echo $scripts;
|
76 |
|
77 |
private function _setHiddenCss()
|
78 |
{
|
79 |
+
$hidden = implode(',', $this->hidded_elements);
|
80 |
if (!empty($hidden)) {
|
81 |
+
$this->setCss($hidden, array('display' => 'none!important'));
|
82 |
}
|
83 |
}
|
84 |
|
85 |
private function _setBulkCss()
|
86 |
{
|
87 |
+
return implode('', $this->bulk_css);
|
88 |
}
|
89 |
|
90 |
public function appendJs($js)
|
94 |
|
95 |
function compileJs()
|
96 |
{
|
97 |
+
return implode('', $this->js);
|
98 |
}
|
99 |
|
100 |
+
function appendAdminCss($admin_css)
|
101 |
+
{
|
102 |
+
$this->admin_css = $admin_css;
|
103 |
+
}
|
104 |
function compileCss()
|
105 |
{
|
106 |
$this->_setHiddenCss();
|
107 |
|
108 |
+
if (!count($this->css) && !$this->bulk_css) {
|
109 |
return;
|
110 |
}
|
111 |
|
includes/classes/Admin_Settings.php
CHANGED
@@ -61,11 +61,12 @@ class WLCMS_Admin_Settings
|
|
61 |
|
62 |
private function set_admin_css()
|
63 |
{
|
|
|
64 |
if (!$admin_style = wlcms_field_setting('settings_custom_css_admin')) {
|
65 |
return;
|
66 |
}
|
67 |
|
68 |
-
wlcms()->Admin_Script()->
|
69 |
|
70 |
}
|
71 |
|
61 |
|
62 |
private function set_admin_css()
|
63 |
{
|
64 |
+
|
65 |
if (!$admin_style = wlcms_field_setting('settings_custom_css_admin')) {
|
66 |
return;
|
67 |
}
|
68 |
|
69 |
+
wlcms()->Admin_Script()->appendAdminCss($admin_style);
|
70 |
|
71 |
}
|
72 |
|
includes/classes/Login.php
CHANGED
@@ -46,6 +46,7 @@ class WLCMS_Login extends WLCMS_Previewable
|
|
46 |
|
47 |
echo '<script>';
|
48 |
echo 'jQuery(document).ready(function(){';
|
|
|
49 |
echo $this->get_js();
|
50 |
echo '});';
|
51 |
echo '</script>';
|
@@ -237,6 +238,10 @@ class WLCMS_Login extends WLCMS_Previewable
|
|
237 |
return $this->get_settings('login_custom_css');
|
238 |
}
|
239 |
|
|
|
|
|
|
|
|
|
240 |
public function settings()
|
241 |
{
|
242 |
if ($this->saving_preview_section() == 'wizard') {
|
@@ -291,7 +296,8 @@ class WLCMS_Login extends WLCMS_Previewable
|
|
291 |
'back_to_register_link_hover_color' => '',
|
292 |
'privacy_policy_link_color' => '',
|
293 |
'privacy_policy_link_hover_color' => '',
|
294 |
-
'login_custom_css' => ''
|
|
|
295 |
);
|
296 |
|
297 |
return array_merge($settings, $this->wizard_settings());
|
46 |
|
47 |
echo '<script>';
|
48 |
echo 'jQuery(document).ready(function(){';
|
49 |
+
echo $this->set_custom_login_js();
|
50 |
echo $this->get_js();
|
51 |
echo '});';
|
52 |
echo '</script>';
|
238 |
return $this->get_settings('login_custom_css');
|
239 |
}
|
240 |
|
241 |
+
private function set_custom_login_js()
|
242 |
+
{
|
243 |
+
return $this->get_settings('login_custom_js');
|
244 |
+
}
|
245 |
public function settings()
|
246 |
{
|
247 |
if ($this->saving_preview_section() == 'wizard') {
|
296 |
'back_to_register_link_hover_color' => '',
|
297 |
'privacy_policy_link_color' => '',
|
298 |
'privacy_policy_link_hover_color' => '',
|
299 |
+
'login_custom_css' => '',
|
300 |
+
'login_custom_js' => ''
|
301 |
);
|
302 |
|
303 |
return array_merge($settings, $this->wizard_settings());
|
includes/classes/Messages.php
CHANGED
@@ -27,7 +27,6 @@ class WLCMS_Messages
|
|
27 |
|
28 |
$errors = "";
|
29 |
if (is_array($group_messages)) {
|
30 |
-
|
31 |
foreach ($group_messages as $class => $messages) {
|
32 |
$errors .= '<div class="notice notice-' . $class . ' is-dismissible"">';
|
33 |
foreach ($messages as $message) {
|
@@ -49,6 +48,4 @@ if (class_exists('WLCMS_Messages') && !function_exists('WLCMS_Queue')) {
|
|
49 |
{
|
50 |
WLCMS_Messages::queue($message, $class);
|
51 |
}
|
52 |
-
}
|
53 |
-
|
54 |
-
add_action('admin_notices', array('WLCMS_Messages', 'show'));
|
27 |
|
28 |
$errors = "";
|
29 |
if (is_array($group_messages)) {
|
|
|
30 |
foreach ($group_messages as $class => $messages) {
|
31 |
$errors .= '<div class="notice notice-' . $class . ' is-dismissible"">';
|
32 |
foreach ($messages as $message) {
|
48 |
{
|
49 |
WLCMS_Messages::queue($message, $class);
|
50 |
}
|
51 |
+
}
|
|
|
|
includes/classes/Upgrade.php
CHANGED
@@ -344,6 +344,7 @@ class WLCMS_Upgrades
|
|
344 |
'retina_login_logo' => 'wlcms_o_login_custom_logo',
|
345 |
'background_color' => 'wlcms_o_loginbg_white',
|
346 |
'login_custom_css' => 'wlcms_o_login_bg_css',
|
|
|
347 |
'dashboard_icon' => 'wlcms_o_header_custom_logo',
|
348 |
'dashboard_title' => 'wlcms_o_dashboard_override',
|
349 |
'hide_all_dashboard_panels' => 'wlcms_o_dashboard_others',
|
344 |
'retina_login_logo' => 'wlcms_o_login_custom_logo',
|
345 |
'background_color' => 'wlcms_o_loginbg_white',
|
346 |
'login_custom_css' => 'wlcms_o_login_bg_css',
|
347 |
+
'login_custom_js' => 'wlcms_o_login_bg_js',
|
348 |
'dashboard_icon' => 'wlcms_o_header_custom_logo',
|
349 |
'dashboard_title' => 'wlcms_o_dashboard_override',
|
350 |
'hide_all_dashboard_panels' => 'wlcms_o_dashboard_others',
|
readme.txt
CHANGED
@@ -8,8 +8,8 @@ Author URI: http://www.videousermanuals.com/?utm_campaign=wlcms&utm_medium=plugi
|
|
8 |
Author: Video User Manuals
|
9 |
Requires at least: 3.3
|
10 |
Requires PHP: 5.4
|
11 |
-
Tested up to: 5.
|
12 |
-
Stable tag: 2.1.
|
13 |
|
14 |
Customise dashboard panels and branding, hide menus plus lots more.
|
15 |
|
@@ -66,41 +66,12 @@ There is so much that you can do with White Label CMS, but we want the experienc
|
|
66 |
|
67 |
== Changelog ==
|
68 |
|
69 |
-
= 2.1.
|
70 |
-
*
|
71 |
-
|
72 |
-
|
73 |
-
* Support Internationalization
|
74 |
-
* Added a body class to differentiate WLCMS Admin or not, by adding body.not-wlcms-admin or and body.wlcms-admin
|
75 |
-
* Minor fixes
|
76 |
-
|
77 |
-
= 2.0.2.2 =
|
78 |
-
* Use space to remove howdy
|
79 |
-
* Change login logo url if custom logo setup
|
80 |
-
* Moved wlcms style to header
|
81 |
-
* Hiding Dashboard widgets can now configured by user role
|
82 |
* Minor fixes
|
83 |
|
84 |
-
= 2.0.2.1 =
|
85 |
-
|
86 |
-
* Bug fixed involving object cache which is causing redirect loop
|
87 |
-
* Fixed unable to upgrade themes and plugins
|
88 |
-
* Fixed legacy custom welcome dashboard
|
89 |
-
* Fixed legacy import
|
90 |
-
* Minor fixes
|
91 |
-
|
92 |
-
= 2.0 =
|
93 |
-
|
94 |
-
**Major Enhancements**
|
95 |
-
* Re-designed Setting form
|
96 |
-
* Added a wizard setting
|
97 |
-
* Added Side Menu logo
|
98 |
-
* Added more design control on the login form
|
99 |
-
* Login live preview
|
100 |
-
* Custom Welcome Panel now supports Elementor and Beaver Builder Pro Templates
|
101 |
-
* Revised menus system visibility
|
102 |
-
* Added Hide Front-end Admin Bar
|
103 |
-
|
104 |
== Frequently Asked Questions ==
|
105 |
= Who is this plugin for?=
|
106 |
For developers who handover websites to their clients and use WordPress as a CMS.
|
8 |
Author: Video User Manuals
|
9 |
Requires at least: 3.3
|
10 |
Requires PHP: 5.4
|
11 |
+
Tested up to: 5.3.2
|
12 |
+
Stable tag: 2.1.2
|
13 |
|
14 |
Customise dashboard panels and branding, hide menus plus lots more.
|
15 |
|
66 |
|
67 |
== Changelog ==
|
68 |
|
69 |
+
= 2.1.2 =
|
70 |
+
* Support fonts import
|
71 |
+
* Added custom javascript for the login page
|
72 |
+
* Fixed PHP implode function compatibility
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
* Minor fixes
|
74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
== Frequently Asked Questions ==
|
76 |
= Who is this plugin for?=
|
77 |
For developers who handover websites to their clients and use WordPress as a CMS.
|
view/admin/parts/dashboard-custom-welcome-dashboard-panel.php
CHANGED
@@ -102,6 +102,12 @@ $welcome_panel_is_active = wlcms_welcome_value(0, 'is_active');
|
|
102 |
<?php
|
103 |
endif;
|
104 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
</div>
|
106 |
</div>
|
107 |
|
@@ -193,5 +199,11 @@ $welcome_panel_is_active = wlcms_welcome_value(1, 'is_active');
|
|
193 |
<?php
|
194 |
endif;
|
195 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
</div>
|
197 |
</div>
|
102 |
<?php
|
103 |
endif;
|
104 |
?>
|
105 |
+
<div class="wlcms-input-group">
|
106 |
+
<div class="wlcms-input">
|
107 |
+
<input class="wlcms-toggle wlcms-toggle-light" id="own_welcome_panel_dismissible" value="1" name="welcome_panel[0][dismissible]" <?php checked(wlcms_welcome_value(0, 'dismissible'), 1, true) ?> type="checkbox"/>
|
108 |
+
<label class="wlcms-toggle-btn" for="own_welcome_panel_dismissible"></label><label class="toggle-label" for="own_welcome_panel_dismissible"><?php _e('Dismissible'); ?></label>
|
109 |
+
</div>
|
110 |
+
</div>
|
111 |
</div>
|
112 |
</div>
|
113 |
|
199 |
<?php
|
200 |
endif;
|
201 |
?>
|
202 |
+
<div class="wlcms-input-group">
|
203 |
+
<div class="wlcms-input">
|
204 |
+
<input class="wlcms-toggle wlcms-toggle-light" id="second_welcome_panel_dismissible" value="1" name="welcome_panel[1][dismissible]" <?php checked(wlcms_welcome_value(1, 'dismissible'), 1, true) ?> type="checkbox"/>
|
205 |
+
<label class="wlcms-toggle-btn" for="second_welcome_panel_dismissible"></label><label class="toggle-label" for="second_welcome_panel_dismissible"><?php _e('Dismissible'); ?></label>
|
206 |
+
</div>
|
207 |
+
</div>
|
208 |
</div>
|
209 |
</div>
|
view/admin/parts/login-custom-css.php
CHANGED
@@ -5,12 +5,15 @@
|
|
5 |
<div class="wlcms-help">
|
6 |
<p><?php _e('Completely customise the login page by entering your own CSS.', 'white-label-cms') ?></p>
|
7 |
<p><?php _e('For example', 'white-label-cms') ?>:<br/>
|
|
|
8 |
.login form { background-color: #0013FF }<br/>
|
9 |
-
|
10 |
</p>
|
11 |
<p>
|
12 |
<?php _e('Or if you want to get fancy', 'white-label-cms') ?>:<br/>
|
|
|
13 |
#wlcms-login-wrapper{ background: url('wp-content/plugins/white-label-cms/images/footergrass.jpg') repeat-x fixed center bottom transparent; display: block; height: 100%; left: 0; overflow: auto; position: absolute; top: 0; width: 100%;}
|
|
|
14 |
</p>
|
15 |
</div>
|
16 |
</div>
|
5 |
<div class="wlcms-help">
|
6 |
<p><?php _e('Completely customise the login page by entering your own CSS.', 'white-label-cms') ?></p>
|
7 |
<p><?php _e('For example', 'white-label-cms') ?>:<br/>
|
8 |
+
<code>
|
9 |
.login form { background-color: #0013FF }<br/>
|
10 |
+
.login #login p#nav a { color: #333 !important }</code>
|
11 |
</p>
|
12 |
<p>
|
13 |
<?php _e('Or if you want to get fancy', 'white-label-cms') ?>:<br/>
|
14 |
+
<code>
|
15 |
#wlcms-login-wrapper{ background: url('wp-content/plugins/white-label-cms/images/footergrass.jpg') repeat-x fixed center bottom transparent; display: block; height: 100%; left: 0; overflow: auto; position: absolute; top: 0; width: 100%;}
|
16 |
+
</code>
|
17 |
</p>
|
18 |
</div>
|
19 |
</div>
|
view/admin/parts/login-custom-js.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="wlcms-input-group">
|
2 |
+
<div class="wlcms-input">
|
3 |
+
<textarea class="textarea-full wlcms-css" name="login_custom_js"><?php echo esc_textarea(wlcms_field_setting('login_custom_js')) ?></textarea>
|
4 |
+
</div>
|
5 |
+
<div class="wlcms-help">
|
6 |
+
<p><?php _e('Completely customise the login page by entering your own Javascript code.', 'white-label-cms') ?></p>
|
7 |
+
<p><?php _e('For example', 'white-label-cms') ?>:<br/>
|
8 |
+
</p>
|
9 |
+
<code>document.getElementById('user_login').placeholder='Username';<br/> document.getElementById('user_pass').placeholder='Password';</code>
|
10 |
+
</div>
|
11 |
+
</div>
|
12 |
+
<?php if( !is_multisite() ):?>
|
13 |
+
<p align="center"><a href="#wlcms-preview-content" class="wlcms-preview-link"><?php _e('Live Preview', 'white-label-cms') ?></a></p>
|
14 |
+
<?php endif;?>
|
view/admin/parts/login.php
CHANGED
@@ -17,6 +17,15 @@
|
|
17 |
</div>
|
18 |
</div>
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
<div class="wlcms-body-wrapper">
|
21 |
<div class="wlcms-body-header">
|
22 |
<h2><?php _e('Custom CSS', 'white-label-cms') ?></h2>
|
17 |
</div>
|
18 |
</div>
|
19 |
|
20 |
+
<div class="wlcms-body-wrapper">
|
21 |
+
<div class="wlcms-body-header">
|
22 |
+
<h2><?php _e('Custom JavaScript', 'white-label-cms') ?></h2>
|
23 |
+
</div>
|
24 |
+
<div class="wlcms-body-main">
|
25 |
+
<?php wlcms()->admin_view('parts/login-custom-js'); ?>
|
26 |
+
</div>
|
27 |
+
</div>
|
28 |
+
|
29 |
<div class="wlcms-body-wrapper">
|
30 |
<div class="wlcms-body-header">
|
31 |
<h2><?php _e('Custom CSS', 'white-label-cms') ?></h2>
|
wlcms-plugin.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: White Label CMS
|
4 |
Plugin URI: http://www.videousermanuals.com/white-label-cms/?utm_campaign=wlcms&utm_medium=plugin&utm_source=readme-txt
|
5 |
Description: A plugin that allows you to brand WordPress CMS as your own
|
6 |
-
Version: 2.1.
|
7 |
Author: www.videousermanuals.com
|
8 |
Author URI: http://www.videousermanuals.com/?utm_campaign=wlcms&utm_medium=plugin&utm_source=readme-txt
|
9 |
Text Domain: white-label-cms
|
@@ -13,7 +13,7 @@ Domain Path: /languages
|
|
13 |
|
14 |
if (!defined('ABSPATH')) exit; // Exit if accessed directly
|
15 |
|
16 |
-
define('WLCMS_VERSION', '2.1.
|
17 |
define("WLCMS_DIR", plugin_dir_path(__FILE__));
|
18 |
define("WLCMS_ASSETS_URL", plugin_dir_url(__FILE__) . 'assets/');
|
19 |
define("WLCMS_BASENAME", plugin_basename(__FILE__));
|
3 |
Plugin Name: White Label CMS
|
4 |
Plugin URI: http://www.videousermanuals.com/white-label-cms/?utm_campaign=wlcms&utm_medium=plugin&utm_source=readme-txt
|
5 |
Description: A plugin that allows you to brand WordPress CMS as your own
|
6 |
+
Version: 2.1.2
|
7 |
Author: www.videousermanuals.com
|
8 |
Author URI: http://www.videousermanuals.com/?utm_campaign=wlcms&utm_medium=plugin&utm_source=readme-txt
|
9 |
Text Domain: white-label-cms
|
13 |
|
14 |
if (!defined('ABSPATH')) exit; // Exit if accessed directly
|
15 |
|
16 |
+
define('WLCMS_VERSION', '2.1.2');
|
17 |
define("WLCMS_DIR", plugin_dir_path(__FILE__));
|
18 |
define("WLCMS_ASSETS_URL", plugin_dir_url(__FILE__) . 'assets/');
|
19 |
define("WLCMS_BASENAME", plugin_basename(__FILE__));
|