Version Description
- Added width to "Custom Sidebars" column on entries list screen to avoid uncontrolled column width.
- Added ability to add new sidebar using the only keyboard, after you fill name just push enter to move to the description field. Hit enter on description field to add a new sidebar.
- Fixed "WPMUDEV Frash" module message for pro version.
Download this release
Release Info
Developer | iworks |
Plugin | Custom Sidebars – Dynamic Widget Area Manager |
Version | 3.0.6 |
Comparing to | |
See all releases |
Code changes from version 3.0.5 to 3.0.6
- css/cs-cloning.min.css +1 -1
- css/cs-scan.min.css +1 -1
- css/cs-visibility.min.css +1 -1
- css/cs.css +6 -0
- css/cs.min.css +2 -2
- customsidebars.php +4 -2
- js/cs-cloning.js +1 -1
- js/cs-cloning.min.js +1 -1
- js/cs-visibility.js +1 -1
- js/cs-visibility.min.js +1 -1
- js/cs.js +21 -1
- js/cs.min.js +2 -2
- lang/custom-sidebars.pot +1 -1
- readme.txt +6 -1
css/cs-cloning.min.css
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
/*! Custom Sidebars - v3.0.
|
2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
4 |
|
1 |
+
/*! Custom Sidebars - v3.0.6
|
2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
4 |
|
css/cs-scan.min.css
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
/*! Custom Sidebars - v3.0.
|
2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
4 |
|
1 |
+
/*! Custom Sidebars - v3.0.6
|
2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
4 |
|
css/cs-visibility.min.css
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
/*! Custom Sidebars - v3.0.
|
2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
4 |
|
1 |
+
/*! Custom Sidebars - v3.0.6
|
2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
4 |
|
css/cs.css
CHANGED
@@ -819,11 +819,17 @@ h2 .show-infos {
|
|
819 |
* == Post list
|
820 |
* =============================================================================
|
821 |
*/
|
|
|
|
|
|
|
822 |
@media screen and (max-width: 782px) {
|
823 |
#wpbody-content .wp-list-table.fixed .column-cs_replacement {
|
824 |
display: none;
|
825 |
}
|
826 |
}
|
|
|
|
|
|
|
827 |
#wpbody-content .wp-list-table td.cs_replacement {
|
828 |
/* do not display sidebars that are not replaced */
|
829 |
}
|
819 |
* == Post list
|
820 |
* =============================================================================
|
821 |
*/
|
822 |
+
#wpbody-content .wp-list-table .column-cs_replacement {
|
823 |
+
width: 10%;
|
824 |
+
}
|
825 |
@media screen and (max-width: 782px) {
|
826 |
#wpbody-content .wp-list-table.fixed .column-cs_replacement {
|
827 |
display: none;
|
828 |
}
|
829 |
}
|
830 |
+
#wpbody-content .wp-list-table .column-cs_replacement {
|
831 |
+
width: 10%;
|
832 |
+
}
|
833 |
#wpbody-content .wp-list-table td.cs_replacement {
|
834 |
/* do not display sidebars that are not replaced */
|
835 |
}
|
css/cs.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
/*! Custom Sidebars - v3.0.
|
2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
4 |
|
5 |
-
.module-export .pro-layer{position:absolute;left:0;top:0;right:0;bottom:0;z-index:99999;background:rgba(255,255,255,.8);text-align:center;font-size:26px;font-weight:100;padding-top:120px;line-height:1.5}.module-export .pro-layer a{margin-top:20px;display:inline-block;background:#2EA2CC;color:#FAFAFA;text-decoration:none;padding:10px 20px;font-size:18px;font-weight:700}.module-export .pro-layer a:hover,.module-export .pro-layer a:focus,.module-export .pro-layer a:active{background:#1E8CBE;color:#FFF}.frm-location .pro-layer{padding:10px;text-align:center;font-size:26px;font-weight:100;line-height:1.5}.frm-location .pro-layer a{margin-top:20px;display:inline-block;background:#2EA2CC;color:#FAFAFA;text-decoration:none;padding:10px 20px;font-size:18px;font-weight:700}.frm-location .pro-layer a:hover,.frm-location .pro-layer a:focus,.frm-location .pro-layer a:active{background:#1E8CBE;color:#FFF}.csb-pro-layer{float:left;position:relative;opacity:.5;margin-right:10px}.csb-pro-layer .pro-info{position:absolute;left:0;top:0;right:0;bottom:0;opacity:0;background:rgba(96,96,96,.75);z-index:99999;text-align:center;text-decoration:none;line-height:28px;font-size:16px;font-weight:100;color:#FFF;text-decoration:underline;padding:0;margin:0;overflow:hidden}.csb-pro-layer:hover{opacity:1}.csb-pro-layer:hover .pro-info,.csb-pro-layer:hover .pro-info:hover,.csb-pro-layer:hover .pro-info:active,.csb-pro-layer:hover .pro-info:focus{line-height:48px;left:-10px;top:-10px;right:-5px;bottom:-10px;opacity:1}.csb-pro-layer .button{margin:0 5px 0 0;float:left}.csb-pro-layer .button .dashicons{line-height:26px;height:26px;float:left;margin-right:6px}#defaultsidebarspage p.submit{padding:0 0 10px;clear:both}#poststuff.defaultsdetailscontainer h2{border-bottom:0;margin-bottom:5px}#defaultsforposts,#defaultsforpages{padding:0 10px;background:#fcfcfc;overflow:hidden}.defaultsSelector{margin-bottom:30px}.cscolright{clear:right;float:right;margin:0;overflow:hidden;padding:0;width:49%}.cscolleft{margin:0;overflow:hidden;padding:0;width:49%}.widgets-php .widget-liquid-left{width:100%}.widgets-php .widget-liquid-right{padding:0 0 75px;margin:-10px -214% 0 0;width:210%;background:#e4e4e4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.widgets-php .widget-liquid-right #widgets-right{margin:20px}.widgets-php .widget-liquid-right .overview{list-style:none;position:absolute;left:0;top:0;width:auto;right:0;padding-left:20px;border-left:1px solid #DDD}.widgets-php #wpcontent{position:relative}.widgets-php #wpcontent .wrap .cs-wrap{margin-right:68%;padding-top:1em;position:relative}.widgets-php #wpcontent #screen-meta-links{position:relative;z-index:10}.widgets-php #wpcontent #screen-meta{position:relative;z-index:10}.widgets-php #widgets-left{margin-right:0!important}.widgets-php #footer{background:#fff;margin-right:0;padding-right:20px}.widgets-php .sidebars-column-1 .custom-sidebars-add-new{background-color:#fff;padding:15px}.widgets-php .sidebars-column-1 .custom-sidebars-add-new p{border-radius:4px;border:3px dashed #ddd;color:#777;cursor:pointer;font-weight:700;margin:0;padding:90px 10px;text-align:center}.widgets-php .sidebars-column-1 .inner .custom-sidebars-box{border-radius:4px;margin:55px 0 16px}.widgets-php .sidebars-column-1 .inner .custom-sidebars-upfront{background-color:#f9c200}.widgets-php .sidebars-column-1 .inner .custom-sidebars-upfront .cs-inner{min-height:145px;margin-right:-16px;background:url(../img/devman.png) no-repeat 100% 50%;padding:50px 120px 45px 20px}.widgets-php .sidebars-column-1 .inner .custom-sidebars-upfront .cs-inner p{font-size:1.4em;color:#000;margin-top:0}.widgets-php .sidebars-column-1 .inner .custom-sidebars-upfront .cs-inner p:last-of-type{margin-bottom:0}.widgets-php .sidebars-column-1 .inner .custom-sidebars-upfront .cs-inner .button{background-color:#00a7e6;color:#fff;font-weight:700;height:auto;padding:15px 16px;text-transform:uppercase}.widgets-php .sidebars-column-1 .inner .custom-sidebars-checkup{background-color:#fff}.widgets-php .sidebars-column-1 .inner .custom-sidebars-checkup .cs-inner{background:url(../img/hand-with-heart.png) no-repeat 100% 100%;font-size:1.2em;min-height:227px;padding-bottom:10px}.widgets-php .sidebars-column-1 .inner .custom-sidebars-checkup .cs-inner h4,.widgets-php .sidebars-column-1 .inner .custom-sidebars-checkup .cs-inner p{margin:0;padding:0 120px 0 30px;font-size:1.1em}.widgets-php .sidebars-column-1 .inner .custom-sidebars-checkup .cs-inner h4{color:#222;font-size:1.2em;padding-top:50px}.widgets-php .sidebars-column-1 .inner .custom-sidebars-checkup .cs-inner p{color:#c1272c;padding-top:16px}.widgets-php .sidebars-column-1 .inner .custom-sidebars-checkup .cs-inner form{border-radius:4px;background-color:#fafafa;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-pack:justify;justify-content:space-between;margin:24px 30px 0;padding:0}.widgets-php .sidebars-column-1 .inner .custom-sidebars-checkup .cs-inner form input{background-color:transparent;border:0;font-size:1em;margin:0;padding:10px 15px;text-align:center}.widgets-php .sidebars-column-1 .inner .custom-sidebars-checkup .cs-inner form input[type=submit]{border-radius:0 4px 4px 0;background-color:#00a7e6;color:#fff;min-width:3em;text-transform:uppercase}.widgets-php .sidebars-column-1 .inner .custom-sidebars-checkup .cs-inner form input[type=text]{color:#aaa;-ms-flex-positive:1;flex-grow:1}.widgets-php .sidebars-column-1 .inner .custom-sidebars-checkup .cs-inner form input[type=text]:active{box-shadow:none}#cs-options .cs-action{line-height:26px;margin-right:20px}#cs-options .cs-filter{float:right}.sidebar-form{margin:0 15px}.sidebar-form label{display:block}.sidebar-form .submit{text-align:right;margin:0;padding:1em 0}.sidebar-form .description{margin-top:5px;text-align:right}.sidebar_name,.sidebar_description{width:100%}div#widgets-right .sidebar-name>h3{padding:15px}div#widgets-right .widgets-sortables .sidebar-name>h3{padding:15px 7px}.widgets-holder-wrap.closed>div:nth-child(2){display:none}#defaultsidebarspage .hndle{cursor:pointer}#customsidebarspage #col-right{width:62%}.widgets_access .widget-liquid-right{position:static}#oldbrowsererror{display:none}#defaultsidebarspage .postbox{position:static}#defaultsidebarspage .inside{position:static}body.appearance_page_customsidebars .wrap h2{float:none}body.appearance_page_customsidebars #poststuff h2{margin-top:0}.widget.ui-draggable-dragging{z-index:10001!important}.csb-more-content{display:none}.csb-has-more .csb-more-content{display:block}#cs-widgets-extra{display:none}#cs-title-options{zoom:1;background:#E8E8E8;margin:-20px -20px 0 -20px;padding:10px 20px 20px;border-bottom:1px solid #DDD}.cs-title h3{font-weight:100}.cs-title h3 .cs-icon{margin-left:10px;color:#999}.replaceable{position:relative}.replaceable .replace-marker{position:absolute;left:0;top:0;bottom:0;width:5px;margin:0 5px 0 0;border-left:2px solid #05c944;z-index:10}.replaceable .replace-marker:hover:before{content:attr(data-label);background:#333;color:#EEE;font-size:13px;white-space:nowrap;padding:5px;position:absolute;top:7px;right:13px;line-height:20px}.replaceable .replace-marker:hover:after{content:'';position:absolute;top:16px;right:3px;border:6px solid transparent;border-left-color:#333}.cs-message{margin:.5em 0;padding:10px;position:absolute;left:0;right:0;box-shadow:0 1px 10px rgba(0,0,0,.2);z-index:100}.cs-message .close{position:absolute;top:.5em;right:.5em;opacity:.3;color:#000;cursor:pointer;text-decoration:none;font-size:14px;line-height:26px;width:26px;text-align:center;background:rgba(0,0,0,.1)}.cs-message .close:hover,.cs-message .close:focus,.cs-message .close:active{opacity:1}.cs-update{background:#ffffe0;border:1px solid #E6DB55}.cs-error{background:#FFEBE8;border:1px solid #C00}.cs-toolbar{color:#333;padding:0;background:#FCFCFC;border-top:1px solid #E5E5E5}.cs-toolbar:after{display:table;content:'';clear:both}.closed .cs-toolbar{display:none}.cs-toolbar .cs-tool{text-decoration:none;line-height:40px;height:40px;padding:0 10px;white-space:nowrap;background:#FFF;position:relative;overflow:hidden}.cs-toolbar .dashicons{line-height:40px}.cs-toolbar .cs-separator{border-left:1px solid #E5E5E5;width:1px;padding:0;margin:0;height:40px;overflow:hidden;display:inline-block;color:#DDD}.cs-custom-sidebar .cs-tool,.cs-custom-sidebar .cs-separator{float:right}.cs-theme-sidebar .cs-tool,.cs-theme-sidebar .cs-separator{float:left}.cs-toolbar .delete-sidebar{color:#A00}.cs-toolbar .delete-sidebar:hover,.cs-toolbar .delete-sidebar:focus,.cs-toolbar .delete-sidebar:active{color:red}.cs-toolbar .cs-tool.btn-replaceable{color:#555;padding-left:32px}.cs-toolbar .cs-tool.btn-replaceable:hover{color:#333!important}.cs-toolbar .cs-tool.btn-replaceable .chk-replaceable{position:absolute;top:50%;left:10px;height:16px;margin-top:-8px}.replaceable .cs-toolbar .cs-tool.btn-replaceable{background:#edfff3;color:#333}.replace-tip-box{float:left}.replace-tip{width:200px}.csb .button{outline:0}.csb .button>.dashicons,.csb .button-primary>.dashicons,.csb .button-secondary>.dashicons{opacity:.75;line-height:26px;margin-right:5px;transition:opacity .2s}.csb .button:hover>.dashicons,.csb .button-primary:hover>.dashicons,.csb .button-secondary:hover>.dashicons{opacity:1}.rtl div.widget-liquid-right{float:left;right:auto;left:0}.rtl.widgets-php #wpcontent .wrap .cs-wrap{margin-right:2px;margin-left:68%}.rtl.widgets-php .widget-liquid-right{margin:-10px 0 0 -214%}.rtl.widgets-php #widgets-left{margin-left:0!important}.rtl.widgets-php.folded #wpcontent,.rtl.widgets-php.folded #wpfooter{margin-left:325px;margin-right:52px}.rtl #cs-title-options h2{margin-right:5px}.rtl #cs-options .cs-filter{float:left}.rtl #cs-options .cs-action{margin-right:0;margin-left:20px}.rtl .sidebar-form .submit{text-align:left}.rtl #TB_ajaxWindowTitle{float:right}.rtl #TB_closeAjaxWindow{float:left}.csb-export-head{min-width:450px}.csb-export-head th{vertical-align:top;text-align:right;color:#679;width:150px}.csb-export-head tr:hover{background:#FAFAFA}.csb-export-head ul{margin:0}.csb-export-head .dashicons.hint{font-size:12px;line-height:22px}.csb-form{padding-left:15px}.csb-form h2,.csb-form h3,.csb-form .form-buttons,#poststuff .csb-form h2,#poststuff .csb-form h3,#poststuff .csb-form .form-buttons{padding-left:0;margin-left:-15px}.form-buttons{clear:both}.show-infos{position:relative;display:inline-block;margin:0 5px}h2 .show-infos{top:4px}.show-infos .export-infos{position:absolute;top:-5px;left:30px;font-size:13px;line-height:1.4em;font-weight:400;background:#FFF;box-shadow:0 1px 8px rgba(0,0,0,.2);border:3px solid #FAFAFA;padding:5px;z-index:10}.show-infos .export-infos:before,.show-infos .export-infos:after{content:'';position:absolute;left:-17px;top:5px;border:7px solid transparent;border-right-color:#FAFAFA;z-index:1}.show-infos .export-infos:after{left:-18px;top:5px;border-right-color:rgba(0,0,0,.15);z-index:0}.show-infos:hover .export-infos{display:block!important}.export-infos .section{font-weight:700;margin:10px 0 5px -2px;color:#666}.cs-half{float:left;width:49%;margin-right:1%}.cs-replaceable{margin-bottom:5px}.cs-replaceable>.details{display:none;margin:5px 0}.cs-replaceable.open>.details{display:block}@media screen and (max-width:782px){#wpbody-content .wp-list-table.fixed .column-cs_replacement{display:none}}#wpbody-content .wp-list-table td.cs_replacement{}#wpbody-content .wp-list-table td.cs_replacement .def,#wpbody-content .wp-list-table td.cs_replacement .cust{opacity:.8;cursor:default;position:relative;padding-left:110px}#wpbody-content .wp-list-table td.cs_replacement .def:after,#wpbody-content .wp-list-table td.cs_replacement .cust:after{content:' ';display:block;clear:both}#wpbody-content .wp-list-table td.cs_replacement .def:hover,#wpbody-content .wp-list-table td.cs_replacement .cust:hover{opacity:1;background:rgba(0,0,0,.02)}#wpbody-content .wp-list-table td.cs_replacement .def{display:none}#wpbody-content .wp-list-table td.cs_replacement .cs-val,#wpbody-content .wp-list-table td.cs_replacement .cs-key{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}#wpbody-content .wp-list-table td.cs_replacement .cs-key{max-width:100px;color:#666;position:absolute;left:0}#wpbody-content .wp-list-table td.cs_replacement .cs-val{display:block}#wpbody-content .wp-list-table .inline-edit-row fieldset.cs-quickedit{border-top:1px solid #EEE;margin-top:10px;padding-top:10px}#wpbody-content .wp-list-table .inline-edit-row fieldset.cs-quickedit label span.title{display:block;float:left;min-width:5em;white-space:nowrap;padding-right:10px;width:auto}#wpbody-content .wp-list-table .inline-edit-row-page .inline-edit-col-right{float:right}
|
1 |
+
/*! Custom Sidebars - v3.0.6
|
2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
4 |
|
5 |
+
.module-export .pro-layer{position:absolute;left:0;top:0;right:0;bottom:0;z-index:99999;background:rgba(255,255,255,.8);text-align:center;font-size:26px;font-weight:100;padding-top:120px;line-height:1.5}.module-export .pro-layer a{margin-top:20px;display:inline-block;background:#2EA2CC;color:#FAFAFA;text-decoration:none;padding:10px 20px;font-size:18px;font-weight:700}.module-export .pro-layer a:hover,.module-export .pro-layer a:focus,.module-export .pro-layer a:active{background:#1E8CBE;color:#FFF}.frm-location .pro-layer{padding:10px;text-align:center;font-size:26px;font-weight:100;line-height:1.5}.frm-location .pro-layer a{margin-top:20px;display:inline-block;background:#2EA2CC;color:#FAFAFA;text-decoration:none;padding:10px 20px;font-size:18px;font-weight:700}.frm-location .pro-layer a:hover,.frm-location .pro-layer a:focus,.frm-location .pro-layer a:active{background:#1E8CBE;color:#FFF}.csb-pro-layer{float:left;position:relative;opacity:.5;margin-right:10px}.csb-pro-layer .pro-info{position:absolute;left:0;top:0;right:0;bottom:0;opacity:0;background:rgba(96,96,96,.75);z-index:99999;text-align:center;text-decoration:none;line-height:28px;font-size:16px;font-weight:100;color:#FFF;text-decoration:underline;padding:0;margin:0;overflow:hidden}.csb-pro-layer:hover{opacity:1}.csb-pro-layer:hover .pro-info,.csb-pro-layer:hover .pro-info:hover,.csb-pro-layer:hover .pro-info:active,.csb-pro-layer:hover .pro-info:focus{line-height:48px;left:-10px;top:-10px;right:-5px;bottom:-10px;opacity:1}.csb-pro-layer .button{margin:0 5px 0 0;float:left}.csb-pro-layer .button .dashicons{line-height:26px;height:26px;float:left;margin-right:6px}#defaultsidebarspage p.submit{padding:0 0 10px;clear:both}#poststuff.defaultsdetailscontainer h2{border-bottom:0;margin-bottom:5px}#defaultsforposts,#defaultsforpages{padding:0 10px;background:#fcfcfc;overflow:hidden}.defaultsSelector{margin-bottom:30px}.cscolright{clear:right;float:right;margin:0;overflow:hidden;padding:0;width:49%}.cscolleft{margin:0;overflow:hidden;padding:0;width:49%}.widgets-php .widget-liquid-left{width:100%}.widgets-php .widget-liquid-right{padding:0 0 75px;margin:-10px -214% 0 0;width:210%;background:#e4e4e4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.widgets-php .widget-liquid-right #widgets-right{margin:20px}.widgets-php .widget-liquid-right .overview{list-style:none;position:absolute;left:0;top:0;width:auto;right:0;padding-left:20px;border-left:1px solid #DDD}.widgets-php #wpcontent{position:relative}.widgets-php #wpcontent .wrap .cs-wrap{margin-right:68%;padding-top:1em;position:relative}.widgets-php #wpcontent #screen-meta-links{position:relative;z-index:10}.widgets-php #wpcontent #screen-meta{position:relative;z-index:10}.widgets-php #widgets-left{margin-right:0!important}.widgets-php #footer{background:#fff;margin-right:0;padding-right:20px}.widgets-php .sidebars-column-1 .custom-sidebars-add-new{background-color:#fff;padding:15px}.widgets-php .sidebars-column-1 .custom-sidebars-add-new p{border-radius:4px;border:3px dashed #ddd;color:#777;cursor:pointer;font-weight:700;margin:0;padding:90px 10px;text-align:center}.widgets-php .sidebars-column-1 .inner .custom-sidebars-box{border-radius:4px;margin:55px 0 16px}.widgets-php .sidebars-column-1 .inner .custom-sidebars-upfront{background-color:#f9c200}.widgets-php .sidebars-column-1 .inner .custom-sidebars-upfront .cs-inner{min-height:145px;margin-right:-16px;background:url(../img/devman.png) no-repeat 100% 50%;padding:50px 120px 45px 20px}.widgets-php .sidebars-column-1 .inner .custom-sidebars-upfront .cs-inner p{font-size:1.4em;color:#000;margin-top:0}.widgets-php .sidebars-column-1 .inner .custom-sidebars-upfront .cs-inner p:last-of-type{margin-bottom:0}.widgets-php .sidebars-column-1 .inner .custom-sidebars-upfront .cs-inner .button{background-color:#00a7e6;color:#fff;font-weight:700;height:auto;padding:15px 16px;text-transform:uppercase}.widgets-php .sidebars-column-1 .inner .custom-sidebars-checkup{background-color:#fff}.widgets-php .sidebars-column-1 .inner .custom-sidebars-checkup .cs-inner{background:url(../img/hand-with-heart.png) no-repeat 100% 100%;font-size:1.2em;min-height:227px;padding-bottom:10px}.widgets-php .sidebars-column-1 .inner .custom-sidebars-checkup .cs-inner h4,.widgets-php .sidebars-column-1 .inner .custom-sidebars-checkup .cs-inner p{margin:0;padding:0 120px 0 30px;font-size:1.1em}.widgets-php .sidebars-column-1 .inner .custom-sidebars-checkup .cs-inner h4{color:#222;font-size:1.2em;padding-top:50px}.widgets-php .sidebars-column-1 .inner .custom-sidebars-checkup .cs-inner p{color:#c1272c;padding-top:16px}.widgets-php .sidebars-column-1 .inner .custom-sidebars-checkup .cs-inner form{border-radius:4px;background-color:#fafafa;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-pack:justify;justify-content:space-between;margin:24px 30px 0;padding:0}.widgets-php .sidebars-column-1 .inner .custom-sidebars-checkup .cs-inner form input{background-color:transparent;border:0;font-size:1em;margin:0;padding:10px 15px;text-align:center}.widgets-php .sidebars-column-1 .inner .custom-sidebars-checkup .cs-inner form input[type=submit]{border-radius:0 4px 4px 0;background-color:#00a7e6;color:#fff;min-width:3em;text-transform:uppercase}.widgets-php .sidebars-column-1 .inner .custom-sidebars-checkup .cs-inner form input[type=text]{color:#aaa;-ms-flex-positive:1;flex-grow:1}.widgets-php .sidebars-column-1 .inner .custom-sidebars-checkup .cs-inner form input[type=text]:active{box-shadow:none}#cs-options .cs-action{line-height:26px;margin-right:20px}#cs-options .cs-filter{float:right}.sidebar-form{margin:0 15px}.sidebar-form label{display:block}.sidebar-form .submit{text-align:right;margin:0;padding:1em 0}.sidebar-form .description{margin-top:5px;text-align:right}.sidebar_name,.sidebar_description{width:100%}div#widgets-right .sidebar-name>h3{padding:15px}div#widgets-right .widgets-sortables .sidebar-name>h3{padding:15px 7px}.widgets-holder-wrap.closed>div:nth-child(2){display:none}#defaultsidebarspage .hndle{cursor:pointer}#customsidebarspage #col-right{width:62%}.widgets_access .widget-liquid-right{position:static}#oldbrowsererror{display:none}#defaultsidebarspage .postbox{position:static}#defaultsidebarspage .inside{position:static}body.appearance_page_customsidebars .wrap h2{float:none}body.appearance_page_customsidebars #poststuff h2{margin-top:0}.widget.ui-draggable-dragging{z-index:10001!important}.csb-more-content{display:none}.csb-has-more .csb-more-content{display:block}#cs-widgets-extra{display:none}#cs-title-options{zoom:1;background:#E8E8E8;margin:-20px -20px 0 -20px;padding:10px 20px 20px;border-bottom:1px solid #DDD}.cs-title h3{font-weight:100}.cs-title h3 .cs-icon{margin-left:10px;color:#999}.replaceable{position:relative}.replaceable .replace-marker{position:absolute;left:0;top:0;bottom:0;width:5px;margin:0 5px 0 0;border-left:2px solid #05c944;z-index:10}.replaceable .replace-marker:hover:before{content:attr(data-label);background:#333;color:#EEE;font-size:13px;white-space:nowrap;padding:5px;position:absolute;top:7px;right:13px;line-height:20px}.replaceable .replace-marker:hover:after{content:'';position:absolute;top:16px;right:3px;border:6px solid transparent;border-left-color:#333}.cs-message{margin:.5em 0;padding:10px;position:absolute;left:0;right:0;box-shadow:0 1px 10px rgba(0,0,0,.2);z-index:100}.cs-message .close{position:absolute;top:.5em;right:.5em;opacity:.3;color:#000;cursor:pointer;text-decoration:none;font-size:14px;line-height:26px;width:26px;text-align:center;background:rgba(0,0,0,.1)}.cs-message .close:hover,.cs-message .close:focus,.cs-message .close:active{opacity:1}.cs-update{background:#ffffe0;border:1px solid #E6DB55}.cs-error{background:#FFEBE8;border:1px solid #C00}.cs-toolbar{color:#333;padding:0;background:#FCFCFC;border-top:1px solid #E5E5E5}.cs-toolbar:after{display:table;content:'';clear:both}.closed .cs-toolbar{display:none}.cs-toolbar .cs-tool{text-decoration:none;line-height:40px;height:40px;padding:0 10px;white-space:nowrap;background:#FFF;position:relative;overflow:hidden}.cs-toolbar .dashicons{line-height:40px}.cs-toolbar .cs-separator{border-left:1px solid #E5E5E5;width:1px;padding:0;margin:0;height:40px;overflow:hidden;display:inline-block;color:#DDD}.cs-custom-sidebar .cs-tool,.cs-custom-sidebar .cs-separator{float:right}.cs-theme-sidebar .cs-tool,.cs-theme-sidebar .cs-separator{float:left}.cs-toolbar .delete-sidebar{color:#A00}.cs-toolbar .delete-sidebar:hover,.cs-toolbar .delete-sidebar:focus,.cs-toolbar .delete-sidebar:active{color:red}.cs-toolbar .cs-tool.btn-replaceable{color:#555;padding-left:32px}.cs-toolbar .cs-tool.btn-replaceable:hover{color:#333!important}.cs-toolbar .cs-tool.btn-replaceable .chk-replaceable{position:absolute;top:50%;left:10px;height:16px;margin-top:-8px}.replaceable .cs-toolbar .cs-tool.btn-replaceable{background:#edfff3;color:#333}.replace-tip-box{float:left}.replace-tip{width:200px}.csb .button{outline:0}.csb .button>.dashicons,.csb .button-primary>.dashicons,.csb .button-secondary>.dashicons{opacity:.75;line-height:26px;margin-right:5px;transition:opacity .2s}.csb .button:hover>.dashicons,.csb .button-primary:hover>.dashicons,.csb .button-secondary:hover>.dashicons{opacity:1}.rtl div.widget-liquid-right{float:left;right:auto;left:0}.rtl.widgets-php #wpcontent .wrap .cs-wrap{margin-right:2px;margin-left:68%}.rtl.widgets-php .widget-liquid-right{margin:-10px 0 0 -214%}.rtl.widgets-php #widgets-left{margin-left:0!important}.rtl.widgets-php.folded #wpcontent,.rtl.widgets-php.folded #wpfooter{margin-left:325px;margin-right:52px}.rtl #cs-title-options h2{margin-right:5px}.rtl #cs-options .cs-filter{float:left}.rtl #cs-options .cs-action{margin-right:0;margin-left:20px}.rtl .sidebar-form .submit{text-align:left}.rtl #TB_ajaxWindowTitle{float:right}.rtl #TB_closeAjaxWindow{float:left}.csb-export-head{min-width:450px}.csb-export-head th{vertical-align:top;text-align:right;color:#679;width:150px}.csb-export-head tr:hover{background:#FAFAFA}.csb-export-head ul{margin:0}.csb-export-head .dashicons.hint{font-size:12px;line-height:22px}.csb-form{padding-left:15px}.csb-form h2,.csb-form h3,.csb-form .form-buttons,#poststuff .csb-form h2,#poststuff .csb-form h3,#poststuff .csb-form .form-buttons{padding-left:0;margin-left:-15px}.form-buttons{clear:both}.show-infos{position:relative;display:inline-block;margin:0 5px}h2 .show-infos{top:4px}.show-infos .export-infos{position:absolute;top:-5px;left:30px;font-size:13px;line-height:1.4em;font-weight:400;background:#FFF;box-shadow:0 1px 8px rgba(0,0,0,.2);border:3px solid #FAFAFA;padding:5px;z-index:10}.show-infos .export-infos:before,.show-infos .export-infos:after{content:'';position:absolute;left:-17px;top:5px;border:7px solid transparent;border-right-color:#FAFAFA;z-index:1}.show-infos .export-infos:after{left:-18px;top:5px;border-right-color:rgba(0,0,0,.15);z-index:0}.show-infos:hover .export-infos{display:block!important}.export-infos .section{font-weight:700;margin:10px 0 5px -2px;color:#666}.cs-half{float:left;width:49%;margin-right:1%}.cs-replaceable{margin-bottom:5px}.cs-replaceable>.details{display:none;margin:5px 0}.cs-replaceable.open>.details{display:block}#wpbody-content .wp-list-table .column-cs_replacement{width:10%}@media screen and (max-width:782px){#wpbody-content .wp-list-table.fixed .column-cs_replacement{display:none}}#wpbody-content .wp-list-table .column-cs_replacement{width:10%}#wpbody-content .wp-list-table td.cs_replacement{}#wpbody-content .wp-list-table td.cs_replacement .def,#wpbody-content .wp-list-table td.cs_replacement .cust{opacity:.8;cursor:default;position:relative;padding-left:110px}#wpbody-content .wp-list-table td.cs_replacement .def:after,#wpbody-content .wp-list-table td.cs_replacement .cust:after{content:' ';display:block;clear:both}#wpbody-content .wp-list-table td.cs_replacement .def:hover,#wpbody-content .wp-list-table td.cs_replacement .cust:hover{opacity:1;background:rgba(0,0,0,.02)}#wpbody-content .wp-list-table td.cs_replacement .def{display:none}#wpbody-content .wp-list-table td.cs_replacement .cs-val,#wpbody-content .wp-list-table td.cs_replacement .cs-key{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}#wpbody-content .wp-list-table td.cs_replacement .cs-key{max-width:100px;color:#666;position:absolute;left:0}#wpbody-content .wp-list-table td.cs_replacement .cs-val{display:block}#wpbody-content .wp-list-table .inline-edit-row fieldset.cs-quickedit{border-top:1px solid #EEE;margin-top:10px;padding-top:10px}#wpbody-content .wp-list-table .inline-edit-row fieldset.cs-quickedit label span.title{display:block;float:left;min-width:5em;white-space:nowrap;padding-right:10px;width:auto}#wpbody-content .wp-list-table .inline-edit-row-page .inline-edit-col-right{float:right}
|
customsidebars.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Custom Sidebars
|
4 |
* Plugin URI: https://wordpress.org/plugins/custom-sidebars/
|
5 |
* Description: Allows you to create widgetized areas and custom sidebars. Replace whole sidebars or single widgets for specific posts and pages.
|
6 |
-
* Version: 3.0.
|
7 |
* Author: WPMU DEV
|
8 |
* Author URI: http://premium.wpmudev.org/
|
9 |
* Textdomain: custom-sidebars
|
@@ -53,8 +53,10 @@ function inc_sidebars_init() {
|
|
53 |
|
54 |
// Include function library.
|
55 |
$modules[] = CSB_INC_DIR . 'external/wpmu-lib/core.php';
|
56 |
-
$modules[] = CSB_INC_DIR . 'external/wdev-frash/module.php';
|
57 |
$modules[] = CSB_INC_DIR . 'class-custom-sidebars.php';
|
|
|
|
|
|
|
58 |
|
59 |
|
60 |
// Free-version configuration - no drip campaign yet...
|
3 |
* Plugin Name: Custom Sidebars
|
4 |
* Plugin URI: https://wordpress.org/plugins/custom-sidebars/
|
5 |
* Description: Allows you to create widgetized areas and custom sidebars. Replace whole sidebars or single widgets for specific posts and pages.
|
6 |
+
* Version: 3.0.6
|
7 |
* Author: WPMU DEV
|
8 |
* Author URI: http://premium.wpmudev.org/
|
9 |
* Textdomain: custom-sidebars
|
53 |
|
54 |
// Include function library.
|
55 |
$modules[] = CSB_INC_DIR . 'external/wpmu-lib/core.php';
|
|
|
56 |
$modules[] = CSB_INC_DIR . 'class-custom-sidebars.php';
|
57 |
+
|
58 |
+
$modules[] = CSB_INC_DIR . 'external/wdev-frash/module.php';
|
59 |
+
|
60 |
|
61 |
|
62 |
// Free-version configuration - no drip campaign yet...
|
js/cs-cloning.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
/*! Custom Sidebars - v3.0.
|
2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
4 |
/*global jQuery:false */
|
1 |
+
/*! Custom Sidebars - v3.0.6
|
2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
4 |
/*global jQuery:false */
|
js/cs-cloning.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
/*! Custom Sidebars - v3.0.
|
2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
4 |
|
1 |
+
/*! Custom Sidebars - v3.0.6
|
2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
4 |
|
js/cs-visibility.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
/*! Custom Sidebars - v3.0.
|
2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
4 |
/*global jQuery:false */
|
1 |
+
/*! Custom Sidebars - v3.0.6
|
2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
4 |
/*global jQuery:false */
|
js/cs-visibility.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
/*! Custom Sidebars - v3.0.
|
2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
4 |
|
1 |
+
/*! Custom Sidebars - v3.0.6
|
2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
4 |
|
js/cs.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
/*! Custom Sidebars - v3.0.
|
2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
4 |
/*global window:false */
|
@@ -644,6 +644,26 @@ window.csSidebars = null;
|
|
644 |
popup.show();
|
645 |
popup.$().find( '#csb-name' ).focus();
|
646 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
647 |
// Add event hooks to the editor.
|
648 |
popup.$().on( 'click', '#csb-more', toggle_extras );
|
649 |
popup.$().on( 'click', '.btn-save', save_data );
|
1 |
+
/*! Custom Sidebars - v3.0.6
|
2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
4 |
/*global window:false */
|
644 |
popup.show();
|
645 |
popup.$().find( '#csb-name' ).focus();
|
646 |
|
647 |
+
/**
|
648 |
+
* handle enter key on new sidebar name
|
649 |
+
*/
|
650 |
+
popup.$().on( 'keypress', '#csb-name', function(e) {
|
651 |
+
if ( 13 === e.keyCode ) {
|
652 |
+
if ( 0 < $(this).val().length ) {
|
653 |
+
$('#csb-description').focus();
|
654 |
+
}
|
655 |
+
}
|
656 |
+
});
|
657 |
+
|
658 |
+
/**
|
659 |
+
* handle enter key on new sidebar description
|
660 |
+
*/
|
661 |
+
popup.$().on( 'keypress', '#csb-description', function(e) {
|
662 |
+
if ( 13 === e.keyCode ) {
|
663 |
+
popup.$('.btn-save').click();
|
664 |
+
}
|
665 |
+
});
|
666 |
+
|
667 |
// Add event hooks to the editor.
|
668 |
popup.$().on( 'click', '#csb-more', toggle_extras );
|
669 |
popup.$().on( 'click', '.btn-save', save_data );
|
js/cs.min.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
/*! Custom Sidebars - v3.0.
|
2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
4 |
|
5 |
-
function trim(a){a=a.replace(/^\s\s*/,"");for(var b=a.length-1;b>=0;b--)if(/\S/.test(a.charAt(b))){a=a.substring(0,b+1);break}return a}function CsSidebar(a,b){var c;this.id=a.split("%").join("\\%"),this.type=b,this.sb=jQuery("#"+this.id),this.widgets="",this.name=trim(this.sb.find(".sidebar-name h2").text()),this.description=trim(this.sb.find(".sidebar-description").text()),c="custom"===b?window.csSidebars.extras.find(".cs-custom-sidebar").clone():window.csSidebars.extras.find(".cs-theme-sidebar").clone(),this.sb.parent().append(c),c.find("label").each(function(){var b=jQuery(this);window.csSidebars.addIdToLabel(b,a)})}CsSidebar.prototype.getID=function(){return this.id.split("\\").join("")},window.csSidebars=null,function(a){window.csSidebars={sidebars:[],sidebar_prefix:"cs-",edit_form:null,delete_form:null,export_form:null,location_form:null,right:null,extras:null,action_handlers:{},init:function(){"undefined"!=typeof csSidebarsData&&csSidebars.initControls().initTopTools().initSidebars().initToolbars().initColumns()},initControls:function(){return csSidebars.right=jQuery("#widgets-right"),csSidebars.extras=jQuery("#cs-widgets-extra"),null===csSidebars.edit_form&&(csSidebars.edit_form=csSidebars.extras.find(".cs-editor").clone(),csSidebars.extras.find(".cs-editor").remove()),null===csSidebars.delete_form&&(csSidebars.delete_form=csSidebars.extras.find(".cs-delete").clone(),csSidebars.extras.find(".cs-delete").remove()),null===csSidebars.export_form&&(csSidebars.export_form=csSidebars.extras.find(".cs-export").clone(),csSidebars.extras.find(".cs-export").remove()),null===csSidebars.location_form&&(csSidebars.location_form=csSidebars.extras.find(".cs-location").clone(),csSidebars.extras.find(".cs-location").remove()),jQuery("#cs-title-options").detach().prependTo(csSidebars.right),csSidebars},initColumns:function(){function a(){var a=jQuery(this),b=a.closest(".sidebars-column-1, .sidebars-column-2"),c=b.data("sort-dir");c="asc"===c?"desc":"asc",csSidebars.sort_sidebars(b,c)}var b=csSidebars.right.find(".sidebars-column-1"),c=csSidebars.right.find(".sidebars-column-2"),d=jQuery('<div class="cs-title"><h2></h2></div>'),e=csSidebars.right.find(".widgets-holder-wrap");c.length||(c=jQuery('<div class="sidebars-column-2"></div>'),c.appendTo(csSidebars.right)),d.find("h2").append('<span class="cs-title-val"></span><i class="cs-icon dashicons dashicons-sort"></i>').css({cursor:"pointer"}),d.clone().prependTo(b).click(a).find(".cs-title-val").text(csSidebarsData.custom_sidebars),d.clone().prependTo(c).click(a).find(".cs-title-val").text(csSidebarsData.theme_sidebars),b=jQuery('<div class="inner"></div>').appendTo(b),c=jQuery('<div class="inner"></div>').appendTo(c),e.each(function(){var a=jQuery(this),d=a.find(".widgets-sortables");csSidebars.isCustomSidebar(d)?a.appendTo(b):a.appendTo(c)})},initSidebars:function(){return csSidebars.right.find(".widgets-sortables").each(function(){var a,b,c=!1,d=jQuery(this),e=d.attr("id");if(!0!==d.data("cs-init"))if(d.data("cs-init",!0),csSidebars.isCustomSidebar(this))b=csSidebars.add(e,"custom");else{b=csSidebars.add(e,"theme");for(a in csSidebarsData.replaceable)if(csSidebarsData.replaceable.hasOwnProperty(a)&&csSidebarsData.replaceable[a]===e){c=!0;break}csSidebars.setReplaceable(b,c,!1)}}),csSidebars},initTopTools:function(){var a=jQuery(".btn-create-sidebar"),b=jQuery(".btn-export"),c=jQuery(".cs-options"),d=jQuery('<input type="search" class="cs-filter" />'),e={};return a.click(function(){e.id="",e.title=csSidebarsData.title_new,e.button=csSidebarsData.btn_new,e.description="",e.name="",csSidebars.showEditor(e)}),b.click(csSidebars.showExport),d.appendTo(c).attr("placeholder",csSidebarsData.filter).keyup(csSidebars.filter_sidebars).on("search",csSidebars.filter_sidebars),csSidebars},initToolbars:function(){function a(a){var b=jQuery(a.target).closest(".cs-tool"),c=b.data("action"),d=csSidebars.getIdFromEditbar(b),e=csSidebars.find(d);return!csSidebars.handleAction(c,e)}return csSidebars.registerAction("edit",csSidebars.showEditor),csSidebars.registerAction("location",csSidebars.showLocations),csSidebars.registerAction("delete",csSidebars.showRemove),csSidebars.registerAction("replaceable",csSidebars.setReplaceable),csSidebars.right.on("click",".cs-tool",a),csSidebars},handleAction:function(a,b){return"function"==typeof csSidebars.action_handlers[a]&&!!csSidebars.action_handlers[a](b)},registerAction:function(a,b){csSidebars.action_handlers[a]=b},showAjaxError:function(a){var b={};b.message=csSidebarsData.ajax_error,b.details=a,b.parent="#widgets-right",b.insert_after="#cs-title-options",b.id="editor",b.type="err",wpmUi.message(b)},sort_sidebars:function(a,b){var c=a.find(".widgets-holder-wrap"),d=a.find(".cs-title .cs-icon");c.sortElements(function(a,c){var d=jQuery(a).find(".sidebar-name h2").text(),e=jQuery(c).find(".sidebar-name h2").text();return"asc"===b?d>e?1:-1:d<e?1:-1}),a.data("sort-dir",b),"asc"===b?d.removeClass("dashicons-arrow-down dashicons-sort").addClass("dashicons-arrow-up"):d.removeClass("dashicons-arrow-up dashicons-sort").addClass("dashicons-arrow-down")},filter_sidebars:function(a){var b=jQuery("input.cs-filter").val().toLowerCase();csSidebars.right.find(".widgets-holder-wrap").each(function(){var a=jQuery(this);-1!==a.find(".sidebar-name h2").text().toLowerCase().indexOf(b)?a.show():a.hide()}),jQuery(window).trigger("cs-resize")},showEditor:function(b){function c(){i.$().removeClass("csb-has-more"),i.size(782,215)}function d(){i.$().addClass("csb-has-more"),i.size(782,545)}function e(){jQuery(this).prop("checked")?d():c()}function f(a,b,c){return i.loading(!1),!!a&&(b?(a.sidebar&&(a=a.sidebar),a.id&&i.$().find("#csb-id").val(a.id),a.name&&i.$().find("#csb-name").val(a.name),a.description&&i.$().find("#csb-description").val(a.description),a.before_title&&i.$().find("#csb-before-title").val(a.before_title),a.after_title&&i.$().find("#csb-after-title").val(a.after_title),a.before_widget&&i.$().find("#csb-before-widget").val(a.before_widget),a.after_widget&&i.$().find("#csb-after-widget").val(a.after_widget),void(a.button&&i.$().find(".btn-save").text(a.button))):(i.destroy(),csSidebars.showAjaxError(a),!1))}function g(b,c,d){var e,f={};i.loading(!1),i.destroy(),f.message=b.message,f.parent="#widgets-right",f.insert_after="#cs-title-options",f.id="editor",c?"update"===b.action?(e=csSidebars.find(b.data.id),csSidebars.updateSidebar(e,b.data)):"insert"===b.action&&(csSidebars.insertSidebar(b.data),a(".cs-wrap .custom-sidebars-add-new").detach()):f.type="err",wpmUi.message(f)}function h(){var a=i.$().find("form");return i.loading(!0),j.reset().data(a).ondone(g).load_json(),!1}var i=null,j=null;return b instanceof CsSidebar&&(b={id:b.getID(),title:csSidebarsData.title_edit.replace("[Sidebar]",b.name),button:csSidebarsData.btn_edit}),i=wpmUi.popup().modal(!0).title(b.title).onshow(c).content(csSidebars.edit_form),c(),f(b,!0,null),j=wpmUi.ajax(null,"cs-ajax"),b.id&&(i.loading(!0),j.reset().data({do:"get",sb:b.id}).ondone(f).load_json()),i.show(),i.$().find("#csb-name").focus(),i.$().on("click","#csb-more",e),i.$().on("click",".btn-save",h),i.$().on("click",".btn-cancel",i.destroy),!0},updateSidebar:function(a,b){return a.sb.find(".sidebar-name h2").text(b.name),a.sb.find(".sidebar-description").html('<p class="description"></p>').find(".description").text(b.description),csSidebars},insertSidebar:function(a){var b=jQuery('<div class="widgets-holder-wrap"></div>'),c=jQuery('<div class="widgets-sortables ui-sortable"></div>'),d=jQuery('<div class="sidebar-name"><div class="sidebar-name-arrow"><br></div><h2></h2></div>'),e=jQuery('<div class="sidebar-description"></div>'),f=csSidebars.right.find(".sidebars-column-1 > .inner:first");return c.attr("id",a.id),d.find("h2").text(a.name),e.html('<p class="description"></p>').find(".description").text(a.description),d.appendTo(c),e.appendTo(c),c.appendTo(b),b.prependTo(f),jQuery("#widgets-right .sidebar-name").unbind("click"),jQuery("#widgets-left .sidebar-name").unbind("click"),jQuery(document.body).unbind("click.widgets-toggle"),jQuery(".widgets-chooser").off("click.widgets-chooser").off("keyup.widgets-chooser"),jQuery("#available-widgets .widget .widget-title").off("click.widgets-chooser"),jQuery(".widgets-chooser-sidebars").empty(),window.wpWidgets.init(),csSidebars.initSidebars(),csSidebars},showExport:function(){function a(a){var b=jQuery(this).closest("form");return h.reset().data(b).load_http(),g.destroy(),a.preventDefault(),!1}function b(a,b,c){var d={};g.loading(!1),b?g.size(900,600).content(a.html):(d.message=a.message,d.parent=g.$().find(".wpmui-wnd-content"),d.insert_after=!1,d.id="export",d.class="wpmui-wnd-err",d.type="err",wpmUi.message(d))}function c(a){var c=jQuery(this).closest("form");return g.loading(!0),h.reset().data(c).ondone(b).load_json("cs-ajax"),a.preventDefault(),!1}function d(){var a=jQuery(this),b=a.prop("checked"),c=g.$().find(".column-widgets, .import-widgets");b?c.show():c.hide()}function e(){g.size(782,480),g.content(csSidebars.export_form)}function f(){var a=g.$().find(".frm-import");g.loading(!0),h.reset().data(a).load_http("_self")}var g=null,h=null;return g=wpmUi.popup().modal(!0).size(782,480).title(csSidebarsData.title_export).content(csSidebars.export_form).show(),h=wpmUi.ajax(null,"cs-ajax"),g.$().on("submit",".frm-export",a),g.$().on("submit",".frm-preview-import",c),g.$().on("change","#import-widgets",d),g.$().on("click",".btn-cancel",e),g.$().on("click",".btn-import",f),!0},showRemove:function(a){function b(a){a.find(".name").text(i)}function c(){f.loading(!1),f.destroy()}function d(a,b,c){var d={};f.loading(!1),f.destroy(),d.message=a.message,d.parent="#widgets-right",d.insert_after="#cs-title-options",d.id="editor",b?(csSidebars.right.find("#"+h).closest(".widgets-holder-wrap").remove(),csSidebars.remove(h),"delete"===a.action&&window.csSidebars.showGetStartedBox()):d.type="err",wpmUi.message(d)}function e(){f.loading(!0),g.reset().data({do:"delete",sb:h}).ondone(d).load_json()}var f=null,g=null,h=a.getID(),i=a.name;return f=wpmUi.popup().modal(!0).size(560,160).title(csSidebarsData.title_delete).content(csSidebars.delete_form).onshow(b).show(),g=wpmUi.ajax(null,"cs-ajax"),f.$().on("click",".btn-cancel",c),f.$().on("click",".btn-delete",e),!0},showLocations:function(a){function b(a,b,c){function d(a,b,c){var d=jQuery("<option></option>");d.attr("value",c).text(a.name),b.append(d)}function e(a,b,c,d){var e=d.closest(".cs-replaceable").filter("."+b),f=e.find('option[value="'+c+'"]'),g=e.find("optgroup.used"),h=e.find(".detail-toggle");a===j?(f.prop("selected",!0),!0!==h.prop("checked")&&(h.prop("checked",!0),e.addClass("open"),wpmUi.upgrade_multiselect(e))):(g.length||(g=jQuery('<optgroup class="used">').attr("label",e.data("lbl-used")).appendTo(e.find(".details select"))),f.detach().appendTo(g))}var g,h,i;if(f.loading(!1),!b)return f.destroy(),void csSidebars.showAjaxError(a);f.$().find(".sb-name").text(a.sidebar.name);var j=a.sidebar.id,k=f.$().find(".cs-replaceable");k.hide(),a.replaceable=wpmUi.obj(a.replaceable);for(var l in a.replaceable)a.replaceable.hasOwnProperty(l)&&k.filter("."+a.replaceable[l]).show();var m=f.$().find(".cs-datalist.cs-cat"),n=f.$().find(".cs-datalist.cs-arc-cat"),o=a.categories;n.empty(),m.empty();for(var p in o)d(o[p],n,p),d(o[p],m,p);for(var q in o){if(o[q].single)for(g in o[q].single)e(o[q].single[g],g,q,m);if(o[q].archive)for(g in o[q].archive)e(o[q].archive[g],g,q,n)}var r=f.$().find(".cs-datalist.cs-pt"),s=a.posttypes;r.empty();for(var t in s)h=jQuery("<option></option>"),i=s[t].name,h.attr("value",t).text(i),r.append(h);for(var u in s)if(s[u].single)for(g in s[u].single)e(s[u].single[g],g,u,r);var v=f.$().find(".cs-datalist.cs-arc"),w=a.archives;v.empty();for(var x in w)h=jQuery("<option></option>"),i=w[x].name,h.attr("value",x).text(i),v.append(h);for(var y in w)if(w[y].archive)for(g in w[y].archive)e(w[y].archive[g],g,y,v);var z=f.$().find(".cs-datalist.cs-arc-aut"),A=a.authors;z.empty();for(var B in A)h=jQuery("<option></option>"),i=A[B].name,h.attr("value",B).text(i),z.append(h);for(var C in A)if(A[C].archive)for(g in A[C].archive)e(A[C].archive[g],g,C,z)}function c(a){var b=jQuery(this),c=b.closest(".cs-replaceable"),d=c.find("select");b.prop("checked")?(c.addClass("open"),wpmUi.upgrade_multiselect(c),d.trigger("change.select2")):(c.removeClass("open"),d.val([]))}function d(a,b,c){var d={};f.loading(!1),f.destroy(),d.message=a.message,d.parent="#widgets-right",d.insert_after="#cs-title-options",d.id="editor",b||(d.type="err"),wpmUi.message(d)}function e(){f.loading(!0),g.reset().data(h).ondone(d).load_json()}var f=null,g=null,h=null,i=a.getID();return f=wpmUi.popup().modal(!0).size(782,560).title(csSidebarsData.title_location).content(csSidebars.location_form).show(),f.loading(!0),h=f.$().find(".frm-location"),h.find(".sb-id").val(i),g=wpmUi.ajax(null,"cs-ajax"),g.reset().data({do:"get-location",sb:i}).ondone(b).load_json(),f.$().on("click",".detail-toggle",c),f.$().on("click",".btn-save",e),f.$().on("click",".btn-cancel",f.destroy),!0},setReplaceable:function(a,b,c){function d(a,b,c){a instanceof Object&&"object"==typeof a.replaceable&&(csSidebarsData.replaceable=wpmUi.obj(a.replaceable),f.find(".widgets-sortables").each(function(){var a=!1,b=jQuery(this),c=b.attr("id"),d=csSidebars.find(c);for(var e in csSidebarsData.replaceable)if(csSidebarsData.replaceable.hasOwnProperty(e)&&csSidebarsData.replaceable[e]===c){a=!0;break}csSidebars.setReplaceable(d,a,!1)})),f.find(".cs-toolbar .chk-replaceable").prop("disabled",!1),f.find(".cs-toolbar .btn-replaceable").removeClass("wpmui-loading")}var e,f=csSidebars.right.find(".sidebars-column-2 .widgets-holder-wrap"),g=jQuery(a.sb).closest(".widgets-holder-wrap"),h=g.find(".cs-toolbar .chk-replaceable"),i=g.find(".replace-marker");g.find(".cs-toolbar .btn-replaceable");return void 0===b&&(b=h.prop("checked")),void 0===c&&(c=!0),h.data("active")!==b&&(h.data("active",b),h.prop("checked",b),b?(i.length||jQuery("<div></div>").appendTo(g).attr("data-label",csSidebarsData.lbl_replaceable).addClass("replace-marker"),g.addClass("replaceable")):(i.remove(),g.removeClass("replaceable")),c&&(f.find(".cs-toolbar .chk-replaceable").prop("disabled",!0),f.find(".cs-toolbar .btn-replaceable").addClass("wpmui-loading"),e=wpmUi.ajax(null,"cs-ajax"),e.reset().data({do:"replaceable",state:b,sb:a.getID()}).ondone(d).load_json()),!1)},find:function(a){return csSidebars.sidebars[a]},add:function(a,b){return csSidebars.sidebars[a]=new CsSidebar(a,b),csSidebars.sidebars[a]},remove:function(a){delete csSidebars.sidebars[a]},isCustomSidebar:function(a){return jQuery(a).attr("id").substr(0,csSidebars.sidebar_prefix.length)===csSidebars.sidebar_prefix},addIdToLabel:function(a,b){if(!0!==a.data("label-done")){var c=a.attr("for");a.attr("for",c+b),a.find(".has-label").attr("id",c+b),a.data("label-done",!0)}},getIdFromEditbar:function(a){return a.closest(".widgets-holder-wrap").find(".widgets-sortables:first").attr("id")},showGetStartedBox:function(){if(0===a(".sidebars-column-1 .inner .widgets-holder-wrap").length){var b=wp.template("custom-sidebars-new");a(".sidebars-column-1 .inner").before(b()),a(".custom-sidebars-add-new").on("click",function(){a("button.btn-create-sidebar").click()})}}},jQuery(function(a){a("#csfooter").hide(),a("#widgets-right").length>0&&csSidebars.init(),a(".defaultsContainer").hide(),a("#widgets-right .widgets-sortables").on("sort",function(b,c){a("#widgets-right").top;c.position.top=-a("#widgets-right").css("top")})}),jQuery(document).ready(function(a){window.setTimeout(function(){window.csSidebars.showGetStartedBox()},1e3)})}(jQuery),jQuery.fn.sortElements=function(){var a=[].sort;return function(b,c){c=c||function(){return this};var d=this.map(function(){var a=c.call(this),b=a.parentNode,d=b.insertBefore(document.createTextNode(""),a.nextSibling);return function(){if(b===this)throw new Error("You can't sort elements if any one is a descendant of another.");b.insertBefore(this,d),b.removeChild(d)}});return a.call(this,b).each(function(a){d[a].call(c.call(this))})}}();
|
1 |
+
/*! Custom Sidebars - v3.0.6
|
2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
4 |
|
5 |
+
function trim(a){a=a.replace(/^\s\s*/,"");for(var b=a.length-1;b>=0;b--)if(/\S/.test(a.charAt(b))){a=a.substring(0,b+1);break}return a}function CsSidebar(a,b){var c;this.id=a.split("%").join("\\%"),this.type=b,this.sb=jQuery("#"+this.id),this.widgets="",this.name=trim(this.sb.find(".sidebar-name h2").text()),this.description=trim(this.sb.find(".sidebar-description").text()),c="custom"===b?window.csSidebars.extras.find(".cs-custom-sidebar").clone():window.csSidebars.extras.find(".cs-theme-sidebar").clone(),this.sb.parent().append(c),c.find("label").each(function(){var b=jQuery(this);window.csSidebars.addIdToLabel(b,a)})}CsSidebar.prototype.getID=function(){return this.id.split("\\").join("")},window.csSidebars=null,function(a){window.csSidebars={sidebars:[],sidebar_prefix:"cs-",edit_form:null,delete_form:null,export_form:null,location_form:null,right:null,extras:null,action_handlers:{},init:function(){"undefined"!=typeof csSidebarsData&&csSidebars.initControls().initTopTools().initSidebars().initToolbars().initColumns()},initControls:function(){return csSidebars.right=jQuery("#widgets-right"),csSidebars.extras=jQuery("#cs-widgets-extra"),null===csSidebars.edit_form&&(csSidebars.edit_form=csSidebars.extras.find(".cs-editor").clone(),csSidebars.extras.find(".cs-editor").remove()),null===csSidebars.delete_form&&(csSidebars.delete_form=csSidebars.extras.find(".cs-delete").clone(),csSidebars.extras.find(".cs-delete").remove()),null===csSidebars.export_form&&(csSidebars.export_form=csSidebars.extras.find(".cs-export").clone(),csSidebars.extras.find(".cs-export").remove()),null===csSidebars.location_form&&(csSidebars.location_form=csSidebars.extras.find(".cs-location").clone(),csSidebars.extras.find(".cs-location").remove()),jQuery("#cs-title-options").detach().prependTo(csSidebars.right),csSidebars},initColumns:function(){function a(){var a=jQuery(this),b=a.closest(".sidebars-column-1, .sidebars-column-2"),c=b.data("sort-dir");c="asc"===c?"desc":"asc",csSidebars.sort_sidebars(b,c)}var b=csSidebars.right.find(".sidebars-column-1"),c=csSidebars.right.find(".sidebars-column-2"),d=jQuery('<div class="cs-title"><h2></h2></div>'),e=csSidebars.right.find(".widgets-holder-wrap");c.length||(c=jQuery('<div class="sidebars-column-2"></div>'),c.appendTo(csSidebars.right)),d.find("h2").append('<span class="cs-title-val"></span><i class="cs-icon dashicons dashicons-sort"></i>').css({cursor:"pointer"}),d.clone().prependTo(b).click(a).find(".cs-title-val").text(csSidebarsData.custom_sidebars),d.clone().prependTo(c).click(a).find(".cs-title-val").text(csSidebarsData.theme_sidebars),b=jQuery('<div class="inner"></div>').appendTo(b),c=jQuery('<div class="inner"></div>').appendTo(c),e.each(function(){var a=jQuery(this),d=a.find(".widgets-sortables");csSidebars.isCustomSidebar(d)?a.appendTo(b):a.appendTo(c)})},initSidebars:function(){return csSidebars.right.find(".widgets-sortables").each(function(){var a,b,c=!1,d=jQuery(this),e=d.attr("id");if(!0!==d.data("cs-init"))if(d.data("cs-init",!0),csSidebars.isCustomSidebar(this))b=csSidebars.add(e,"custom");else{b=csSidebars.add(e,"theme");for(a in csSidebarsData.replaceable)if(csSidebarsData.replaceable.hasOwnProperty(a)&&csSidebarsData.replaceable[a]===e){c=!0;break}csSidebars.setReplaceable(b,c,!1)}}),csSidebars},initTopTools:function(){var a=jQuery(".btn-create-sidebar"),b=jQuery(".btn-export"),c=jQuery(".cs-options"),d=jQuery('<input type="search" class="cs-filter" />'),e={};return a.click(function(){e.id="",e.title=csSidebarsData.title_new,e.button=csSidebarsData.btn_new,e.description="",e.name="",csSidebars.showEditor(e)}),b.click(csSidebars.showExport),d.appendTo(c).attr("placeholder",csSidebarsData.filter).keyup(csSidebars.filter_sidebars).on("search",csSidebars.filter_sidebars),csSidebars},initToolbars:function(){function a(a){var b=jQuery(a.target).closest(".cs-tool"),c=b.data("action"),d=csSidebars.getIdFromEditbar(b),e=csSidebars.find(d);return!csSidebars.handleAction(c,e)}return csSidebars.registerAction("edit",csSidebars.showEditor),csSidebars.registerAction("location",csSidebars.showLocations),csSidebars.registerAction("delete",csSidebars.showRemove),csSidebars.registerAction("replaceable",csSidebars.setReplaceable),csSidebars.right.on("click",".cs-tool",a),csSidebars},handleAction:function(a,b){return"function"==typeof csSidebars.action_handlers[a]&&!!csSidebars.action_handlers[a](b)},registerAction:function(a,b){csSidebars.action_handlers[a]=b},showAjaxError:function(a){var b={};b.message=csSidebarsData.ajax_error,b.details=a,b.parent="#widgets-right",b.insert_after="#cs-title-options",b.id="editor",b.type="err",wpmUi.message(b)},sort_sidebars:function(a,b){var c=a.find(".widgets-holder-wrap"),d=a.find(".cs-title .cs-icon");c.sortElements(function(a,c){var d=jQuery(a).find(".sidebar-name h2").text(),e=jQuery(c).find(".sidebar-name h2").text();return"asc"===b?d>e?1:-1:d<e?1:-1}),a.data("sort-dir",b),"asc"===b?d.removeClass("dashicons-arrow-down dashicons-sort").addClass("dashicons-arrow-up"):d.removeClass("dashicons-arrow-up dashicons-sort").addClass("dashicons-arrow-down")},filter_sidebars:function(a){var b=jQuery("input.cs-filter").val().toLowerCase();csSidebars.right.find(".widgets-holder-wrap").each(function(){var a=jQuery(this);-1!==a.find(".sidebar-name h2").text().toLowerCase().indexOf(b)?a.show():a.hide()}),jQuery(window).trigger("cs-resize")},showEditor:function(b){function c(){i.$().removeClass("csb-has-more"),i.size(782,215)}function d(){i.$().addClass("csb-has-more"),i.size(782,545)}function e(){jQuery(this).prop("checked")?d():c()}function f(a,b,c){return i.loading(!1),!!a&&(b?(a.sidebar&&(a=a.sidebar),a.id&&i.$().find("#csb-id").val(a.id),a.name&&i.$().find("#csb-name").val(a.name),a.description&&i.$().find("#csb-description").val(a.description),a.before_title&&i.$().find("#csb-before-title").val(a.before_title),a.after_title&&i.$().find("#csb-after-title").val(a.after_title),a.before_widget&&i.$().find("#csb-before-widget").val(a.before_widget),a.after_widget&&i.$().find("#csb-after-widget").val(a.after_widget),void(a.button&&i.$().find(".btn-save").text(a.button))):(i.destroy(),csSidebars.showAjaxError(a),!1))}function g(b,c,d){var e,f={};i.loading(!1),i.destroy(),f.message=b.message,f.parent="#widgets-right",f.insert_after="#cs-title-options",f.id="editor",c?"update"===b.action?(e=csSidebars.find(b.data.id),csSidebars.updateSidebar(e,b.data)):"insert"===b.action&&(csSidebars.insertSidebar(b.data),a(".cs-wrap .custom-sidebars-add-new").detach()):f.type="err",wpmUi.message(f)}function h(){var a=i.$().find("form");return i.loading(!0),j.reset().data(a).ondone(g).load_json(),!1}var i=null,j=null;return b instanceof CsSidebar&&(b={id:b.getID(),title:csSidebarsData.title_edit.replace("[Sidebar]",b.name),button:csSidebarsData.btn_edit}),i=wpmUi.popup().modal(!0).title(b.title).onshow(c).content(csSidebars.edit_form),c(),f(b,!0,null),j=wpmUi.ajax(null,"cs-ajax"),b.id&&(i.loading(!0),j.reset().data({do:"get",sb:b.id}).ondone(f).load_json()),i.show(),i.$().find("#csb-name").focus(),i.$().on("keypress","#csb-name",function(b){13===b.keyCode&&0<a(this).val().length&&a("#csb-description").focus()}),i.$().on("keypress","#csb-description",function(a){13===a.keyCode&&i.$(".btn-save").click()}),i.$().on("click","#csb-more",e),i.$().on("click",".btn-save",h),i.$().on("click",".btn-cancel",i.destroy),!0},updateSidebar:function(a,b){return a.sb.find(".sidebar-name h2").text(b.name),a.sb.find(".sidebar-description").html('<p class="description"></p>').find(".description").text(b.description),csSidebars},insertSidebar:function(a){var b=jQuery('<div class="widgets-holder-wrap"></div>'),c=jQuery('<div class="widgets-sortables ui-sortable"></div>'),d=jQuery('<div class="sidebar-name"><div class="sidebar-name-arrow"><br></div><h2></h2></div>'),e=jQuery('<div class="sidebar-description"></div>'),f=csSidebars.right.find(".sidebars-column-1 > .inner:first");return c.attr("id",a.id),d.find("h2").text(a.name),e.html('<p class="description"></p>').find(".description").text(a.description),d.appendTo(c),e.appendTo(c),c.appendTo(b),b.prependTo(f),jQuery("#widgets-right .sidebar-name").unbind("click"),jQuery("#widgets-left .sidebar-name").unbind("click"),jQuery(document.body).unbind("click.widgets-toggle"),jQuery(".widgets-chooser").off("click.widgets-chooser").off("keyup.widgets-chooser"),jQuery("#available-widgets .widget .widget-title").off("click.widgets-chooser"),jQuery(".widgets-chooser-sidebars").empty(),window.wpWidgets.init(),csSidebars.initSidebars(),csSidebars},showExport:function(){function a(a){var b=jQuery(this).closest("form");return h.reset().data(b).load_http(),g.destroy(),a.preventDefault(),!1}function b(a,b,c){var d={};g.loading(!1),b?g.size(900,600).content(a.html):(d.message=a.message,d.parent=g.$().find(".wpmui-wnd-content"),d.insert_after=!1,d.id="export",d.class="wpmui-wnd-err",d.type="err",wpmUi.message(d))}function c(a){var c=jQuery(this).closest("form");return g.loading(!0),h.reset().data(c).ondone(b).load_json("cs-ajax"),a.preventDefault(),!1}function d(){var a=jQuery(this),b=a.prop("checked"),c=g.$().find(".column-widgets, .import-widgets");b?c.show():c.hide()}function e(){g.size(782,480),g.content(csSidebars.export_form)}function f(){var a=g.$().find(".frm-import");g.loading(!0),h.reset().data(a).load_http("_self")}var g=null,h=null;return g=wpmUi.popup().modal(!0).size(782,480).title(csSidebarsData.title_export).content(csSidebars.export_form).show(),h=wpmUi.ajax(null,"cs-ajax"),g.$().on("submit",".frm-export",a),g.$().on("submit",".frm-preview-import",c),g.$().on("change","#import-widgets",d),g.$().on("click",".btn-cancel",e),g.$().on("click",".btn-import",f),!0},showRemove:function(a){function b(a){a.find(".name").text(i)}function c(){f.loading(!1),f.destroy()}function d(a,b,c){var d={};f.loading(!1),f.destroy(),d.message=a.message,d.parent="#widgets-right",d.insert_after="#cs-title-options",d.id="editor",b?(csSidebars.right.find("#"+h).closest(".widgets-holder-wrap").remove(),csSidebars.remove(h),"delete"===a.action&&window.csSidebars.showGetStartedBox()):d.type="err",wpmUi.message(d)}function e(){f.loading(!0),g.reset().data({do:"delete",sb:h}).ondone(d).load_json()}var f=null,g=null,h=a.getID(),i=a.name;return f=wpmUi.popup().modal(!0).size(560,160).title(csSidebarsData.title_delete).content(csSidebars.delete_form).onshow(b).show(),g=wpmUi.ajax(null,"cs-ajax"),f.$().on("click",".btn-cancel",c),f.$().on("click",".btn-delete",e),!0},showLocations:function(a){function b(a,b,c){function d(a,b,c){var d=jQuery("<option></option>");d.attr("value",c).text(a.name),b.append(d)}function e(a,b,c,d){var e=d.closest(".cs-replaceable").filter("."+b),f=e.find('option[value="'+c+'"]'),g=e.find("optgroup.used"),h=e.find(".detail-toggle");a===j?(f.prop("selected",!0),!0!==h.prop("checked")&&(h.prop("checked",!0),e.addClass("open"),wpmUi.upgrade_multiselect(e))):(g.length||(g=jQuery('<optgroup class="used">').attr("label",e.data("lbl-used")).appendTo(e.find(".details select"))),f.detach().appendTo(g))}var g,h,i;if(f.loading(!1),!b)return f.destroy(),void csSidebars.showAjaxError(a);f.$().find(".sb-name").text(a.sidebar.name);var j=a.sidebar.id,k=f.$().find(".cs-replaceable");k.hide(),a.replaceable=wpmUi.obj(a.replaceable);for(var l in a.replaceable)a.replaceable.hasOwnProperty(l)&&k.filter("."+a.replaceable[l]).show();var m=f.$().find(".cs-datalist.cs-cat"),n=f.$().find(".cs-datalist.cs-arc-cat"),o=a.categories;n.empty(),m.empty();for(var p in o)d(o[p],n,p),d(o[p],m,p);for(var q in o){if(o[q].single)for(g in o[q].single)e(o[q].single[g],g,q,m);if(o[q].archive)for(g in o[q].archive)e(o[q].archive[g],g,q,n)}var r=f.$().find(".cs-datalist.cs-pt"),s=a.posttypes;r.empty();for(var t in s)h=jQuery("<option></option>"),i=s[t].name,h.attr("value",t).text(i),r.append(h);for(var u in s)if(s[u].single)for(g in s[u].single)e(s[u].single[g],g,u,r);var v=f.$().find(".cs-datalist.cs-arc"),w=a.archives;v.empty();for(var x in w)h=jQuery("<option></option>"),i=w[x].name,h.attr("value",x).text(i),v.append(h);for(var y in w)if(w[y].archive)for(g in w[y].archive)e(w[y].archive[g],g,y,v);var z=f.$().find(".cs-datalist.cs-arc-aut"),A=a.authors;z.empty();for(var B in A)h=jQuery("<option></option>"),i=A[B].name,h.attr("value",B).text(i),z.append(h);for(var C in A)if(A[C].archive)for(g in A[C].archive)e(A[C].archive[g],g,C,z)}function c(a){var b=jQuery(this),c=b.closest(".cs-replaceable"),d=c.find("select");b.prop("checked")?(c.addClass("open"),wpmUi.upgrade_multiselect(c),d.trigger("change.select2")):(c.removeClass("open"),d.val([]))}function d(a,b,c){var d={};f.loading(!1),f.destroy(),d.message=a.message,d.parent="#widgets-right",d.insert_after="#cs-title-options",d.id="editor",b||(d.type="err"),wpmUi.message(d)}function e(){f.loading(!0),g.reset().data(h).ondone(d).load_json()}var f=null,g=null,h=null,i=a.getID();return f=wpmUi.popup().modal(!0).size(782,560).title(csSidebarsData.title_location).content(csSidebars.location_form).show(),f.loading(!0),h=f.$().find(".frm-location"),h.find(".sb-id").val(i),g=wpmUi.ajax(null,"cs-ajax"),g.reset().data({do:"get-location",sb:i}).ondone(b).load_json(),f.$().on("click",".detail-toggle",c),f.$().on("click",".btn-save",e),f.$().on("click",".btn-cancel",f.destroy),!0},setReplaceable:function(a,b,c){function d(a,b,c){a instanceof Object&&"object"==typeof a.replaceable&&(csSidebarsData.replaceable=wpmUi.obj(a.replaceable),f.find(".widgets-sortables").each(function(){var a=!1,b=jQuery(this),c=b.attr("id"),d=csSidebars.find(c);for(var e in csSidebarsData.replaceable)if(csSidebarsData.replaceable.hasOwnProperty(e)&&csSidebarsData.replaceable[e]===c){a=!0;break}csSidebars.setReplaceable(d,a,!1)})),f.find(".cs-toolbar .chk-replaceable").prop("disabled",!1),f.find(".cs-toolbar .btn-replaceable").removeClass("wpmui-loading")}var e,f=csSidebars.right.find(".sidebars-column-2 .widgets-holder-wrap"),g=jQuery(a.sb).closest(".widgets-holder-wrap"),h=g.find(".cs-toolbar .chk-replaceable"),i=g.find(".replace-marker");g.find(".cs-toolbar .btn-replaceable");return void 0===b&&(b=h.prop("checked")),void 0===c&&(c=!0),h.data("active")!==b&&(h.data("active",b),h.prop("checked",b),b?(i.length||jQuery("<div></div>").appendTo(g).attr("data-label",csSidebarsData.lbl_replaceable).addClass("replace-marker"),g.addClass("replaceable")):(i.remove(),g.removeClass("replaceable")),c&&(f.find(".cs-toolbar .chk-replaceable").prop("disabled",!0),f.find(".cs-toolbar .btn-replaceable").addClass("wpmui-loading"),e=wpmUi.ajax(null,"cs-ajax"),e.reset().data({do:"replaceable",state:b,sb:a.getID()}).ondone(d).load_json()),!1)},find:function(a){return csSidebars.sidebars[a]},add:function(a,b){return csSidebars.sidebars[a]=new CsSidebar(a,b),csSidebars.sidebars[a]},remove:function(a){delete csSidebars.sidebars[a]},isCustomSidebar:function(a){return jQuery(a).attr("id").substr(0,csSidebars.sidebar_prefix.length)===csSidebars.sidebar_prefix},addIdToLabel:function(a,b){if(!0!==a.data("label-done")){var c=a.attr("for");a.attr("for",c+b),a.find(".has-label").attr("id",c+b),a.data("label-done",!0)}},getIdFromEditbar:function(a){return a.closest(".widgets-holder-wrap").find(".widgets-sortables:first").attr("id")},showGetStartedBox:function(){if(0===a(".sidebars-column-1 .inner .widgets-holder-wrap").length){var b=wp.template("custom-sidebars-new");a(".sidebars-column-1 .inner").before(b()),a(".custom-sidebars-add-new").on("click",function(){a("button.btn-create-sidebar").click()})}}},jQuery(function(a){a("#csfooter").hide(),a("#widgets-right").length>0&&csSidebars.init(),a(".defaultsContainer").hide(),a("#widgets-right .widgets-sortables").on("sort",function(b,c){a("#widgets-right").top;c.position.top=-a("#widgets-right").css("top")})}),jQuery(document).ready(function(a){window.setTimeout(function(){window.csSidebars.showGetStartedBox()},1e3)})}(jQuery),jQuery.fn.sortElements=function(){var a=[].sort;return function(b,c){c=c||function(){return this};var d=this.map(function(){var a=c.call(this),b=a.parentNode,d=b.insertBefore(document.createTextNode(""),a.nextSibling);return function(){if(b===this)throw new Error("You can't sort elements if any one is a descendant of another.");b.insertBefore(this,d),b.removeChild(d)}});return a.call(this,b).each(function(a){d[a].call(c.call(this))})}}();
|
lang/custom-sidebars.pot
CHANGED
@@ -4,7 +4,7 @@ msgid ""
|
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: Custom Sidebars Pro PLUGIN_VERSION\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/customsidebars\n"
|
7 |
-
"POT-Creation-Date: 2017-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: Custom Sidebars Pro PLUGIN_VERSION\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/customsidebars\n"
|
7 |
+
"POT-Creation-Date: 2017-05-08 08:30:57+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: WPMUDEV, marquex, WPMUDEV-Support2, WPMUDEV-Support1, WPMUDEV-Supp
|
|
3 |
Tags: sidebar, widget, footer, custom, flexible layout, dynamic widgets, manage sidebars, replace widgets, custom widget area
|
4 |
Requires at least: 3.3
|
5 |
Tested up to: 4.7.4
|
6 |
-
Stable tag: 3.0.
|
7 |
|
8 |
Flexible sidebars for custom widget configurations on every page, post and custom post type on your site.
|
9 |
|
@@ -120,6 +120,11 @@ If you are running a earlier version of WordPress download Custom Sidebars 0.8.2
|
|
120 |
|
121 |
== Changelog ==
|
122 |
|
|
|
|
|
|
|
|
|
|
|
123 |
= 3.0.5 =
|
124 |
* Improved columns display on post list screen - now "Custom Sidebars" column is hidden by default.
|
125 |
* Prevent to load assets on front-end.
|
3 |
Tags: sidebar, widget, footer, custom, flexible layout, dynamic widgets, manage sidebars, replace widgets, custom widget area
|
4 |
Requires at least: 3.3
|
5 |
Tested up to: 4.7.4
|
6 |
+
Stable tag: 3.0.6
|
7 |
|
8 |
Flexible sidebars for custom widget configurations on every page, post and custom post type on your site.
|
9 |
|
120 |
|
121 |
== Changelog ==
|
122 |
|
123 |
+
= 3.0.6 =
|
124 |
+
* Added width to "Custom Sidebars" column on entries list screen to avoid uncontrolled column width.
|
125 |
+
* Added ability to add new sidebar using the only keyboard, after you fill name just push enter to move to the description field. Hit enter on description field to add a new sidebar.
|
126 |
+
- Fixed "WPMUDEV Frash" module message for pro version.
|
127 |
+
|
128 |
= 3.0.5 =
|
129 |
* Improved columns display on post list screen - now "Custom Sidebars" column is hidden by default.
|
130 |
* Prevent to load assets on front-end.
|