Code Snippets - Version 3.1.0

Version Description

Comprehensive persistent object caching support.

Download this release

Release Info

Developer bungeshea
Plugin Icon Code Snippets
Version 3.1.0
Comparing to
See all releases

Code changes from version 3.0.1 to 3.1.0

code-snippets.php CHANGED
@@ -9,7 +9,7 @@
9
  * @author Shea Bunge <shea@codesnippets.pro>
10
  * @copyright 2012-2022 Shea Bunge
11
  * @license GPL-2.0-or-later https://spdx.org/licenses/GPL-2.0-or-later.html
12
- * @version 3.0.1
13
  * @link https://github.com/sheabunge/code-snippets
14
  */
15
 
@@ -19,7 +19,7 @@ Plugin URI: https://codesnippets.pro
19
  Description: An easy, clean and simple way to run code snippets on your site. No need to edit to your theme's functions.php file again!
20
  Author: Code Snippets Pro
21
  Author URI: https://codesnippets.pro
22
- Version: 3.0.1
23
  License: GPL-2.0-or-later
24
  License URI: license.txt
25
  Text Domain: code-snippets
9
  * @author Shea Bunge <shea@codesnippets.pro>
10
  * @copyright 2012-2022 Shea Bunge
11
  * @license GPL-2.0-or-later https://spdx.org/licenses/GPL-2.0-or-later.html
12
+ * @version 3.1.0
13
  * @link https://github.com/sheabunge/code-snippets
14
  */
15
 
19
  Description: An easy, clean and simple way to run code snippets on your site. No need to edit to your theme's functions.php file again!
20
  Author: Code Snippets Pro
21
  Author URI: https://codesnippets.pro
22
+ Version: 3.1.0
23
  License: GPL-2.0-or-later
24
  License URI: license.txt
25
  Text Domain: code-snippets
css/min/edit-rtl.css CHANGED
@@ -1,2 +1,2 @@
1
- .tagger{border:1px solid #909497}.tagger input[type=hidden]{display:none}.tagger>ul{align-items:center;box-sizing:border-box;display:flex;height:auto;justify-content:space-between;padding:4px 0;width:100%}.tagger ul{list-style:none;margin:0}.tagger>ul>li{margin:.4rem 0;padding-right:10px}.tagger-new ul a,.tagger-new ul a:visited,.tagger>ul>li:not(.tagger-new) a,.tagger>ul>li:not(.tagger-new) a:visited{color:#000}.tagger .tagger-new ul,.tagger li:not(.tagger-new)>span,.tagger>ul>li:not(.tagger-new)>a{background:#b1c3d7;border:1px solid #4181ed;border-radius:3px;padding:4px 8px 4px 4px}.tagger li a.close{filter:alpha(opacity=100);float:none;font-size:16px;line-height:16px;margin-right:4px;opacity:1;padding:4px}.tagger li a.close:hover{color:#fff}.tagger li:not(.tagger-new) a{text-decoration:none}.tagger .tagger-new input{background:transparent;border:none;box-shadow:none;outline:none;padding-right:0;width:100%}.tagger .tagger-new{flex-grow:1;position:relative}.tagger .tagger-new ul{padding:5px}.tagger .tagger-completion{position:absolute;z-index:100}.tagger.wrap>ul{flex-wrap:wrap;justify-content:start}.codemirror-colorview{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAJElEQVQYV2NctWrVfwYkEBYWxojMZ6SDAmT7QGx0K1EcRBsFAADeG/3M/HteAAAAAElFTkSuQmCC") repeat;border:1px solid #cecece;box-sizing:border-box;cursor:pointer;display:inline-block;height:10px;margin:0 2px;position:relative;vertical-align:middle;width:10px}.codemirror-colorview .codemirror-colorview-background{bottom:0;content:"";right:0;position:absolute;left:0;top:0}.codemirror-colorview:hover{border-color:#494949}.codemirror-colorpicker{background-color:#fff;border:1px solid rgba(0,0,0,.2);border-radius:3px;box-shadow:0 0 10px 2px rgba(0,0,0,.12);display:inline-block;position:relative;width:224px;z-index:1000}.codemirror-colorpicker>.arrow{border-bottom:10px solid rgba(0,0,0,.2);border-right:10px solid transparent;border-left:10px solid transparent;display:none;height:0;right:7px;pointer-events:none;position:absolute;top:-10px;width:0}.codemirror-colorpicker>.arrow:after{border-bottom:9px solid #fff;border-right:9px solid transparent;border-left:9px solid transparent;content:"";height:0;right:-9px;position:absolute;top:1px;width:0}.codemirror-colorpicker .colorpicker-body .arrow-button{background-color:transparent;height:12px;padding:0;position:relative;width:10px}.codemirror-colorpicker .colorpicker-body .arrow-button:before{border-bottom:3px solid #000;height:50%;top:0}.codemirror-colorpicker .colorpicker-body .arrow-button:after,.codemirror-colorpicker .colorpicker-body .arrow-button:before{border-right:3px solid transparent;border-left:3px solid transparent;box-sizing:border-box;content:"";display:inline-block;height:0;right:0;margin:2px;pointer-events:none;position:absolute;left:0;width:0}.codemirror-colorpicker .colorpicker-body .arrow-button:after{border-top:3px solid #000;bottom:0;top:50%}.codemirror-colorpicker .colorpicker-body .color{cursor:pointer;height:120px;overflow:hidden;position:relative}.codemirror-colorpicker .colorpicker-body .color>.saturation,.codemirror-colorpicker .colorpicker-body .color>.saturation>.value{height:100%;position:relative;width:100%}.codemirror-colorpicker .colorpicker-body .color>.saturation>.value>.drag-pointer{border-radius:50%;height:10px;position:absolute;transform:translateX(50%) translateY(-50%);width:10px}.codemirror-colorpicker .colorpicker-body .color>.saturation{background-color:hsla(20,42%,65%,0);background-image:linear-gradient(-90deg,#fff,hsla(20,42%,65%,0));background-repeat:repeat-x}.codemirror-colorpicker .colorpicker-body .color>.saturation>.value{background-image:linear-gradient(0deg,#000,hsla(20,42%,65%,0))}.codemirror-colorpicker .colorpicker-body .color>.saturation>.value>.drag-pointer{border:1px solid #fff;box-shadow:0 0 2px 0 rgba(0,0,0,.05)}.codemirror-colorpicker .colorpicker-body .control{padding:10px 0;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.codemirror-colorpicker .colorpicker-body .control.has-eyedropper{padding-right:30px}.codemirror-colorpicker .colorpicker-body .control.has-eyedropper .el-cp-color-control__left{border-radius:50%;box-sizing:border-box;height:30px;right:12px;position:absolute;top:20px;width:30px}.codemirror-colorpicker .colorpicker-body .control.has-eyedropper>.color,.codemirror-colorpicker .colorpicker-body .control.has-eyedropper>.empty{right:45px}.codemirror-colorpicker .colorpicker-body .control>.color,.codemirror-colorpicker .colorpicker-body .control>.empty{border-radius:50%;box-sizing:border-box;height:30px;right:12px;position:absolute;top:14px;width:30px}.codemirror-colorpicker .colorpicker-body .control>.color{border:1px solid rgba(0,0,0,.1)}.codemirror-colorpicker .colorpicker-body .control>.hue{box-sizing:border-box;cursor:pointer;margin:0 42px 0 0;padding:6px 16px;position:relative}.codemirror-colorpicker .colorpicker-body .control>.hue>.hue-container{border-radius:3px;height:10px;position:relative;width:100%}.codemirror-colorpicker .colorpicker-body .control>.opacity{box-sizing:border-box;cursor:pointer;margin:0 42px 0 0;padding:3px 16px;position:relative}.codemirror-colorpicker .colorpicker-body .control>.opacity>.opacity-container{border-radius:3px;height:10px;position:relative;width:100%}.codemirror-colorpicker .colorpicker-body .control .drag-bar,.codemirror-colorpicker .colorpicker-body .control .drag-bar2{border-radius:50%;cursor:pointer;height:12px;right:0;position:absolute;top:50%;transform:translateX(50%) translateY(-50%);width:12px}.codemirror-colorpicker .colorpicker-body .control>.hue>.hue-container{background:linear-gradient(-90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.codemirror-colorpicker .colorpicker-body .control>.opacity>.opacity-container{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAJElEQVQYV2NctWrVfwYkEBYWxojMZ6SDAmT7QGx0K1EcRBsFAADeG/3M/HteAAAAAElFTkSuQmCC") repeat}.codemirror-colorpicker .colorpicker-body .control>.opacity>.opacity-container>.color-bar{bottom:0;content:"";display:block;right:0;position:absolute;left:0;top:0}.codemirror-colorpicker .colorpicker-body .control>.empty{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAJElEQVQYV2NctWrVfwYkEBYWxojMZ6SDAmT7QGx0K1EcRBsFAADeG/3M/HteAAAAAElFTkSuQmCC") repeat}.codemirror-colorpicker .colorpicker-body .control .drag-bar,.codemirror-colorpicker .colorpicker-body .control .drag-bar2{background-color:#fefefe;border:1px solid rgba(0,0,0,.05);box-shadow:-2px 2px 2px 0 rgba(0,0,0,.2)}.codemirror-colorpicker .colorpicker-body .information{box-sizing:padding-box;position:relative}.codemirror-colorpicker .colorpicker-body .information>input{bottom:20px;box-sizing:border-box;font-size:10px;height:20px;padding:0 2px 0 0;position:absolute;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.codemirror-colorpicker .colorpicker-body .information>input[type=number]{-webkit-appearance:none;-moz-appearance:none;appearance:none}.codemirror-colorpicker .colorpicker-body .information>input[type=number]::-webkit-inner-spin-button,.codemirror-colorpicker .colorpicker-body .information>input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.codemirror-colorpicker .colorpicker-body .information.hex>.information-item.hex,.codemirror-colorpicker .colorpicker-body .information.hsl>.information-item.hsl,.codemirror-colorpicker .colorpicker-body .information.rgb>.information-item.rgb{display:flex}.codemirror-colorpicker .colorpicker-body .information>.information-item{box-sizing:border-box;display:none;margin-left:40px;padding:0 9px 0 5px;position:relative}.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field{box-sizing:border-box;display:block;flex:1;padding:3px;position:relative}.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field>.title{color:#a9a9a9;cursor:pointer;font-size:12px;padding-top:2px;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field input{border:1px solid #cbcbcb;border-radius:2px;box-sizing:border-box;color:#333;font-size:11px;height:21px;padding:3px;text-align:center;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;width:100%}.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field input[type=number]{-webkit-appearance:none;-moz-appearance:none;appearance:none}.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field input[type=number]::-webkit-inner-spin-button,.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field.hsl-l input[type=number],.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field.hsl-s input[type=number]{padding-right:1px;padding-left:10px}.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field .postfix{box-sizing:border-box;display:inline-block;font-size:11px;height:21px;line-height:2;padding:2px;position:absolute;left:3px;text-align:center;top:2px}.codemirror-colorpicker .colorpicker-body .information>.information-change{bottom:0;box-sizing:border-box;display:block;padding-top:5px;position:absolute;left:0;text-align:center;top:0;width:40px}.codemirror-colorpicker .colorpicker-body .information>.information-change>.format-change-button{background:transparent;border:0;box-sizing:border-box;cursor:pointer;outline:none}.codemirror-colorpicker .colorpicker-body .information>.title{color:#a3a3a3}.codemirror-colorpicker .colorpicker-body .information>.input{color:#333}.codemirror-colorpicker .colorpicker-body .colorsets{border-top:1px solid #e2e2e2}.codemirror-colorpicker .colorpicker-body .colorsets>.menu{float:left;padding:10px 5px 10px 15px}.codemirror-colorpicker .colorpicker-body .colorsets>.menu button{border:0;cursor:pointer;font-family:serif,sans-serif;font-size:14px;font-weight:300;outline:none}.codemirror-colorpicker .colorpicker-body .colorsets>.color-list{box-sizing:border-box;display:block;line-height:0;margin-left:30px;padding:12px 12px 0 0}.codemirror-colorpicker .colorpicker-body .colorsets>.color-list .color-item{background-size:contain;border-radius:2px;box-sizing:border-box;cursor:pointer;display:inline-block;height:13px;margin-bottom:12px;margin-left:12px;overflow:hidden;position:relative;vertical-align:middle;width:13px}.codemirror-colorpicker .colorpicker-body .colorsets>.color-list .color-item:hover{transform:scale(1.2)}.codemirror-colorpicker .colorpicker-body .colorsets>.color-list .color-item .empty{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAJElEQVQYV2NctWrVfwYkEBYWxojMZ6SDAmT7QGx0K1EcRBsFAADeG/3M/HteAAAAAElFTkSuQmCC") repeat;height:100%;right:0;margin:0;padding:0;pointer-events:none;position:absolute;top:0;width:100%}.codemirror-colorpicker .colorpicker-body .colorsets>.color-list .color-item .color-view{border:1px solid rgba(0,0,0,.1);box-sizing:border-box;height:100%;right:0;margin:0;padding:0;pointer-events:none;position:absolute;top:0;width:100%}.codemirror-colorpicker .colorpicker-body .colorsets>.color-list .add-color-item{color:#8e8e8e;cursor:pointer;display:inline-block;font-family:serif,sans-serif;font-size:16px;font-weight:400;height:13px;line-height:1;margin-bottom:12px;margin-left:12px;text-align:center;vertical-align:middle;width:13px}.codemirror-colorpicker .colorpicker-body .color-chooser{background-color:rgba(0,0,0,.5);bottom:0;right:0;opacity:0;pointer-events:none;position:absolute;left:0;top:0;transition:opacity .05s ease-out}.codemirror-colorpicker .colorpicker-body .color-chooser.open{opacity:1;pointer-events:all}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container{background-color:#fff;bottom:0;right:0;position:absolute;left:0;top:120px}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-item-header{border-bottom:1px solid rgba(0,0,0,.2);box-sizing:border-box;display:flex;height:34px;right:0;padding:3px 0;position:absolute;left:0;top:0}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-item-header .title{box-sizing:border-box;color:#000;flex:2;font-size:15px;font-weight:700;margin:0;overflow:hidden;padding:5px 14px 5px 5px;text-align:right;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-item-header .items{cursor:pointer;display:block;flex:1;height:100%;line-height:2;padding-left:10px;text-align:left}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-list{bottom:0;right:0;overflow:auto;position:absolute;left:0;top:34px}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-list .colorsets-item{border-bottom:1px solid rgba(0,0,0,.1);cursor:pointer;display:flex;padding:3px 0}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-list .colorsets-item:hover{background-color:rgba(0,0,0,.05)}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-list .colorsets-item .title{box-sizing:border-box;color:#000;flex:2;font-size:14px;font-size:13px;font-weight:400;margin:0;overflow:hidden;padding:5px 14px 5px 5px;pointer-events:none;text-align:right;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-list .colorsets-item .items{cursor:pointer;display:block;flex:3;height:100%;line-height:1.6;pointer-events:none}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-list .colorsets-item .items .color-item{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAJElEQVQYV2NctWrVfwYkEBYWxojMZ6SDAmT7QGx0K1EcRBsFAADeG/3M/HteAAAAAElFTkSuQmCC") repeat;background-size:contain;border:1px solid #ddd;border-radius:3px;box-sizing:border-box;cursor:pointer;display:inline-block;height:13px;margin-left:10px;overflow:hidden;vertical-align:middle;width:13px}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-list .colorsets-item .items .color-item .color-view{height:100%;margin:0;padding:0;pointer-events:none;width:100%}.codemirror-colorpicker.sketch{border-radius:5px}.codemirror-colorpicker.sketch>.colorpicker-body>.color{box-sizing:border-box;height:150px;margin:10px 10px 2px}.codemirror-colorpicker.sketch>.colorpicker-body>.control{padding:0}.codemirror-colorpicker.sketch>.colorpicker-body>.control.has-eyedropper{padding-right:30px}.codemirror-colorpicker.sketch>.colorpicker-body>.control.has-eyedropper .el-cp-color-control__left{top:4px}.codemirror-colorpicker.sketch>.colorpicker-body>.control>.color,.codemirror-colorpicker.sketch>.colorpicker-body>.control>.empty{border-radius:2px;box-sizing:border-box;height:26px;right:auto;position:absolute;left:10px;top:1px;width:26px}.codemirror-colorpicker.sketch>.colorpicker-body>.control>.color{box-shadow:inset 0 0 1px 0 rgba(0,0,0,.5)}.codemirror-colorpicker.sketch>.colorpicker-body>.control>.hue{margin:0 0 0 38px;padding:2px 10px 2px 2px;position:relative}.codemirror-colorpicker.sketch>.colorpicker-body>.control>.hue>.hue-container{border-radius:0}.codemirror-colorpicker.sketch>.colorpicker-body>.control>.opacity{margin:0 0 0 38px;padding:2px 10px 2px 2px;position:relative}.codemirror-colorpicker.sketch>.colorpicker-body>.control>.opacity>.opacity-container{border-radius:0}.codemirror-colorpicker.sketch>.colorpicker-body>.control .drag-bar,.codemirror-colorpicker.sketch>.colorpicker-body>.control .drag-bar2{border-radius:0;border-radius:1px;bottom:1px!important;height:50%;right:0;top:50%;transform:translateX(50%) translateY(-50%);width:2px}.codemirror-colorpicker.sketch>.colorpicker-body>.control .drag-bar.first,.codemirror-colorpicker.sketch>.colorpicker-body>.control .drag-bar2.first{right:0;transform:translateX(-50%) translateY(-50%)!important}.codemirror-colorpicker.sketch>.colorpicker-body>.control .drag-bar.last,.codemirror-colorpicker.sketch>.colorpicker-body>.control .drag-bar2.last{transform:translateX(150%) translateY(-50%)!important}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-change{display:none}.codemirror-colorpicker.sketch>.colorpicker-body>.information.rgb .information-item.rgb{display:inherit}.codemirror-colorpicker.sketch>.colorpicker-body>.information.rgb .information-item.hsl{display:none!important}.codemirror-colorpicker.sketch>.colorpicker-body>.information.hex .information-item.hex{display:inherit}.codemirror-colorpicker.sketch>.colorpicker-body>.information.hex .information-item.hsl,.codemirror-colorpicker.sketch>.colorpicker-body>.information.hsl .information-item.rgb{display:none!important}.codemirror-colorpicker.sketch>.colorpicker-body>.information.hsl .information-item.hsl{display:inherit}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-item{display:inline-flex!important;margin-left:0}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-item>.input-field{padding-right:0}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-item>.input-field:last-child{padding-left:0}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-item>.input-field>.title{color:#000;cursor:pointer;font-size:11px}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-item>.input-field:last-child:not(:first-child){padding-left:0}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-item.hex{padding-right:5px;padding-left:0;width:74px}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-item.rgb{padding-right:0;padding-left:0;width:140px}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-item.hsl{display:none;padding-right:0;padding-left:0;width:140px}.codemirror-colorpicker.sketch>.colorpicker-body>.colorsets>.color-list{margin-left:0;padding-left:12px}.codemirror-colorpicker.sketch>.colorpicker-body>.colorsets>.color-list .color-item{border-radius:3px;height:16px;margin-bottom:10px;margin-left:9px;width:16px}.codemirror-colorpicker.palette{border-radius:3px;box-shadow:none}.codemirror-colorpicker.palette>.colorpicker-body>.color,.codemirror-colorpicker.palette>.colorpicker-body>.control,.codemirror-colorpicker.palette>.colorpicker-body>.information{display:none}.codemirror-colorpicker.palette>.colorpicker-body>.colorsets{border-top:0;box-sizing:border-box}.codemirror-colorpicker.palette>.colorpicker-body>.colorsets>.color-list .color-item{height:15px;margin-bottom:10px;margin-left:10px;width:15px}.codemirror-colorpicker.palette>.colorpicker-body>.color-chooser{box-sizing:border-box;display:none}.codemirror-colorpicker.palette>.colorpicker-body>.color-chooser.open{border:1px solid #d8d8d8;border-radius:3px;bottom:auto;box-shadow:0 0 10px 2px rgba(0,0,0,.12);display:block;right:-1px;left:-1px;top:-1px}.codemirror-colorpicker.palette>.colorpicker-body>.color-chooser.open .color-chooser-container{background-color:#fff;border-radius:2px;bottom:auto;box-sizing:border-box;right:auto;position:relative;left:auto;top:auto}.codemirror-colorpicker.palette>.colorpicker-body>.color-chooser.open .color-chooser-container .colorsets-item-header{border-top-right-radius:3px;border-top-left-radius:3px;bottom:auto;right:auto;position:relative;left:auto;top:auto}.codemirror-colorpicker.palette>.colorpicker-body>.color-chooser.open .color-chooser-container .colorsets-list{bottom:auto;right:auto;overflow:auto;position:relative;left:auto;top:auto}.codemirror-colorpicker.palette>.colorpicker-body>.color-chooser.open .color-chooser-container .colorsets-list .colorsets-item:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.codemirror-colorpicker.macos .colorpicker-body .wheel{box-sizing:border-box;height:224px;position:relative;width:224px}.codemirror-colorpicker.macos .colorpicker-body .wheel .wheel-canvas{border-radius:50%;height:214px;right:5px;position:absolute;top:5px;width:214px}.codemirror-colorpicker.macos .colorpicker-body .wheel .drag-pointer{border:1px solid #fff;border-radius:50%;display:inline-block;height:10px;right:50%;position:absolute;top:50%;transform:translateX(50%) translateY(-50%);width:10px;z-index:2}.codemirror-colorpicker.macos .control{padding-top:0}.codemirror-colorpicker.macos .control>.color,.codemirror-colorpicker.macos .control>.empty{top:4px}.codemirror-colorpicker.macos .control.has-eyedropper{padding-right:30px}.codemirror-colorpicker.macos .control.has-eyedropper .el-cp-color-control__left{top:9px}.codemirror-colorpicker.macos .value{box-sizing:border-box;cursor:pointer;margin:0 42px 0 0;padding:6px 16px;position:relative}.codemirror-colorpicker.macos .value>.value-container{background-image:linear-gradient(-90deg,#000 0,hsla(0,0%,100%,0));border-radius:3px;box-sizing:border-box;height:10px;position:relative;width:100%}.codemirror-colorpicker.macos .value>.value-container .drag-bar{border-radius:50%;cursor:pointer;height:12px;right:0;position:absolute;top:50%;transform:translateX(50%) translateY(-50%);width:12px}.codemirror-colorpicker.mini{display:inline-block;width:180px}.codemirror-colorpicker.mini .control{padding:0}.codemirror-colorpicker.mini .control .hue,.codemirror-colorpicker.mini .control .opacity{margin:0;padding:0}.codemirror-colorpicker.mini .control .hue>.hue-container,.codemirror-colorpicker.mini .control .opacity>.opacity-container{border-radius:0;height:20px;overflow:hidden}.codemirror-colorpicker.mini .control .drag-bar,.codemirror-colorpicker.mini .control .drag-bar2{background-color:transparent;border:0;box-shadow:none;box-sizing:border-box;height:100%;width:5px}.codemirror-colorpicker.mini .control .drag-bar.last:before,.codemirror-colorpicker.mini .control .drag-bar.lastafter,.codemirror-colorpicker.mini .control .drag-bar2.last:before,.codemirror-colorpicker.mini .control .drag-bar2.lastafter{right:1px}.codemirror-colorpicker.mini .control .drag-bar.first:after,.codemirror-colorpicker.mini .control .drag-bar.first:before,.codemirror-colorpicker.mini .control .drag-bar2.first:after,.codemirror-colorpicker.mini .control .drag-bar2.first:before{right:3px}.codemirror-colorpicker.mini .control .drag-bar2:before,.codemirror-colorpicker.mini .control .drag-bar:before{border-right:4px solid transparent;border-left:4px solid transparent;border-top:4px solid #000;content:"";height:0;right:2px;position:absolute;top:0;transform:translateX(50%);width:0}.codemirror-colorpicker.mini .control .drag-bar2:after,.codemirror-colorpicker.mini .control .drag-bar:after{border-bottom:4px solid #000;border-right:4px solid transparent;border-left:4px solid transparent;bottom:0;content:"";height:0;right:2px;position:absolute;transform:translateX(50%);width:0}.codemirror-colorpicker.mini-vertical{display:inline-block;width:180px}.codemirror-colorpicker.mini-vertical .color{display:inline-block;height:160px;vertical-align:middle;width:140px}.codemirror-colorpicker.mini-vertical .control{display:inline-block;height:160px;padding:0;vertical-align:middle}.codemirror-colorpicker.mini-vertical .control .hue,.codemirror-colorpicker.mini-vertical .control .opacity{display:inline-block;height:100%;margin:0;padding:0;position:relative;vertical-align:middle;width:20px}.codemirror-colorpicker.mini-vertical .control .hue>.hue-container{background:linear-gradient(0deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);border-radius:0;height:100%;overflow:hidden}.codemirror-colorpicker.mini-vertical .control .opacity>.opacity-container{border-radius:0;height:100%;overflow:hidden;width:20px}.codemirror-colorpicker.mini-vertical .control .drag-bar,.codemirror-colorpicker.mini-vertical .control .drag-bar2{background-color:transparent;border:0;box-shadow:none;box-sizing:border-box;height:2px;transform:none;width:100%}.codemirror-colorpicker.mini-vertical .control .drag-bar.last:after,.codemirror-colorpicker.mini-vertical .control .drag-bar.last:before,.codemirror-colorpicker.mini-vertical .control .drag-bar2.last:after,.codemirror-colorpicker.mini-vertical .control .drag-bar2.last:before{top:2px}.codemirror-colorpicker.mini-vertical .control .drag-bar.first:after,.codemirror-colorpicker.mini-vertical .control .drag-bar.first:before,.codemirror-colorpicker.mini-vertical .control .drag-bar2.first:after,.codemirror-colorpicker.mini-vertical .control .drag-bar2.first:before{top:-1px}.codemirror-colorpicker.mini-vertical .control .drag-bar2:before,.codemirror-colorpicker.mini-vertical .control .drag-bar:before{border-bottom:4px solid transparent;border-right:4px solid #000;border-top:4px solid transparent;content:"";height:0;right:0;position:absolute;top:2px;transform:translateY(-50%);width:0}.codemirror-colorpicker.mini-vertical .control .drag-bar2:after,.codemirror-colorpicker.mini-vertical .control .drag-bar:after{border-bottom:4px solid transparent;border-left:4px solid #000;border-top:4px solid transparent;content:"";height:0;position:absolute;left:0;top:2px;transform:translateY(-50%);width:0}.codemirror-colorpicker.ring .colorpicker-body>.color{height:120px;right:52px;position:absolute;top:52px;width:120px}.codemirror-colorpicker.ring .colorpicker-body .wheel{box-sizing:border-box;height:224px;position:relative;width:224px}.codemirror-colorpicker.ring .colorpicker-body .wheel .wheel-canvas{border-radius:50%;height:214px;right:5px;position:absolute;top:5px;width:214px}.codemirror-colorpicker.ring .colorpicker-body .wheel .drag-pointer{border:1px solid #fff;border-radius:50%;display:inline-block;height:10px;right:50%;position:absolute;top:50%;transform:translateX(50%) translateY(-50%);width:10px;z-index:2}.codemirror-colorpicker.ring .control{padding-top:0}.codemirror-colorpicker.ring .control .value{display:none}.codemirror-colorpicker.ring .control>.color,.codemirror-colorpicker.ring .control>.empty{border-radius:2px;height:30px;top:-17px;width:30px}.codemirror-colorpicker.ring .control.has-eyedropper{padding-right:30px;padding-top:10px}.codemirror-colorpicker.ring .control.has-eyedropper>.color,.codemirror-colorpicker.ring .control.has-eyedropper>.empty{top:-2px}.codemirror-colorpicker.ring .control.has-eyedropper .el-cp-color-control__left{top:4px}.codemirror-colorpicker.xd{display:inline-block;padding-top:12px;width:245px}.codemirror-colorpicker.xd .color{border:1px solid #cecece;border-radius:3px;box-sizing:border-box;display:inline-block;height:170px;margin-bottom:12px;margin-right:12px;overflow:hidden;vertical-align:middle;width:170px}.codemirror-colorpicker.xd .color>.saturation>.value>.drag-pointer{border:2px solid #fff;box-shadow:0 0 1px 0 #000,inset 0 0 1px 0 #000;height:7px;width:7px}.codemirror-colorpicker.xd .control{display:inline-block;height:170px;margin-bottom:12px;margin-left:12px;padding:0;vertical-align:middle}.codemirror-colorpicker.xd .control .hue,.codemirror-colorpicker.xd .control .opacity{border-radius:3px;display:inline-block;height:100%;margin:0 8px 0 0;overflow:hidden;padding:0;position:relative;vertical-align:middle;width:13px}.codemirror-colorpicker.xd .control .hue>.hue-container{background:linear-gradient(0deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);border-radius:0;height:100%;overflow:hidden}.codemirror-colorpicker.xd .control .opacity>.opacity-container{border-radius:0;height:100%;overflow:hidden}.codemirror-colorpicker.xd .control .drag-bar,.codemirror-colorpicker.xd .control .drag-bar2{background-color:transparent;border:2px solid #fff;box-shadow:0 0 1px 0 #000,inset 0 0 1px 0 #000;box-sizing:border-box;height:10px;right:50%;overflow:hidden;transform:none;transform:translateX(50%) translateY(-50%);width:10px}.codemirror-colorpicker.xd .information{margin-top:5px}.codemirror-colorpicker.vscode{background-color:#333;border:1px solid #ececec;box-sizing:border-box;width:336px}.codemirror-colorpicker.vscode,.codemirror-colorpicker.vscode .colorpicker-body{border-radius:0;display:inline-block}.codemirror-colorpicker.vscode .colorpicker-body .color-view{height:34px}.codemirror-colorpicker.vscode .colorpicker-body .color-view.has-eyedropper{display:flex}.codemirror-colorpicker.vscode .colorpicker-body .color-view.has-eyedropper .color-view-container{display:inline-block;width:254px}.codemirror-colorpicker.vscode .colorpicker-body .color-view.has-eyedropper .el-cp-color-control__left{float:left;padding:6px 0;text-align:center;width:80px}.codemirror-colorpicker.vscode .colorpicker-body .color-view.has-eyedropper .el-cp-color-control__left button{display:inline-block}.codemirror-colorpicker.vscode .colorpicker-body .color-view.has-eyedropper .el-cp-color-control__left button svg path{fill:#fff}.codemirror-colorpicker.vscode .colorpicker-body .color-view .color-view-container{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAJElEQVQYV2NctWrVfwYkEBYWxojMZ6SDAmT7QGx0K1EcRBsFAADeG/3M/HteAAAAAElFTkSuQmCC") repeat;cursor:pointer;font-size:14px;height:100%;line-height:34px;text-align:center;text-shadow:0 0 3px #535353;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:100%}.codemirror-colorpicker.vscode .colorpicker-body .color-view .color-view-container .preview{display:block;height:100%}.codemirror-colorpicker.vscode .colorpicker-body .color-tool{padding:8px}.codemirror-colorpicker.vscode .color{display:inline-block;height:160px;vertical-align:middle;width:240px}.codemirror-colorpicker.vscode .control{display:inline-block;height:160px;padding:0 4px 0 0;vertical-align:middle}.codemirror-colorpicker.vscode .control .hue,.codemirror-colorpicker.vscode .control .opacity{display:inline-block;height:100%;margin:0;padding:0;position:relative;vertical-align:middle;width:30px}.codemirror-colorpicker.vscode .control .hue{padding-right:5px;width:35px}.codemirror-colorpicker.vscode .control .hue>.hue-container{background:linear-gradient(0deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);border-radius:0;height:100%}.codemirror-colorpicker.vscode .control .opacity>.opacity-container{border-radius:0;height:100%;width:30px}.codemirror-colorpicker.vscode .control .drag-bar,.codemirror-colorpicker.vscode .control .drag-bar2{background-color:transparent;border:1px solid #fff;border-radius:0;box-shadow:none;box-shadow:0 0 2px 0 #000,inset 0 0 0 0 #000;box-sizing:border-box;height:5px;transform:translateY(-50%) translateX(2px);width:33px}.codemirror-colorpicker.box{border-radius:10px;width:420px}.codemirror-colorpicker.box .colorpicker-body{-moz-column-gap:10px;column-gap:10px;display:grid;grid-template-columns:200px 1fr;grid-template-rows:auto;padding:10px 10px 10px 20px}.codemirror-colorpicker.box .colorpicker-body>.color{border-radius:8px;height:100%;overflow:hidden}.codemirror-colorpicker.box .control{padding:0!important}.codemirror-colorpicker.box .control>*{vertical-align:middle}.codemirror-colorpicker.box .control .color-info{display:inline-block;height:30px;position:relative;width:30px}.codemirror-colorpicker.box .control .color-info>.color,.codemirror-colorpicker.box .control .color-info>.empty{border-radius:50%;box-sizing:border-box;height:100%;position:absolute;width:100%}.codemirror-colorpicker.box .control .color-info>.color{border:1px solid rgba(0,0,0,.1)}.codemirror-colorpicker.box .control>.color,.codemirror-colorpicker.box .control>.empty{top:4px}.codemirror-colorpicker.box .control.has-eyedropper{padding-right:30px}.codemirror-colorpicker.box .control.has-eyedropper .el-cp-color-control__left{display:inline-block;height:30px;right:auto;position:relative;top:auto;width:30px}.codemirror-colorpicker.box .control .hue,.codemirror-colorpicker.box .control .opacity{margin-right:0!important;padding-right:0!important;padding-left:0!important}.codemirror-colorpicker.box .value{box-sizing:border-box;cursor:pointer;position:relative}.codemirror-colorpicker.box .value>.value-container{background-image:linear-gradient(-90deg,#000 0,hsla(0,0%,100%,0));border-radius:3px;box-sizing:border-box;height:10px;position:relative;width:100%}.codemirror-colorpicker.box .value>.value-container .drag-bar{border-radius:50%;cursor:pointer;height:12px;right:0;position:absolute;top:50%;transform:translateX(50%) translateY(-50%);width:12px}.codemirror-colorpicker.box .information{margin-top:6px}.codemirror-colorpicker.box .information .information-change{display:none}.codemirror-colorpicker.box .information>.information-item{margin:0!important;padding:0!important}.codemirror-colorpicker.box .colorsets{border:0;position:relative}.codemirror-colorpicker.box .colorsets .color-list{margin-left:0!important;padding:0!important}.codemirror-colorpicker.box .colorsets .color-list .current-color-sets .color-item{height:20px;margin-bottom:4px!important;margin-left:4px!important;width:20px}.codemirror-colorpicker.box .colorsets .menu{float:none;position:absolute;left:-20px;top:-15px}.codemirror-colorpicker.box .color-chooser .color-chooser-container{right:200px;top:0}.colorsets-contextmenu{background-color:#ececec;border:1px solid #ccc;border-radius:6px;display:none;font-size:13px;list-style:none;padding:4px 0;position:fixed}.colorsets-contextmenu.show{display:inline-block}.colorsets-contextmenu .menu-item{cursor:default;padding:2px 20px}.colorsets-contextmenu .menu-item:hover{background-color:#5ea3fb;color:#fff}.colorsets-contextmenu.small .menu-item.small-hide{display:none}.el-cp-color-eyedropper button{background:none;border:none;border-radius:var(--size-radius);box-sizing:border-box;cursor:pointer;display:block;font-size:0;height:30px;margin:-4px;outline:none;padding:0;transition:box-shadow var(--speed-focus) ease-out,opacity var(--speed-focus) ease-out;width:30px}.el-cp-color-eyedropper button:focus-visible{box-shadow:0 0 0 2px var(--color-key)}.el-cp-color-eyedropper button:active{opacity:.5}.el-cp-color-eyedropper svg{color:var(--color-fill);display:block;margin:0 auto}.CodeMirror{background-color:#fff;border:1px solid #dfdfdf;border-radius:3px;height:auto!important}.CodeMirror-code{outline:none}.CodeMirror-focused .cm-matchhighlight{color:#fff!important;outline:1px solid green}.CodeMirror-sizer:after,.CodeMirror-sizer:before{color:#bbb;display:block}.CodeMirror-sizer:before{content:"";padding-bottom:5px}.cm-s-rubyblue .CodeMirror-cursor{border-right:1px solid #fff!important}.CodeMirror-lint-marker-multiple,[class*=CodeMirror-lint-marker],[class*=CodeMirror-lint-message]{background-image:none}.CodeMirror-lint-marker-error,.CodeMirror-lint-marker-warning{cursor:help}.CodeMirror-lint-marker-multiple{position:absolute;top:0}[class*=CodeMirror-lint-marker]:before{font:normal 18px/1 dashicons;position:relative;top:-2px}[class*=CodeMirror-lint-message]:before{font:normal 16px/1 dashicons;right:16px;position:absolute}.CodeMirror-lint-message-error,.CodeMirror-lint-message-warning{box-shadow:0 1px 1px 0 rgba(0,0,0,.1);margin:5px 0 2px;padding:3px 28px 3px 12px}.CodeMirror-lint-message-warning{background-color:#fff8e5;border-right:4px solid #ffb900}.CodeMirror-lint-marker-warning:before,.CodeMirror-lint-message-warning:before{color:#f6a306;content:"\f534"}.CodeMirror-lint-message-error{background-color:#fbeaea;border-right:4px solid #dc3232}.CodeMirror-lint-marker-error:before,.CodeMirror-lint-message-error:before{color:#dc3232;content:"\f153"}.CodeMirror-lint-tooltip{background:none;border:none;border-radius:0;direction:rtl}.CodeMirror .CodeMirror-matchingbracket{background:rgba(255,150,0,.3);color:inherit}.CodeMirror .CodeMirror-linenumber{color:#666}.go-pro-button span,.nav-tab span,.snippet-type-badge{border:1px solid;border-radius:5px;font-size:10px;padding:1px 2px;text-transform:uppercase}.button .snippet-type-badge,.go-pro-button span h1 .snippet-type-badge,.nav-tab span,h2 .snippet-type-badge,h3 .snippet-type-badge{margin-right:3px}.nav-tab span{vertical-align:middle}.nav-tab[data-type=php] span,.snippet-type-badge[data-type=php]{border-color:currentColor;color:#0073aa}.nav-tab[data-type=css] span,.snippet-type-badge[data-type=css]{border-color:currentColor;color:#8000ff}.nav-tab[data-type=js] span,.snippet-type-badge[data-type=js]{border-color:currentColor;color:#cd6600}.nav-tab[data-type=html] span,.snippet-type-badge[data-type=html]{border-color:currentColor;color:#548b54}.go-pro-button span{border-color:#ce0000;color:#ce0000}.form-table th{width:auto}h2{margin:25px 0 15px}h2:first-of-type{margin-top:20px}h2 label{cursor:auto}.active-snippet #title,.inactive-snippet #title{border-right-width:4px}.active-snippet #title{border-right-color:#46b450}.inactive-snippet #title{border-right-color:#bbb}.erroneous-snippet #title{border-right-color:#dc3232}#snippet-form{margin-top:10px}label[for=snippet_description] h3 div{position:absolute}.button+.button{margin-right:.5em}.submit-inline{float:left}.snippet-scope p,p.snippet-scope{margin-top:15px}.html-shortcode-options strong,.snippet-scope label{display:inline-block;margin-left:1.5em}.below-editor{display:flex;justify-content:space-between}.snippet-priority label{cursor:help;font-size:1.1em;font-weight:700;padding-left:.5em}.snippet-priority input{width:4em}.snippet-editor{position:relative}.editor-help-tooltip{background:transparent!important;cursor:help;display:inline-block;font-size:10px;padding:.3em .3em 0}.snippet-editor-help{position:absolute;left:5px;top:5px}.snippet-editor-help:hover .editor-help-text{opacity:1;visibility:visible}.editor-help-text{background-color:#555;border-radius:6px;color:#fff;font-size:small;margin-left:-10px;opacity:0;padding:5px;position:absolute;left:0;top:125%;transition:opacity .3s;visibility:hidden;white-space:nowrap;z-index:99}.editor-help-text:after{border:5px solid transparent;border-bottom-color:#555;bottom:100%;content:"";margin-left:10px;position:absolute;left:0}.editor-help-text td:first-child{padding-left:.5em}.editor-help-text .mac-key{display:none}.editor-help-text.platform-mac .mac-key{display:inline}.editor-help-text.platform-mac .pc-key{display:none}.CodeMirror{width:100%}.wrap h2.nav-tab-wrapper{border-bottom:none}.snippet-scope{display:none}.snippet-scope .description{display:block}.CodeMirror-sizer{box-sizing:border-box;min-height:300px!important;padding-bottom:1.5em!important}.CodeMirror-sizer:after{bottom:0;position:absolute}[data-snippet-type=php] .php-scopes-list{display:block}[data-snippet-type=php] .CodeMirror-sizer{padding-bottom:0!important}[data-snippet-type=php] .CodeMirror-sizer:before{content:"<?php"}[data-snippet-type=css] .css-scopes-list{display:block}[data-snippet-type=css] .CodeMirror-sizer:before{content:"<style>"}[data-snippet-type=css] .CodeMirror-sizer:after{content:"</style>"}[data-snippet-type=js] .js-scopes-list{display:block}[data-snippet-type=js] .CodeMirror-sizer:before{content:"<script>"}[data-snippet-type=js] .CodeMirror-sizer:after{content:"</script>"}[data-snippet-type=html] .html-scopes-list{display:block}[data-snippet-type=html] .CodeMirror-sizer:before{content:"<!-- begin content -->"}[data-snippet-type=html] .CodeMirror-sizer:after{content:"<!-- end content -->"}.tagger{border:0}.tagger ul{background-color:#fff;border:1px solid #dfdfdf;border-radius:3px}.tagger li:not(.tagger-new)>span,.tagger-new ul,.tagger>ul>li:not(.tagger-new)>a{background-color:#dee7f8;border:1px solid #cad8f3;border-radius:6px}.tagger li:not(.tagger-new)>span:hover,.tagger-new ul:hover,.tagger>ul>li:not(.tagger-new)>a:hover{background-color:#bbcef1;border-color:#6d95e0}.tagger-new ul a,.tagger-new ul a:visited,.tagger>ul>li:not(.tagger-new) a,.tagger>ul>li:not(.tagger-new) a:visited{color:#555;font-size:1.1em}
2
 
1
+ .tagger{border:1px solid #909497}.tagger input[type=hidden]{display:none}.tagger>ul{align-items:center;box-sizing:border-box;display:flex;height:auto;justify-content:space-between;padding:4px 0;width:100%}.tagger ul{list-style:none;margin:0}.tagger>ul>li{margin:.4rem 0;padding-right:10px}.tagger-new ul a,.tagger-new ul a:visited,.tagger>ul>li:not(.tagger-new) a,.tagger>ul>li:not(.tagger-new) a:visited{color:#000}.tagger .tagger-new ul,.tagger li:not(.tagger-new)>span,.tagger>ul>li:not(.tagger-new)>a{background:#b1c3d7;border:1px solid #4181ed;border-radius:3px;padding:4px 8px 4px 4px}.tagger li a.close{filter:alpha(opacity=100);float:none;font-size:16px;line-height:16px;margin-right:4px;opacity:1;padding:4px}.tagger li a.close:hover{color:#fff}.tagger li:not(.tagger-new) a{text-decoration:none}.tagger .tagger-new input{background:transparent;border:none;box-shadow:none;outline:none;padding-right:0;width:100%}.tagger .tagger-new{flex-grow:1;position:relative}.tagger .tagger-new ul{padding:5px}.tagger .tagger-completion{position:absolute;z-index:100}.tagger.wrap>ul{flex-wrap:wrap;justify-content:start}.codemirror-colorview{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAJElEQVQYV2NctWrVfwYkEBYWxojMZ6SDAmT7QGx0K1EcRBsFAADeG/3M/HteAAAAAElFTkSuQmCC") repeat;border:1px solid #cecece;box-sizing:border-box;cursor:pointer;display:inline-block;height:10px;margin:0 2px;position:relative;vertical-align:middle;width:10px}.codemirror-colorview .codemirror-colorview-background{bottom:0;content:"";right:0;position:absolute;left:0;top:0}.codemirror-colorview:hover{border-color:#494949}.codemirror-colorpicker{background-color:#fff;border:1px solid rgba(0,0,0,.2);border-radius:3px;box-shadow:0 0 10px 2px rgba(0,0,0,.12);display:inline-block;position:relative;width:224px;z-index:1000}.codemirror-colorpicker>.arrow{border-bottom:10px solid rgba(0,0,0,.2);border-right:10px solid transparent;border-left:10px solid transparent;display:none;height:0;right:7px;pointer-events:none;position:absolute;top:-10px;width:0}.codemirror-colorpicker>.arrow:after{border-bottom:9px solid #fff;border-right:9px solid transparent;border-left:9px solid transparent;content:"";height:0;right:-9px;position:absolute;top:1px;width:0}.codemirror-colorpicker .colorpicker-body .arrow-button{background-color:transparent;height:12px;padding:0;position:relative;width:10px}.codemirror-colorpicker .colorpicker-body .arrow-button:before{border-bottom:3px solid #000;height:50%;top:0}.codemirror-colorpicker .colorpicker-body .arrow-button:after,.codemirror-colorpicker .colorpicker-body .arrow-button:before{border-right:3px solid transparent;border-left:3px solid transparent;box-sizing:border-box;content:"";display:inline-block;height:0;right:0;margin:2px;pointer-events:none;position:absolute;left:0;width:0}.codemirror-colorpicker .colorpicker-body .arrow-button:after{border-top:3px solid #000;bottom:0;top:50%}.codemirror-colorpicker .colorpicker-body .color{cursor:pointer;height:120px;overflow:hidden;position:relative}.codemirror-colorpicker .colorpicker-body .color>.saturation,.codemirror-colorpicker .colorpicker-body .color>.saturation>.value{height:100%;position:relative;width:100%}.codemirror-colorpicker .colorpicker-body .color>.saturation>.value>.drag-pointer{border-radius:50%;height:10px;position:absolute;transform:translateX(50%) translateY(-50%);width:10px}.codemirror-colorpicker .colorpicker-body .color>.saturation{background-color:hsla(20,42%,65%,0);background-image:linear-gradient(-90deg,#fff,hsla(20,42%,65%,0));background-repeat:repeat-x}.codemirror-colorpicker .colorpicker-body .color>.saturation>.value{background-image:linear-gradient(0deg,#000,hsla(20,42%,65%,0))}.codemirror-colorpicker .colorpicker-body .color>.saturation>.value>.drag-pointer{border:1px solid #fff;box-shadow:0 0 2px 0 rgba(0,0,0,.05)}.codemirror-colorpicker .colorpicker-body .control{padding:10px 0;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.codemirror-colorpicker .colorpicker-body .control.has-eyedropper{padding-right:30px}.codemirror-colorpicker .colorpicker-body .control.has-eyedropper .el-cp-color-control__left{border-radius:50%;box-sizing:border-box;height:30px;right:12px;position:absolute;top:20px;width:30px}.codemirror-colorpicker .colorpicker-body .control.has-eyedropper>.color,.codemirror-colorpicker .colorpicker-body .control.has-eyedropper>.empty{right:45px}.codemirror-colorpicker .colorpicker-body .control>.color,.codemirror-colorpicker .colorpicker-body .control>.empty{border-radius:50%;box-sizing:border-box;height:30px;right:12px;position:absolute;top:14px;width:30px}.codemirror-colorpicker .colorpicker-body .control>.color{border:1px solid rgba(0,0,0,.1)}.codemirror-colorpicker .colorpicker-body .control>.hue{box-sizing:border-box;cursor:pointer;margin:0 42px 0 0;padding:6px 16px;position:relative}.codemirror-colorpicker .colorpicker-body .control>.hue>.hue-container{border-radius:3px;height:10px;position:relative;width:100%}.codemirror-colorpicker .colorpicker-body .control>.opacity{box-sizing:border-box;cursor:pointer;margin:0 42px 0 0;padding:3px 16px;position:relative}.codemirror-colorpicker .colorpicker-body .control>.opacity>.opacity-container{border-radius:3px;height:10px;position:relative;width:100%}.codemirror-colorpicker .colorpicker-body .control .drag-bar,.codemirror-colorpicker .colorpicker-body .control .drag-bar2{border-radius:50%;cursor:pointer;height:12px;right:0;position:absolute;top:50%;transform:translateX(50%) translateY(-50%);width:12px}.codemirror-colorpicker .colorpicker-body .control>.hue>.hue-container{background:linear-gradient(-90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.codemirror-colorpicker .colorpicker-body .control>.opacity>.opacity-container{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAJElEQVQYV2NctWrVfwYkEBYWxojMZ6SDAmT7QGx0K1EcRBsFAADeG/3M/HteAAAAAElFTkSuQmCC") repeat}.codemirror-colorpicker .colorpicker-body .control>.opacity>.opacity-container>.color-bar{bottom:0;content:"";display:block;right:0;position:absolute;left:0;top:0}.codemirror-colorpicker .colorpicker-body .control>.empty{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAJElEQVQYV2NctWrVfwYkEBYWxojMZ6SDAmT7QGx0K1EcRBsFAADeG/3M/HteAAAAAElFTkSuQmCC") repeat}.codemirror-colorpicker .colorpicker-body .control .drag-bar,.codemirror-colorpicker .colorpicker-body .control .drag-bar2{background-color:#fefefe;border:1px solid rgba(0,0,0,.05);box-shadow:-2px 2px 2px 0 rgba(0,0,0,.2)}.codemirror-colorpicker .colorpicker-body .information{box-sizing:padding-box;position:relative}.codemirror-colorpicker .colorpicker-body .information>input{bottom:20px;box-sizing:border-box;font-size:10px;height:20px;padding:0 2px 0 0;position:absolute;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.codemirror-colorpicker .colorpicker-body .information>input[type=number]{-webkit-appearance:none;-moz-appearance:none;appearance:none}.codemirror-colorpicker .colorpicker-body .information>input[type=number]::-webkit-inner-spin-button,.codemirror-colorpicker .colorpicker-body .information>input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.codemirror-colorpicker .colorpicker-body .information.hex>.information-item.hex,.codemirror-colorpicker .colorpicker-body .information.hsl>.information-item.hsl,.codemirror-colorpicker .colorpicker-body .information.rgb>.information-item.rgb{display:flex}.codemirror-colorpicker .colorpicker-body .information>.information-item{box-sizing:border-box;display:none;margin-left:40px;padding:0 9px 0 5px;position:relative}.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field{box-sizing:border-box;display:block;flex:1;padding:3px;position:relative}.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field>.title{color:#a9a9a9;cursor:pointer;font-size:12px;padding-top:2px;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field input{border:1px solid #cbcbcb;border-radius:2px;box-sizing:border-box;color:#333;font-size:11px;height:21px;padding:3px;text-align:center;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;width:100%}.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field input[type=number]{-webkit-appearance:none;-moz-appearance:none;appearance:none}.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field input[type=number]::-webkit-inner-spin-button,.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field.hsl-l input[type=number],.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field.hsl-s input[type=number]{padding-right:1px;padding-left:10px}.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field .postfix{box-sizing:border-box;display:inline-block;font-size:11px;height:21px;line-height:2;padding:2px;position:absolute;left:3px;text-align:center;top:2px}.codemirror-colorpicker .colorpicker-body .information>.information-change{bottom:0;box-sizing:border-box;display:block;padding-top:5px;position:absolute;left:0;text-align:center;top:0;width:40px}.codemirror-colorpicker .colorpicker-body .information>.information-change>.format-change-button{background:transparent;border:0;box-sizing:border-box;cursor:pointer;outline:none}.codemirror-colorpicker .colorpicker-body .information>.title{color:#a3a3a3}.codemirror-colorpicker .colorpicker-body .information>.input{color:#333}.codemirror-colorpicker .colorpicker-body .colorsets{border-top:1px solid #e2e2e2}.codemirror-colorpicker .colorpicker-body .colorsets>.menu{float:left;padding:10px 5px 10px 15px}.codemirror-colorpicker .colorpicker-body .colorsets>.menu button{border:0;cursor:pointer;font-family:serif,sans-serif;font-size:14px;font-weight:300;outline:none}.codemirror-colorpicker .colorpicker-body .colorsets>.color-list{box-sizing:border-box;display:block;line-height:0;margin-left:30px;padding:12px 12px 0 0}.codemirror-colorpicker .colorpicker-body .colorsets>.color-list .color-item{background-size:contain;border-radius:2px;box-sizing:border-box;cursor:pointer;display:inline-block;height:13px;margin-bottom:12px;margin-left:12px;overflow:hidden;position:relative;vertical-align:middle;width:13px}.codemirror-colorpicker .colorpicker-body .colorsets>.color-list .color-item:hover{transform:scale(1.2)}.codemirror-colorpicker .colorpicker-body .colorsets>.color-list .color-item .empty{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAJElEQVQYV2NctWrVfwYkEBYWxojMZ6SDAmT7QGx0K1EcRBsFAADeG/3M/HteAAAAAElFTkSuQmCC") repeat;height:100%;right:0;margin:0;padding:0;pointer-events:none;position:absolute;top:0;width:100%}.codemirror-colorpicker .colorpicker-body .colorsets>.color-list .color-item .color-view{border:1px solid rgba(0,0,0,.1);box-sizing:border-box;height:100%;right:0;margin:0;padding:0;pointer-events:none;position:absolute;top:0;width:100%}.codemirror-colorpicker .colorpicker-body .colorsets>.color-list .add-color-item{color:#8e8e8e;cursor:pointer;display:inline-block;font-family:serif,sans-serif;font-size:16px;font-weight:400;height:13px;line-height:1;margin-bottom:12px;margin-left:12px;text-align:center;vertical-align:middle;width:13px}.codemirror-colorpicker .colorpicker-body .color-chooser{background-color:rgba(0,0,0,.5);bottom:0;right:0;opacity:0;pointer-events:none;position:absolute;left:0;top:0;transition:opacity .05s ease-out}.codemirror-colorpicker .colorpicker-body .color-chooser.open{opacity:1;pointer-events:all}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container{background-color:#fff;bottom:0;right:0;position:absolute;left:0;top:120px}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-item-header{border-bottom:1px solid rgba(0,0,0,.2);box-sizing:border-box;display:flex;height:34px;right:0;padding:3px 0;position:absolute;left:0;top:0}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-item-header .title{box-sizing:border-box;color:#000;flex:2;font-size:15px;font-weight:700;margin:0;overflow:hidden;padding:5px 14px 5px 5px;text-align:right;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-item-header .items{cursor:pointer;display:block;flex:1;height:100%;line-height:2;padding-left:10px;text-align:left}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-list{bottom:0;right:0;overflow:auto;position:absolute;left:0;top:34px}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-list .colorsets-item{border-bottom:1px solid rgba(0,0,0,.1);cursor:pointer;display:flex;padding:3px 0}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-list .colorsets-item:hover{background-color:rgba(0,0,0,.05)}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-list .colorsets-item .title{box-sizing:border-box;color:#000;flex:2;font-size:14px;font-size:13px;font-weight:400;margin:0;overflow:hidden;padding:5px 14px 5px 5px;pointer-events:none;text-align:right;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-list .colorsets-item .items{cursor:pointer;display:block;flex:3;height:100%;line-height:1.6;pointer-events:none}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-list .colorsets-item .items .color-item{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAJElEQVQYV2NctWrVfwYkEBYWxojMZ6SDAmT7QGx0K1EcRBsFAADeG/3M/HteAAAAAElFTkSuQmCC") repeat;background-size:contain;border:1px solid #ddd;border-radius:3px;box-sizing:border-box;cursor:pointer;display:inline-block;height:13px;margin-left:10px;overflow:hidden;vertical-align:middle;width:13px}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-list .colorsets-item .items .color-item .color-view{height:100%;margin:0;padding:0;pointer-events:none;width:100%}.codemirror-colorpicker.sketch{border-radius:5px}.codemirror-colorpicker.sketch>.colorpicker-body>.color{box-sizing:border-box;height:150px;margin:10px 10px 2px}.codemirror-colorpicker.sketch>.colorpicker-body>.control{padding:0}.codemirror-colorpicker.sketch>.colorpicker-body>.control.has-eyedropper{padding-right:30px}.codemirror-colorpicker.sketch>.colorpicker-body>.control.has-eyedropper .el-cp-color-control__left{top:4px}.codemirror-colorpicker.sketch>.colorpicker-body>.control>.color,.codemirror-colorpicker.sketch>.colorpicker-body>.control>.empty{border-radius:2px;box-sizing:border-box;height:26px;right:auto;position:absolute;left:10px;top:1px;width:26px}.codemirror-colorpicker.sketch>.colorpicker-body>.control>.color{box-shadow:inset 0 0 1px 0 rgba(0,0,0,.5)}.codemirror-colorpicker.sketch>.colorpicker-body>.control>.hue{margin:0 0 0 38px;padding:2px 10px 2px 2px;position:relative}.codemirror-colorpicker.sketch>.colorpicker-body>.control>.hue>.hue-container{border-radius:0}.codemirror-colorpicker.sketch>.colorpicker-body>.control>.opacity{margin:0 0 0 38px;padding:2px 10px 2px 2px;position:relative}.codemirror-colorpicker.sketch>.colorpicker-body>.control>.opacity>.opacity-container{border-radius:0}.codemirror-colorpicker.sketch>.colorpicker-body>.control .drag-bar,.codemirror-colorpicker.sketch>.colorpicker-body>.control .drag-bar2{border-radius:0;border-radius:1px;bottom:1px!important;height:50%;right:0;top:50%;transform:translateX(50%) translateY(-50%);width:2px}.codemirror-colorpicker.sketch>.colorpicker-body>.control .drag-bar.first,.codemirror-colorpicker.sketch>.colorpicker-body>.control .drag-bar2.first{right:0;transform:translateX(-50%) translateY(-50%)!important}.codemirror-colorpicker.sketch>.colorpicker-body>.control .drag-bar.last,.codemirror-colorpicker.sketch>.colorpicker-body>.control .drag-bar2.last{transform:translateX(150%) translateY(-50%)!important}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-change{display:none}.codemirror-colorpicker.sketch>.colorpicker-body>.information.rgb .information-item.rgb{display:inherit}.codemirror-colorpicker.sketch>.colorpicker-body>.information.rgb .information-item.hsl{display:none!important}.codemirror-colorpicker.sketch>.colorpicker-body>.information.hex .information-item.hex{display:inherit}.codemirror-colorpicker.sketch>.colorpicker-body>.information.hex .information-item.hsl,.codemirror-colorpicker.sketch>.colorpicker-body>.information.hsl .information-item.rgb{display:none!important}.codemirror-colorpicker.sketch>.colorpicker-body>.information.hsl .information-item.hsl{display:inherit}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-item{display:inline-flex!important;margin-left:0}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-item>.input-field{padding-right:0}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-item>.input-field:last-child{padding-left:0}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-item>.input-field>.title{color:#000;cursor:pointer;font-size:11px}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-item>.input-field:last-child:not(:first-child){padding-left:0}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-item.hex{padding-right:5px;padding-left:0;width:74px}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-item.rgb{padding-right:0;padding-left:0;width:140px}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-item.hsl{display:none;padding-right:0;padding-left:0;width:140px}.codemirror-colorpicker.sketch>.colorpicker-body>.colorsets>.color-list{margin-left:0;padding-left:12px}.codemirror-colorpicker.sketch>.colorpicker-body>.colorsets>.color-list .color-item{border-radius:3px;height:16px;margin-bottom:10px;margin-left:9px;width:16px}.codemirror-colorpicker.palette{border-radius:3px;box-shadow:none}.codemirror-colorpicker.palette>.colorpicker-body>.color,.codemirror-colorpicker.palette>.colorpicker-body>.control,.codemirror-colorpicker.palette>.colorpicker-body>.information{display:none}.codemirror-colorpicker.palette>.colorpicker-body>.colorsets{border-top:0;box-sizing:border-box}.codemirror-colorpicker.palette>.colorpicker-body>.colorsets>.color-list .color-item{height:15px;margin-bottom:10px;margin-left:10px;width:15px}.codemirror-colorpicker.palette>.colorpicker-body>.color-chooser{box-sizing:border-box;display:none}.codemirror-colorpicker.palette>.colorpicker-body>.color-chooser.open{border:1px solid #d8d8d8;border-radius:3px;bottom:auto;box-shadow:0 0 10px 2px rgba(0,0,0,.12);display:block;right:-1px;left:-1px;top:-1px}.codemirror-colorpicker.palette>.colorpicker-body>.color-chooser.open .color-chooser-container{background-color:#fff;border-radius:2px;bottom:auto;box-sizing:border-box;right:auto;position:relative;left:auto;top:auto}.codemirror-colorpicker.palette>.colorpicker-body>.color-chooser.open .color-chooser-container .colorsets-item-header{border-top-right-radius:3px;border-top-left-radius:3px;bottom:auto;right:auto;position:relative;left:auto;top:auto}.codemirror-colorpicker.palette>.colorpicker-body>.color-chooser.open .color-chooser-container .colorsets-list{bottom:auto;right:auto;overflow:auto;position:relative;left:auto;top:auto}.codemirror-colorpicker.palette>.colorpicker-body>.color-chooser.open .color-chooser-container .colorsets-list .colorsets-item:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.codemirror-colorpicker.macos .colorpicker-body .wheel{box-sizing:border-box;height:224px;position:relative;width:224px}.codemirror-colorpicker.macos .colorpicker-body .wheel .wheel-canvas{border-radius:50%;height:214px;right:5px;position:absolute;top:5px;width:214px}.codemirror-colorpicker.macos .colorpicker-body .wheel .drag-pointer{border:1px solid #fff;border-radius:50%;display:inline-block;height:10px;right:50%;position:absolute;top:50%;transform:translateX(50%) translateY(-50%);width:10px;z-index:2}.codemirror-colorpicker.macos .control{padding-top:0}.codemirror-colorpicker.macos .control>.color,.codemirror-colorpicker.macos .control>.empty{top:4px}.codemirror-colorpicker.macos .control.has-eyedropper{padding-right:30px}.codemirror-colorpicker.macos .control.has-eyedropper .el-cp-color-control__left{top:9px}.codemirror-colorpicker.macos .value{box-sizing:border-box;cursor:pointer;margin:0 42px 0 0;padding:6px 16px;position:relative}.codemirror-colorpicker.macos .value>.value-container{background-image:linear-gradient(-90deg,#000 0,hsla(0,0%,100%,0));border-radius:3px;box-sizing:border-box;height:10px;position:relative;width:100%}.codemirror-colorpicker.macos .value>.value-container .drag-bar{border-radius:50%;cursor:pointer;height:12px;right:0;position:absolute;top:50%;transform:translateX(50%) translateY(-50%);width:12px}.codemirror-colorpicker.mini{display:inline-block;width:180px}.codemirror-colorpicker.mini .control{padding:0}.codemirror-colorpicker.mini .control .hue,.codemirror-colorpicker.mini .control .opacity{margin:0;padding:0}.codemirror-colorpicker.mini .control .hue>.hue-container,.codemirror-colorpicker.mini .control .opacity>.opacity-container{border-radius:0;height:20px;overflow:hidden}.codemirror-colorpicker.mini .control .drag-bar,.codemirror-colorpicker.mini .control .drag-bar2{background-color:transparent;border:0;box-shadow:none;box-sizing:border-box;height:100%;width:5px}.codemirror-colorpicker.mini .control .drag-bar.last:before,.codemirror-colorpicker.mini .control .drag-bar.lastafter,.codemirror-colorpicker.mini .control .drag-bar2.last:before,.codemirror-colorpicker.mini .control .drag-bar2.lastafter{right:1px}.codemirror-colorpicker.mini .control .drag-bar.first:after,.codemirror-colorpicker.mini .control .drag-bar.first:before,.codemirror-colorpicker.mini .control .drag-bar2.first:after,.codemirror-colorpicker.mini .control .drag-bar2.first:before{right:3px}.codemirror-colorpicker.mini .control .drag-bar2:before,.codemirror-colorpicker.mini .control .drag-bar:before{border-right:4px solid transparent;border-left:4px solid transparent;border-top:4px solid #000;content:"";height:0;right:2px;position:absolute;top:0;transform:translateX(50%);width:0}.codemirror-colorpicker.mini .control .drag-bar2:after,.codemirror-colorpicker.mini .control .drag-bar:after{border-bottom:4px solid #000;border-right:4px solid transparent;border-left:4px solid transparent;bottom:0;content:"";height:0;right:2px;position:absolute;transform:translateX(50%);width:0}.codemirror-colorpicker.mini-vertical{display:inline-block;width:180px}.codemirror-colorpicker.mini-vertical .color{display:inline-block;height:160px;vertical-align:middle;width:140px}.codemirror-colorpicker.mini-vertical .control{display:inline-block;height:160px;padding:0;vertical-align:middle}.codemirror-colorpicker.mini-vertical .control .hue,.codemirror-colorpicker.mini-vertical .control .opacity{display:inline-block;height:100%;margin:0;padding:0;position:relative;vertical-align:middle;width:20px}.codemirror-colorpicker.mini-vertical .control .hue>.hue-container{background:linear-gradient(0deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);border-radius:0;height:100%;overflow:hidden}.codemirror-colorpicker.mini-vertical .control .opacity>.opacity-container{border-radius:0;height:100%;overflow:hidden;width:20px}.codemirror-colorpicker.mini-vertical .control .drag-bar,.codemirror-colorpicker.mini-vertical .control .drag-bar2{background-color:transparent;border:0;box-shadow:none;box-sizing:border-box;height:2px;transform:none;width:100%}.codemirror-colorpicker.mini-vertical .control .drag-bar.last:after,.codemirror-colorpicker.mini-vertical .control .drag-bar.last:before,.codemirror-colorpicker.mini-vertical .control .drag-bar2.last:after,.codemirror-colorpicker.mini-vertical .control .drag-bar2.last:before{top:2px}.codemirror-colorpicker.mini-vertical .control .drag-bar.first:after,.codemirror-colorpicker.mini-vertical .control .drag-bar.first:before,.codemirror-colorpicker.mini-vertical .control .drag-bar2.first:after,.codemirror-colorpicker.mini-vertical .control .drag-bar2.first:before{top:-1px}.codemirror-colorpicker.mini-vertical .control .drag-bar2:before,.codemirror-colorpicker.mini-vertical .control .drag-bar:before{border-bottom:4px solid transparent;border-right:4px solid #000;border-top:4px solid transparent;content:"";height:0;right:0;position:absolute;top:2px;transform:translateY(-50%);width:0}.codemirror-colorpicker.mini-vertical .control .drag-bar2:after,.codemirror-colorpicker.mini-vertical .control .drag-bar:after{border-bottom:4px solid transparent;border-left:4px solid #000;border-top:4px solid transparent;content:"";height:0;position:absolute;left:0;top:2px;transform:translateY(-50%);width:0}.codemirror-colorpicker.ring .colorpicker-body>.color{height:120px;right:52px;position:absolute;top:52px;width:120px}.codemirror-colorpicker.ring .colorpicker-body .wheel{box-sizing:border-box;height:224px;position:relative;width:224px}.codemirror-colorpicker.ring .colorpicker-body .wheel .wheel-canvas{border-radius:50%;height:214px;right:5px;position:absolute;top:5px;width:214px}.codemirror-colorpicker.ring .colorpicker-body .wheel .drag-pointer{border:1px solid #fff;border-radius:50%;display:inline-block;height:10px;right:50%;position:absolute;top:50%;transform:translateX(50%) translateY(-50%);width:10px;z-index:2}.codemirror-colorpicker.ring .control{padding-top:0}.codemirror-colorpicker.ring .control .value{display:none}.codemirror-colorpicker.ring .control>.color,.codemirror-colorpicker.ring .control>.empty{border-radius:2px;height:30px;top:-17px;width:30px}.codemirror-colorpicker.ring .control.has-eyedropper{padding-right:30px;padding-top:10px}.codemirror-colorpicker.ring .control.has-eyedropper>.color,.codemirror-colorpicker.ring .control.has-eyedropper>.empty{top:-2px}.codemirror-colorpicker.ring .control.has-eyedropper .el-cp-color-control__left{top:4px}.codemirror-colorpicker.xd{display:inline-block;padding-top:12px;width:245px}.codemirror-colorpicker.xd .color{border:1px solid #cecece;border-radius:3px;box-sizing:border-box;display:inline-block;height:170px;margin-bottom:12px;margin-right:12px;overflow:hidden;vertical-align:middle;width:170px}.codemirror-colorpicker.xd .color>.saturation>.value>.drag-pointer{border:2px solid #fff;box-shadow:0 0 1px 0 #000,inset 0 0 1px 0 #000;height:7px;width:7px}.codemirror-colorpicker.xd .control{display:inline-block;height:170px;margin-bottom:12px;margin-left:12px;padding:0;vertical-align:middle}.codemirror-colorpicker.xd .control .hue,.codemirror-colorpicker.xd .control .opacity{border-radius:3px;display:inline-block;height:100%;margin:0 8px 0 0;overflow:hidden;padding:0;position:relative;vertical-align:middle;width:13px}.codemirror-colorpicker.xd .control .hue>.hue-container{background:linear-gradient(0deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);border-radius:0;height:100%;overflow:hidden}.codemirror-colorpicker.xd .control .opacity>.opacity-container{border-radius:0;height:100%;overflow:hidden}.codemirror-colorpicker.xd .control .drag-bar,.codemirror-colorpicker.xd .control .drag-bar2{background-color:transparent;border:2px solid #fff;box-shadow:0 0 1px 0 #000,inset 0 0 1px 0 #000;box-sizing:border-box;height:10px;right:50%;overflow:hidden;transform:none;transform:translateX(50%) translateY(-50%);width:10px}.codemirror-colorpicker.xd .information{margin-top:5px}.codemirror-colorpicker.vscode{background-color:#333;border:1px solid #ececec;box-sizing:border-box;width:336px}.codemirror-colorpicker.vscode,.codemirror-colorpicker.vscode .colorpicker-body{border-radius:0;display:inline-block}.codemirror-colorpicker.vscode .colorpicker-body .color-view{height:34px}.codemirror-colorpicker.vscode .colorpicker-body .color-view.has-eyedropper{display:flex}.codemirror-colorpicker.vscode .colorpicker-body .color-view.has-eyedropper .color-view-container{display:inline-block;width:254px}.codemirror-colorpicker.vscode .colorpicker-body .color-view.has-eyedropper .el-cp-color-control__left{float:left;padding:6px 0;text-align:center;width:80px}.codemirror-colorpicker.vscode .colorpicker-body .color-view.has-eyedropper .el-cp-color-control__left button{display:inline-block}.codemirror-colorpicker.vscode .colorpicker-body .color-view.has-eyedropper .el-cp-color-control__left button svg path{fill:#fff}.codemirror-colorpicker.vscode .colorpicker-body .color-view .color-view-container{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAJElEQVQYV2NctWrVfwYkEBYWxojMZ6SDAmT7QGx0K1EcRBsFAADeG/3M/HteAAAAAElFTkSuQmCC") repeat;cursor:pointer;font-size:14px;height:100%;line-height:34px;text-align:center;text-shadow:0 0 3px #535353;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:100%}.codemirror-colorpicker.vscode .colorpicker-body .color-view .color-view-container .preview{display:block;height:100%}.codemirror-colorpicker.vscode .colorpicker-body .color-tool{padding:8px}.codemirror-colorpicker.vscode .color{display:inline-block;height:160px;vertical-align:middle;width:240px}.codemirror-colorpicker.vscode .control{display:inline-block;height:160px;padding:0 4px 0 0;vertical-align:middle}.codemirror-colorpicker.vscode .control .hue,.codemirror-colorpicker.vscode .control .opacity{display:inline-block;height:100%;margin:0;padding:0;position:relative;vertical-align:middle;width:30px}.codemirror-colorpicker.vscode .control .hue{padding-right:5px;width:35px}.codemirror-colorpicker.vscode .control .hue>.hue-container{background:linear-gradient(0deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);border-radius:0;height:100%}.codemirror-colorpicker.vscode .control .opacity>.opacity-container{border-radius:0;height:100%;width:30px}.codemirror-colorpicker.vscode .control .drag-bar,.codemirror-colorpicker.vscode .control .drag-bar2{background-color:transparent;border:1px solid #fff;border-radius:0;box-shadow:none;box-shadow:0 0 2px 0 #000,inset 0 0 0 0 #000;box-sizing:border-box;height:5px;transform:translateY(-50%) translateX(2px);width:33px}.codemirror-colorpicker.box{border-radius:10px;width:420px}.codemirror-colorpicker.box .colorpicker-body{-moz-column-gap:10px;column-gap:10px;display:grid;grid-template-columns:200px 1fr;grid-template-rows:auto;padding:10px 10px 10px 20px}.codemirror-colorpicker.box .colorpicker-body>.color{border-radius:8px;height:100%;overflow:hidden}.codemirror-colorpicker.box .control{padding:0!important}.codemirror-colorpicker.box .control>*{vertical-align:middle}.codemirror-colorpicker.box .control .color-info{display:inline-block;height:30px;position:relative;width:30px}.codemirror-colorpicker.box .control .color-info>.color,.codemirror-colorpicker.box .control .color-info>.empty{border-radius:50%;box-sizing:border-box;height:100%;position:absolute;width:100%}.codemirror-colorpicker.box .control .color-info>.color{border:1px solid rgba(0,0,0,.1)}.codemirror-colorpicker.box .control>.color,.codemirror-colorpicker.box .control>.empty{top:4px}.codemirror-colorpicker.box .control.has-eyedropper{padding-right:30px}.codemirror-colorpicker.box .control.has-eyedropper .el-cp-color-control__left{display:inline-block;height:30px;right:auto;position:relative;top:auto;width:30px}.codemirror-colorpicker.box .control .hue,.codemirror-colorpicker.box .control .opacity{margin-right:0!important;padding-right:0!important;padding-left:0!important}.codemirror-colorpicker.box .value{box-sizing:border-box;cursor:pointer;position:relative}.codemirror-colorpicker.box .value>.value-container{background-image:linear-gradient(-90deg,#000 0,hsla(0,0%,100%,0));border-radius:3px;box-sizing:border-box;height:10px;position:relative;width:100%}.codemirror-colorpicker.box .value>.value-container .drag-bar{border-radius:50%;cursor:pointer;height:12px;right:0;position:absolute;top:50%;transform:translateX(50%) translateY(-50%);width:12px}.codemirror-colorpicker.box .information{margin-top:6px}.codemirror-colorpicker.box .information .information-change{display:none}.codemirror-colorpicker.box .information>.information-item{margin:0!important;padding:0!important}.codemirror-colorpicker.box .colorsets{border:0;position:relative}.codemirror-colorpicker.box .colorsets .color-list{margin-left:0!important;padding:0!important}.codemirror-colorpicker.box .colorsets .color-list .current-color-sets .color-item{height:20px;margin-bottom:4px!important;margin-left:4px!important;width:20px}.codemirror-colorpicker.box .colorsets .menu{float:none;position:absolute;left:-20px;top:-15px}.codemirror-colorpicker.box .color-chooser .color-chooser-container{right:200px;top:0}.colorsets-contextmenu{background-color:#ececec;border:1px solid #ccc;border-radius:6px;display:none;font-size:13px;list-style:none;padding:4px 0;position:fixed}.colorsets-contextmenu.show{display:inline-block}.colorsets-contextmenu .menu-item{cursor:default;padding:2px 20px}.colorsets-contextmenu .menu-item:hover{background-color:#5ea3fb;color:#fff}.colorsets-contextmenu.small .menu-item.small-hide{display:none}.el-cp-color-eyedropper button{background:none;border:none;border-radius:var(--size-radius);box-sizing:border-box;cursor:pointer;display:block;font-size:0;height:30px;margin:-4px;outline:none;padding:0;transition:box-shadow var(--speed-focus) ease-out,opacity var(--speed-focus) ease-out;width:30px}.el-cp-color-eyedropper button:focus-visible{box-shadow:0 0 0 2px var(--color-key)}.el-cp-color-eyedropper button:active{opacity:.5}.el-cp-color-eyedropper svg{color:var(--color-fill);display:block;margin:0 auto}.CodeMirror{background-color:#fff;border:1px solid #dfdfdf;border-radius:3px;height:auto!important}.CodeMirror-code{outline:none}.CodeMirror-focused .cm-matchhighlight{color:#fff!important;outline:1px solid green}.CodeMirror-sizer:after,.CodeMirror-sizer:before{color:#bbb;display:block}.CodeMirror-sizer:before{content:"";padding-bottom:5px}.cm-s-rubyblue .CodeMirror-cursor{border-right:1px solid #fff!important}.CodeMirror-lint-marker-multiple,[class*=CodeMirror-lint-marker],[class*=CodeMirror-lint-message]{background-image:none}.CodeMirror-lint-marker-error,.CodeMirror-lint-marker-warning{cursor:help}.CodeMirror-lint-marker-multiple{position:absolute;top:0}[class*=CodeMirror-lint-marker]:before{font:normal 18px/1 dashicons;position:relative;top:-2px}[class*=CodeMirror-lint-message]:before{font:normal 16px/1 dashicons;right:16px;position:absolute}.CodeMirror-lint-message-error,.CodeMirror-lint-message-warning{box-shadow:0 1px 1px 0 rgba(0,0,0,.1);margin:5px 0 2px;padding:3px 28px 3px 12px}.CodeMirror-lint-message-warning{background-color:#fff8e5;border-right:4px solid #ffb900}.CodeMirror-lint-marker-warning:before,.CodeMirror-lint-message-warning:before{color:#f6a306;content:"\f534"}.CodeMirror-lint-message-error{background-color:#fbeaea;border-right:4px solid #dc3232}.CodeMirror-lint-marker-error:before,.CodeMirror-lint-message-error:before{color:#dc3232;content:"\f153"}.CodeMirror-lint-tooltip{background:none;border:none;border-radius:0;direction:rtl}.CodeMirror .CodeMirror-matchingbracket{background:rgba(255,150,0,.3);color:inherit}.CodeMirror .CodeMirror-linenumber{color:#666}.go-pro-button .badge,.nav-tab .badge,.snippet-type-badge{border:1px solid;border-radius:5px;font-size:10px;padding:1px 2px;text-transform:uppercase}.button .snippet-type-badge,.go-pro-button .badge,.nav-tab .badge,h1 .snippet-type-badge,h2 .snippet-type-badge,h3 .snippet-type-badge{margin-right:3px}.nav-tab span{vertical-align:middle}.nav-tab[data-type=php] .badge,.snippet-type-badge[data-type=php]{border-color:currentColor;color:#0073aa}.nav-tab[data-type=css] .badge,.snippet-type-badge[data-type=css]{border-color:currentColor;color:#8000ff}.nav-tab[data-type=js] .badge,.snippet-type-badge[data-type=js]{border-color:currentColor;color:#cd6600}.nav-tab[data-type=html] .badge,.snippet-type-badge[data-type=html]{border-color:currentColor;color:#548b54}.nav-tab .dashicons-external{color:#666;font-size:15px}.go-pro-button .badge{border-color:#ce0000;color:#ce0000}.form-table th{width:auto}h2{margin:25px 0 15px}h2:first-of-type{margin-top:20px}h2 label{cursor:auto}.active-snippet #title,.inactive-snippet #title{border-right-width:4px}.active-snippet #title{border-right-color:#46b450}.inactive-snippet #title{border-right-color:#bbb}.erroneous-snippet #title{border-right-color:#dc3232}#snippet-form{margin-top:10px}label[for=snippet_description] h3 div{position:absolute}.button+.button{margin-right:.5em}.submit-inline{float:left}.snippet-scope p,p.snippet-scope{margin-top:15px}.html-shortcode-options strong,.snippet-scope label{display:inline-block;margin-left:1.5em}.below-editor{display:flex;justify-content:space-between}.snippet-priority label{cursor:help;font-size:1.1em;font-weight:700;padding-left:.5em}.snippet-priority input{width:4em}.snippet-editor{position:relative}.editor-help-tooltip{background:transparent!important;cursor:help;display:inline-block;font-size:10px;padding:.3em .3em 0}.snippet-editor-help{position:absolute;left:5px;top:5px}.snippet-editor-help:hover .editor-help-text{opacity:1;visibility:visible}.editor-help-text{background-color:#555;border-radius:6px;color:#fff;font-size:small;margin-left:-10px;opacity:0;padding:5px;position:absolute;left:0;top:125%;transition:opacity .3s;visibility:hidden;white-space:nowrap;z-index:99}.editor-help-text:after{border:5px solid transparent;border-bottom-color:#555;bottom:100%;content:"";margin-left:10px;position:absolute;left:0}.editor-help-text td:first-child{padding-left:.5em}.editor-help-text .mac-key{display:none}.editor-help-text.platform-mac .mac-key{display:inline}.editor-help-text.platform-mac .pc-key{display:none}.CodeMirror{width:100%}.wrap h2.nav-tab-wrapper{border-bottom:none}.snippet-scope{display:none}.snippet-scope .description{display:block}.CodeMirror-sizer{box-sizing:border-box;min-height:300px!important;padding-bottom:1.5em!important}.CodeMirror-sizer:after{bottom:0;position:absolute}[data-snippet-type=php] .php-scopes-list{display:block}[data-snippet-type=php] .CodeMirror-sizer{padding-bottom:0!important}[data-snippet-type=php] .CodeMirror-sizer:before{content:"<?php"}[data-snippet-type=css] .css-scopes-list{display:block}[data-snippet-type=css] .CodeMirror-sizer:before{content:"<style>"}[data-snippet-type=css] .CodeMirror-sizer:after{content:"</style>"}[data-snippet-type=js] .js-scopes-list{display:block}[data-snippet-type=js] .CodeMirror-sizer:before{content:"<script>"}[data-snippet-type=js] .CodeMirror-sizer:after{content:"</script>"}[data-snippet-type=html] .html-scopes-list{display:block}[data-snippet-type=html] .CodeMirror-sizer:before{content:"<!-- begin content -->"}[data-snippet-type=html] .CodeMirror-sizer:after{content:"<!-- end content -->"}.tagger{border:0}.tagger ul{background-color:#fff;border:1px solid #dfdfdf;border-radius:3px}.tagger li:not(.tagger-new)>span,.tagger-new ul,.tagger>ul>li:not(.tagger-new)>a{background-color:#dee7f8;border:1px solid #cad8f3;border-radius:6px}.tagger li:not(.tagger-new)>span:hover,.tagger-new ul:hover,.tagger>ul>li:not(.tagger-new)>a:hover{background-color:#bbcef1;border-color:#6d95e0}.tagger-new ul a,.tagger-new ul a:visited,.tagger>ul>li:not(.tagger-new) a,.tagger>ul>li:not(.tagger-new) a:visited{color:#555;font-size:1.1em}
2
 
css/min/edit.css CHANGED
@@ -1 +1 @@
1
- .tagger{border:1px solid #909497}.tagger input[type=hidden]{display:none}.tagger>ul{align-items:center;box-sizing:border-box;display:flex;height:auto;justify-content:space-between;padding:4px 0;width:100%}.tagger ul{list-style:none;margin:0}.tagger>ul>li{margin:.4rem 0;padding-left:10px}.tagger-new ul a,.tagger-new ul a:visited,.tagger>ul>li:not(.tagger-new) a,.tagger>ul>li:not(.tagger-new) a:visited{color:#000}.tagger .tagger-new ul,.tagger li:not(.tagger-new)>span,.tagger>ul>li:not(.tagger-new)>a{background:#b1c3d7;border:1px solid #4181ed;border-radius:3px;padding:4px 4px 4px 8px}.tagger li a.close{filter:alpha(opacity=100);float:none;font-size:16px;line-height:16px;margin-left:4px;opacity:1;padding:4px}.tagger li a.close:hover{color:#fff}.tagger li:not(.tagger-new) a{text-decoration:none}.tagger .tagger-new input{background:transparent;border:none;box-shadow:none;outline:none;padding-left:0;width:100%}.tagger .tagger-new{flex-grow:1;position:relative}.tagger .tagger-new ul{padding:5px}.tagger .tagger-completion{position:absolute;z-index:100}.tagger.wrap>ul{flex-wrap:wrap;justify-content:start}.codemirror-colorview{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAJElEQVQYV2NctWrVfwYkEBYWxojMZ6SDAmT7QGx0K1EcRBsFAADeG/3M/HteAAAAAElFTkSuQmCC") repeat;border:1px solid #cecece;box-sizing:border-box;cursor:pointer;display:inline-block;height:10px;margin:0 2px;position:relative;vertical-align:middle;width:10px}.codemirror-colorview .codemirror-colorview-background{bottom:0;content:"";left:0;position:absolute;right:0;top:0}.codemirror-colorview:hover{border-color:#494949}.codemirror-colorpicker{background-color:#fff;border:1px solid rgba(0,0,0,.2);border-radius:3px;box-shadow:0 0 10px 2px rgba(0,0,0,.12);display:inline-block;position:relative;width:224px;z-index:1000}.codemirror-colorpicker>.arrow{border-bottom:10px solid rgba(0,0,0,.2);border-left:10px solid transparent;border-right:10px solid transparent;display:none;height:0;left:7px;pointer-events:none;position:absolute;top:-10px;width:0}.codemirror-colorpicker>.arrow:after{border-bottom:9px solid #fff;border-left:9px solid transparent;border-right:9px solid transparent;content:"";height:0;left:-9px;position:absolute;top:1px;width:0}.codemirror-colorpicker .colorpicker-body .arrow-button{background-color:transparent;height:12px;padding:0;position:relative;width:10px}.codemirror-colorpicker .colorpicker-body .arrow-button:before{border-bottom:3px solid #000;height:50%;top:0}.codemirror-colorpicker .colorpicker-body .arrow-button:after,.codemirror-colorpicker .colorpicker-body .arrow-button:before{border-left:3px solid transparent;border-right:3px solid transparent;box-sizing:border-box;content:"";display:inline-block;height:0;left:0;margin:2px;pointer-events:none;position:absolute;right:0;width:0}.codemirror-colorpicker .colorpicker-body .arrow-button:after{border-top:3px solid #000;bottom:0;top:50%}.codemirror-colorpicker .colorpicker-body .color{cursor:pointer;height:120px;overflow:hidden;position:relative}.codemirror-colorpicker .colorpicker-body .color>.saturation,.codemirror-colorpicker .colorpicker-body .color>.saturation>.value{height:100%;position:relative;width:100%}.codemirror-colorpicker .colorpicker-body .color>.saturation>.value>.drag-pointer{border-radius:50%;height:10px;position:absolute;transform:translateX(-50%) translateY(-50%);width:10px}.codemirror-colorpicker .colorpicker-body .color>.saturation{background-color:hsla(20,42%,65%,0);background-image:linear-gradient(90deg,#fff,hsla(20,42%,65%,0));background-repeat:repeat-x}.codemirror-colorpicker .colorpicker-body .color>.saturation>.value{background-image:linear-gradient(0deg,#000,hsla(20,42%,65%,0))}.codemirror-colorpicker .colorpicker-body .color>.saturation>.value>.drag-pointer{border:1px solid #fff;box-shadow:0 0 2px 0 rgba(0,0,0,.05)}.codemirror-colorpicker .colorpicker-body .control{padding:10px 0;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.codemirror-colorpicker .colorpicker-body .control.has-eyedropper{padding-left:30px}.codemirror-colorpicker .colorpicker-body .control.has-eyedropper .el-cp-color-control__left{border-radius:50%;box-sizing:border-box;height:30px;left:12px;position:absolute;top:20px;width:30px}.codemirror-colorpicker .colorpicker-body .control.has-eyedropper>.color,.codemirror-colorpicker .colorpicker-body .control.has-eyedropper>.empty{left:45px}.codemirror-colorpicker .colorpicker-body .control>.color,.codemirror-colorpicker .colorpicker-body .control>.empty{border-radius:50%;box-sizing:border-box;height:30px;left:12px;position:absolute;top:14px;width:30px}.codemirror-colorpicker .colorpicker-body .control>.color{border:1px solid rgba(0,0,0,.1)}.codemirror-colorpicker .colorpicker-body .control>.hue{box-sizing:border-box;cursor:pointer;margin:0 0 0 42px;padding:6px 16px;position:relative}.codemirror-colorpicker .colorpicker-body .control>.hue>.hue-container{border-radius:3px;height:10px;position:relative;width:100%}.codemirror-colorpicker .colorpicker-body .control>.opacity{box-sizing:border-box;cursor:pointer;margin:0 0 0 42px;padding:3px 16px;position:relative}.codemirror-colorpicker .colorpicker-body .control>.opacity>.opacity-container{border-radius:3px;height:10px;position:relative;width:100%}.codemirror-colorpicker .colorpicker-body .control .drag-bar,.codemirror-colorpicker .colorpicker-body .control .drag-bar2{border-radius:50%;cursor:pointer;height:12px;left:0;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:12px}.codemirror-colorpicker .colorpicker-body .control>.hue>.hue-container{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.codemirror-colorpicker .colorpicker-body .control>.opacity>.opacity-container{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAJElEQVQYV2NctWrVfwYkEBYWxojMZ6SDAmT7QGx0K1EcRBsFAADeG/3M/HteAAAAAElFTkSuQmCC") repeat}.codemirror-colorpicker .colorpicker-body .control>.opacity>.opacity-container>.color-bar{bottom:0;content:"";display:block;left:0;position:absolute;right:0;top:0}.codemirror-colorpicker .colorpicker-body .control>.empty{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAJElEQVQYV2NctWrVfwYkEBYWxojMZ6SDAmT7QGx0K1EcRBsFAADeG/3M/HteAAAAAElFTkSuQmCC") repeat}.codemirror-colorpicker .colorpicker-body .control .drag-bar,.codemirror-colorpicker .colorpicker-body .control .drag-bar2{background-color:#fefefe;border:1px solid rgba(0,0,0,.05);box-shadow:2px 2px 2px 0 rgba(0,0,0,.2)}.codemirror-colorpicker .colorpicker-body .information{box-sizing:padding-box;position:relative}.codemirror-colorpicker .colorpicker-body .information>input{bottom:20px;box-sizing:border-box;font-size:10px;height:20px;padding:0 0 0 2px;position:absolute;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.codemirror-colorpicker .colorpicker-body .information>input[type=number]{-webkit-appearance:none;-moz-appearance:none;appearance:none}.codemirror-colorpicker .colorpicker-body .information>input[type=number]::-webkit-inner-spin-button,.codemirror-colorpicker .colorpicker-body .information>input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.codemirror-colorpicker .colorpicker-body .information.hex>.information-item.hex,.codemirror-colorpicker .colorpicker-body .information.hsl>.information-item.hsl,.codemirror-colorpicker .colorpicker-body .information.rgb>.information-item.rgb{display:flex}.codemirror-colorpicker .colorpicker-body .information>.information-item{box-sizing:border-box;display:none;margin-right:40px;padding:0 5px 0 9px;position:relative}.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field{box-sizing:border-box;display:block;flex:1;padding:3px;position:relative}.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field>.title{color:#a9a9a9;cursor:pointer;font-size:12px;padding-top:2px;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field input{border:1px solid #cbcbcb;border-radius:2px;box-sizing:border-box;color:#333;font-size:11px;height:21px;padding:3px;text-align:center;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;width:100%}.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field input[type=number]{-webkit-appearance:none;-moz-appearance:none;appearance:none}.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field input[type=number]::-webkit-inner-spin-button,.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field.hsl-l input[type=number],.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field.hsl-s input[type=number]{padding-left:1px;padding-right:10px}.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field .postfix{box-sizing:border-box;display:inline-block;font-size:11px;height:21px;line-height:2;padding:2px;position:absolute;right:3px;text-align:center;top:2px}.codemirror-colorpicker .colorpicker-body .information>.information-change{bottom:0;box-sizing:border-box;display:block;padding-top:5px;position:absolute;right:0;text-align:center;top:0;width:40px}.codemirror-colorpicker .colorpicker-body .information>.information-change>.format-change-button{background:transparent;border:0;box-sizing:border-box;cursor:pointer;outline:none}.codemirror-colorpicker .colorpicker-body .information>.title{color:#a3a3a3}.codemirror-colorpicker .colorpicker-body .information>.input{color:#333}.codemirror-colorpicker .colorpicker-body .colorsets{border-top:1px solid #e2e2e2}.codemirror-colorpicker .colorpicker-body .colorsets>.menu{float:right;padding:10px 15px 10px 5px}.codemirror-colorpicker .colorpicker-body .colorsets>.menu button{border:0;cursor:pointer;font-family:serif,sans-serif;font-size:14px;font-weight:300;outline:none}.codemirror-colorpicker .colorpicker-body .colorsets>.color-list{box-sizing:border-box;display:block;line-height:0;margin-right:30px;padding:12px 0 0 12px}.codemirror-colorpicker .colorpicker-body .colorsets>.color-list .color-item{background-size:contain;border-radius:2px;box-sizing:border-box;cursor:pointer;display:inline-block;height:13px;margin-bottom:12px;margin-right:12px;overflow:hidden;position:relative;vertical-align:middle;width:13px}.codemirror-colorpicker .colorpicker-body .colorsets>.color-list .color-item:hover{transform:scale(1.2)}.codemirror-colorpicker .colorpicker-body .colorsets>.color-list .color-item .empty{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAJElEQVQYV2NctWrVfwYkEBYWxojMZ6SDAmT7QGx0K1EcRBsFAADeG/3M/HteAAAAAElFTkSuQmCC") repeat;height:100%;left:0;margin:0;padding:0;pointer-events:none;position:absolute;top:0;width:100%}.codemirror-colorpicker .colorpicker-body .colorsets>.color-list .color-item .color-view{border:1px solid rgba(0,0,0,.1);box-sizing:border-box;height:100%;left:0;margin:0;padding:0;pointer-events:none;position:absolute;top:0;width:100%}.codemirror-colorpicker .colorpicker-body .colorsets>.color-list .add-color-item{color:#8e8e8e;cursor:pointer;display:inline-block;font-family:serif,sans-serif;font-size:16px;font-weight:400;height:13px;line-height:1;margin-bottom:12px;margin-right:12px;text-align:center;vertical-align:middle;width:13px}.codemirror-colorpicker .colorpicker-body .color-chooser{background-color:rgba(0,0,0,.5);bottom:0;left:0;opacity:0;pointer-events:none;position:absolute;right:0;top:0;transition:opacity .05s ease-out}.codemirror-colorpicker .colorpicker-body .color-chooser.open{opacity:1;pointer-events:all}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container{background-color:#fff;bottom:0;left:0;position:absolute;right:0;top:120px}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-item-header{border-bottom:1px solid rgba(0,0,0,.2);box-sizing:border-box;display:flex;height:34px;left:0;padding:3px 0;position:absolute;right:0;top:0}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-item-header .title{box-sizing:border-box;color:#000;flex:2;font-size:15px;font-weight:700;margin:0;overflow:hidden;padding:5px 5px 5px 14px;text-align:left;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-item-header .items{cursor:pointer;display:block;flex:1;height:100%;line-height:2;padding-right:10px;text-align:right}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-list{bottom:0;left:0;overflow:auto;position:absolute;right:0;top:34px}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-list .colorsets-item{border-bottom:1px solid rgba(0,0,0,.1);cursor:pointer;display:flex;padding:3px 0}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-list .colorsets-item:hover{background-color:rgba(0,0,0,.05)}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-list .colorsets-item .title{box-sizing:border-box;color:#000;flex:2;font-size:14px;font-size:13px;font-weight:400;margin:0;overflow:hidden;padding:5px 5px 5px 14px;pointer-events:none;text-align:left;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-list .colorsets-item .items{cursor:pointer;display:block;flex:3;height:100%;line-height:1.6;pointer-events:none}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-list .colorsets-item .items .color-item{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAJElEQVQYV2NctWrVfwYkEBYWxojMZ6SDAmT7QGx0K1EcRBsFAADeG/3M/HteAAAAAElFTkSuQmCC") repeat;background-size:contain;border:1px solid #ddd;border-radius:3px;box-sizing:border-box;cursor:pointer;display:inline-block;height:13px;margin-right:10px;overflow:hidden;vertical-align:middle;width:13px}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-list .colorsets-item .items .color-item .color-view{height:100%;margin:0;padding:0;pointer-events:none;width:100%}.codemirror-colorpicker.sketch{border-radius:5px}.codemirror-colorpicker.sketch>.colorpicker-body>.color{box-sizing:border-box;height:150px;margin:10px 10px 2px}.codemirror-colorpicker.sketch>.colorpicker-body>.control{padding:0}.codemirror-colorpicker.sketch>.colorpicker-body>.control.has-eyedropper{padding-left:30px}.codemirror-colorpicker.sketch>.colorpicker-body>.control.has-eyedropper .el-cp-color-control__left{top:4px}.codemirror-colorpicker.sketch>.colorpicker-body>.control>.color,.codemirror-colorpicker.sketch>.colorpicker-body>.control>.empty{border-radius:2px;box-sizing:border-box;height:26px;left:auto;position:absolute;right:10px;top:1px;width:26px}.codemirror-colorpicker.sketch>.colorpicker-body>.control>.color{box-shadow:inset 0 0 1px 0 rgba(0,0,0,.5)}.codemirror-colorpicker.sketch>.colorpicker-body>.control>.hue{margin:0 38px 0 0;padding:2px 2px 2px 10px;position:relative}.codemirror-colorpicker.sketch>.colorpicker-body>.control>.hue>.hue-container{border-radius:0}.codemirror-colorpicker.sketch>.colorpicker-body>.control>.opacity{margin:0 38px 0 0;padding:2px 2px 2px 10px;position:relative}.codemirror-colorpicker.sketch>.colorpicker-body>.control>.opacity>.opacity-container{border-radius:0}.codemirror-colorpicker.sketch>.colorpicker-body>.control .drag-bar,.codemirror-colorpicker.sketch>.colorpicker-body>.control .drag-bar2{border-radius:0;border-radius:1px;bottom:1px!important;height:50%;left:0;top:50%;transform:translateX(-50%) translateY(-50%);width:2px}.codemirror-colorpicker.sketch>.colorpicker-body>.control .drag-bar.first,.codemirror-colorpicker.sketch>.colorpicker-body>.control .drag-bar2.first{left:0;transform:translateX(50%) translateY(-50%)!important}.codemirror-colorpicker.sketch>.colorpicker-body>.control .drag-bar.last,.codemirror-colorpicker.sketch>.colorpicker-body>.control .drag-bar2.last{transform:translateX(-150%) translateY(-50%)!important}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-change{display:none}.codemirror-colorpicker.sketch>.colorpicker-body>.information.rgb .information-item.rgb{display:inherit}.codemirror-colorpicker.sketch>.colorpicker-body>.information.rgb .information-item.hsl{display:none!important}.codemirror-colorpicker.sketch>.colorpicker-body>.information.hex .information-item.hex{display:inherit}.codemirror-colorpicker.sketch>.colorpicker-body>.information.hex .information-item.hsl,.codemirror-colorpicker.sketch>.colorpicker-body>.information.hsl .information-item.rgb{display:none!important}.codemirror-colorpicker.sketch>.colorpicker-body>.information.hsl .information-item.hsl{display:inherit}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-item{display:inline-flex!important;margin-right:0}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-item>.input-field{padding-left:0}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-item>.input-field:last-child{padding-right:0}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-item>.input-field>.title{color:#000;cursor:pointer;font-size:11px}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-item>.input-field:last-child:not(:first-child){padding-right:0}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-item.hex{padding-left:5px;padding-right:0;width:74px}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-item.rgb{padding-left:0;padding-right:0;width:140px}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-item.hsl{display:none;padding-left:0;padding-right:0;width:140px}.codemirror-colorpicker.sketch>.colorpicker-body>.colorsets>.color-list{margin-right:0;padding-right:12px}.codemirror-colorpicker.sketch>.colorpicker-body>.colorsets>.color-list .color-item{border-radius:3px;height:16px;margin-bottom:10px;margin-right:9px;width:16px}.codemirror-colorpicker.palette{border-radius:3px;box-shadow:none}.codemirror-colorpicker.palette>.colorpicker-body>.color,.codemirror-colorpicker.palette>.colorpicker-body>.control,.codemirror-colorpicker.palette>.colorpicker-body>.information{display:none}.codemirror-colorpicker.palette>.colorpicker-body>.colorsets{border-top:0;box-sizing:border-box}.codemirror-colorpicker.palette>.colorpicker-body>.colorsets>.color-list .color-item{height:15px;margin-bottom:10px;margin-right:10px;width:15px}.codemirror-colorpicker.palette>.colorpicker-body>.color-chooser{box-sizing:border-box;display:none}.codemirror-colorpicker.palette>.colorpicker-body>.color-chooser.open{border:1px solid #d8d8d8;border-radius:3px;bottom:auto;box-shadow:0 0 10px 2px rgba(0,0,0,.12);display:block;left:-1px;right:-1px;top:-1px}.codemirror-colorpicker.palette>.colorpicker-body>.color-chooser.open .color-chooser-container{background-color:#fff;border-radius:2px;bottom:auto;box-sizing:border-box;left:auto;position:relative;right:auto;top:auto}.codemirror-colorpicker.palette>.colorpicker-body>.color-chooser.open .color-chooser-container .colorsets-item-header{border-top-left-radius:3px;border-top-right-radius:3px;bottom:auto;left:auto;position:relative;right:auto;top:auto}.codemirror-colorpicker.palette>.colorpicker-body>.color-chooser.open .color-chooser-container .colorsets-list{bottom:auto;left:auto;overflow:auto;position:relative;right:auto;top:auto}.codemirror-colorpicker.palette>.colorpicker-body>.color-chooser.open .color-chooser-container .colorsets-list .colorsets-item:last-child{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.codemirror-colorpicker.macos .colorpicker-body .wheel{box-sizing:border-box;height:224px;position:relative;width:224px}.codemirror-colorpicker.macos .colorpicker-body .wheel .wheel-canvas{border-radius:50%;height:214px;left:5px;position:absolute;top:5px;width:214px}.codemirror-colorpicker.macos .colorpicker-body .wheel .drag-pointer{border:1px solid #fff;border-radius:50%;display:inline-block;height:10px;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:10px;z-index:2}.codemirror-colorpicker.macos .control{padding-top:0}.codemirror-colorpicker.macos .control>.color,.codemirror-colorpicker.macos .control>.empty{top:4px}.codemirror-colorpicker.macos .control.has-eyedropper{padding-left:30px}.codemirror-colorpicker.macos .control.has-eyedropper .el-cp-color-control__left{top:9px}.codemirror-colorpicker.macos .value{box-sizing:border-box;cursor:pointer;margin:0 0 0 42px;padding:6px 16px;position:relative}.codemirror-colorpicker.macos .value>.value-container{background-image:linear-gradient(90deg,#000 0,hsla(0,0%,100%,0));border-radius:3px;box-sizing:border-box;height:10px;position:relative;width:100%}.codemirror-colorpicker.macos .value>.value-container .drag-bar{border-radius:50%;cursor:pointer;height:12px;left:0;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:12px}.codemirror-colorpicker.mini{display:inline-block;width:180px}.codemirror-colorpicker.mini .control{padding:0}.codemirror-colorpicker.mini .control .hue,.codemirror-colorpicker.mini .control .opacity{margin:0;padding:0}.codemirror-colorpicker.mini .control .hue>.hue-container,.codemirror-colorpicker.mini .control .opacity>.opacity-container{border-radius:0;height:20px;overflow:hidden}.codemirror-colorpicker.mini .control .drag-bar,.codemirror-colorpicker.mini .control .drag-bar2{background-color:transparent;border:0;box-shadow:none;box-sizing:border-box;height:100%;width:5px}.codemirror-colorpicker.mini .control .drag-bar.last:before,.codemirror-colorpicker.mini .control .drag-bar.lastafter,.codemirror-colorpicker.mini .control .drag-bar2.last:before,.codemirror-colorpicker.mini .control .drag-bar2.lastafter{left:1px}.codemirror-colorpicker.mini .control .drag-bar.first:after,.codemirror-colorpicker.mini .control .drag-bar.first:before,.codemirror-colorpicker.mini .control .drag-bar2.first:after,.codemirror-colorpicker.mini .control .drag-bar2.first:before{left:3px}.codemirror-colorpicker.mini .control .drag-bar2:before,.codemirror-colorpicker.mini .control .drag-bar:before{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #000;content:"";height:0;left:2px;position:absolute;top:0;transform:translateX(-50%);width:0}.codemirror-colorpicker.mini .control .drag-bar2:after,.codemirror-colorpicker.mini .control .drag-bar:after{border-bottom:4px solid #000;border-left:4px solid transparent;border-right:4px solid transparent;bottom:0;content:"";height:0;left:2px;position:absolute;transform:translateX(-50%);width:0}.codemirror-colorpicker.mini-vertical{display:inline-block;width:180px}.codemirror-colorpicker.mini-vertical .color{display:inline-block;height:160px;vertical-align:middle;width:140px}.codemirror-colorpicker.mini-vertical .control{display:inline-block;height:160px;padding:0;vertical-align:middle}.codemirror-colorpicker.mini-vertical .control .hue,.codemirror-colorpicker.mini-vertical .control .opacity{display:inline-block;height:100%;margin:0;padding:0;position:relative;vertical-align:middle;width:20px}.codemirror-colorpicker.mini-vertical .control .hue>.hue-container{background:linear-gradient(0deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);border-radius:0;height:100%;overflow:hidden}.codemirror-colorpicker.mini-vertical .control .opacity>.opacity-container{border-radius:0;height:100%;overflow:hidden;width:20px}.codemirror-colorpicker.mini-vertical .control .drag-bar,.codemirror-colorpicker.mini-vertical .control .drag-bar2{background-color:transparent;border:0;box-shadow:none;box-sizing:border-box;height:2px;transform:none;width:100%}.codemirror-colorpicker.mini-vertical .control .drag-bar.last:after,.codemirror-colorpicker.mini-vertical .control .drag-bar.last:before,.codemirror-colorpicker.mini-vertical .control .drag-bar2.last:after,.codemirror-colorpicker.mini-vertical .control .drag-bar2.last:before{top:2px}.codemirror-colorpicker.mini-vertical .control .drag-bar.first:after,.codemirror-colorpicker.mini-vertical .control .drag-bar.first:before,.codemirror-colorpicker.mini-vertical .control .drag-bar2.first:after,.codemirror-colorpicker.mini-vertical .control .drag-bar2.first:before{top:-1px}.codemirror-colorpicker.mini-vertical .control .drag-bar2:before,.codemirror-colorpicker.mini-vertical .control .drag-bar:before{border-bottom:4px solid transparent;border-left:4px solid #000;border-top:4px solid transparent;content:"";height:0;left:0;position:absolute;top:2px;transform:translateY(-50%);width:0}.codemirror-colorpicker.mini-vertical .control .drag-bar2:after,.codemirror-colorpicker.mini-vertical .control .drag-bar:after{border-bottom:4px solid transparent;border-right:4px solid #000;border-top:4px solid transparent;content:"";height:0;position:absolute;right:0;top:2px;transform:translateY(-50%);width:0}.codemirror-colorpicker.ring .colorpicker-body>.color{height:120px;left:52px;position:absolute;top:52px;width:120px}.codemirror-colorpicker.ring .colorpicker-body .wheel{box-sizing:border-box;height:224px;position:relative;width:224px}.codemirror-colorpicker.ring .colorpicker-body .wheel .wheel-canvas{border-radius:50%;height:214px;left:5px;position:absolute;top:5px;width:214px}.codemirror-colorpicker.ring .colorpicker-body .wheel .drag-pointer{border:1px solid #fff;border-radius:50%;display:inline-block;height:10px;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:10px;z-index:2}.codemirror-colorpicker.ring .control{padding-top:0}.codemirror-colorpicker.ring .control .value{display:none}.codemirror-colorpicker.ring .control>.color,.codemirror-colorpicker.ring .control>.empty{border-radius:2px;height:30px;top:-17px;width:30px}.codemirror-colorpicker.ring .control.has-eyedropper{padding-left:30px;padding-top:10px}.codemirror-colorpicker.ring .control.has-eyedropper>.color,.codemirror-colorpicker.ring .control.has-eyedropper>.empty{top:-2px}.codemirror-colorpicker.ring .control.has-eyedropper .el-cp-color-control__left{top:4px}.codemirror-colorpicker.xd{display:inline-block;padding-top:12px;width:245px}.codemirror-colorpicker.xd .color{border:1px solid #cecece;border-radius:3px;box-sizing:border-box;display:inline-block;height:170px;margin-bottom:12px;margin-left:12px;overflow:hidden;vertical-align:middle;width:170px}.codemirror-colorpicker.xd .color>.saturation>.value>.drag-pointer{border:2px solid #fff;box-shadow:0 0 1px 0 #000,inset 0 0 1px 0 #000;height:7px;width:7px}.codemirror-colorpicker.xd .control{display:inline-block;height:170px;margin-bottom:12px;margin-right:12px;padding:0;vertical-align:middle}.codemirror-colorpicker.xd .control .hue,.codemirror-colorpicker.xd .control .opacity{border-radius:3px;display:inline-block;height:100%;margin:0 0 0 8px;overflow:hidden;padding:0;position:relative;vertical-align:middle;width:13px}.codemirror-colorpicker.xd .control .hue>.hue-container{background:linear-gradient(0deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);border-radius:0;height:100%;overflow:hidden}.codemirror-colorpicker.xd .control .opacity>.opacity-container{border-radius:0;height:100%;overflow:hidden}.codemirror-colorpicker.xd .control .drag-bar,.codemirror-colorpicker.xd .control .drag-bar2{background-color:transparent;border:2px solid #fff;box-shadow:0 0 1px 0 #000,inset 0 0 1px 0 #000;box-sizing:border-box;height:10px;left:50%;overflow:hidden;transform:none;transform:translateX(-50%) translateY(-50%);width:10px}.codemirror-colorpicker.xd .information{margin-top:5px}.codemirror-colorpicker.vscode{background-color:#333;border:1px solid #ececec;box-sizing:border-box;width:336px}.codemirror-colorpicker.vscode,.codemirror-colorpicker.vscode .colorpicker-body{border-radius:0;display:inline-block}.codemirror-colorpicker.vscode .colorpicker-body .color-view{height:34px}.codemirror-colorpicker.vscode .colorpicker-body .color-view.has-eyedropper{display:flex}.codemirror-colorpicker.vscode .colorpicker-body .color-view.has-eyedropper .color-view-container{display:inline-block;width:254px}.codemirror-colorpicker.vscode .colorpicker-body .color-view.has-eyedropper .el-cp-color-control__left{float:right;padding:6px 0;text-align:center;width:80px}.codemirror-colorpicker.vscode .colorpicker-body .color-view.has-eyedropper .el-cp-color-control__left button{display:inline-block}.codemirror-colorpicker.vscode .colorpicker-body .color-view.has-eyedropper .el-cp-color-control__left button svg path{fill:#fff}.codemirror-colorpicker.vscode .colorpicker-body .color-view .color-view-container{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAJElEQVQYV2NctWrVfwYkEBYWxojMZ6SDAmT7QGx0K1EcRBsFAADeG/3M/HteAAAAAElFTkSuQmCC") repeat;cursor:pointer;font-size:14px;height:100%;line-height:34px;text-align:center;text-shadow:0 0 3px #535353;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:100%}.codemirror-colorpicker.vscode .colorpicker-body .color-view .color-view-container .preview{display:block;height:100%}.codemirror-colorpicker.vscode .colorpicker-body .color-tool{padding:8px}.codemirror-colorpicker.vscode .color{display:inline-block;height:160px;vertical-align:middle;width:240px}.codemirror-colorpicker.vscode .control{display:inline-block;height:160px;padding:0 0 0 4px;vertical-align:middle}.codemirror-colorpicker.vscode .control .hue,.codemirror-colorpicker.vscode .control .opacity{display:inline-block;height:100%;margin:0;padding:0;position:relative;vertical-align:middle;width:30px}.codemirror-colorpicker.vscode .control .hue{padding-left:5px;width:35px}.codemirror-colorpicker.vscode .control .hue>.hue-container{background:linear-gradient(0deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);border-radius:0;height:100%}.codemirror-colorpicker.vscode .control .opacity>.opacity-container{border-radius:0;height:100%;width:30px}.codemirror-colorpicker.vscode .control .drag-bar,.codemirror-colorpicker.vscode .control .drag-bar2{background-color:transparent;border:1px solid #fff;border-radius:0;box-shadow:none;box-shadow:0 0 2px 0 #000,inset 0 0 0 0 #000;box-sizing:border-box;height:5px;transform:translateY(-50%) translateX(-2px);width:33px}.codemirror-colorpicker.box{border-radius:10px;width:420px}.codemirror-colorpicker.box .colorpicker-body{-moz-column-gap:10px;column-gap:10px;display:grid;grid-template-columns:200px 1fr;grid-template-rows:auto;padding:10px 20px 10px 10px}.codemirror-colorpicker.box .colorpicker-body>.color{border-radius:8px;height:100%;overflow:hidden}.codemirror-colorpicker.box .control{padding:0!important}.codemirror-colorpicker.box .control>*{vertical-align:middle}.codemirror-colorpicker.box .control .color-info{display:inline-block;height:30px;position:relative;width:30px}.codemirror-colorpicker.box .control .color-info>.color,.codemirror-colorpicker.box .control .color-info>.empty{border-radius:50%;box-sizing:border-box;height:100%;position:absolute;width:100%}.codemirror-colorpicker.box .control .color-info>.color{border:1px solid rgba(0,0,0,.1)}.codemirror-colorpicker.box .control>.color,.codemirror-colorpicker.box .control>.empty{top:4px}.codemirror-colorpicker.box .control.has-eyedropper{padding-left:30px}.codemirror-colorpicker.box .control.has-eyedropper .el-cp-color-control__left{display:inline-block;height:30px;left:auto;position:relative;top:auto;width:30px}.codemirror-colorpicker.box .control .hue,.codemirror-colorpicker.box .control .opacity{margin-left:0!important;padding-left:0!important;padding-right:0!important}.codemirror-colorpicker.box .value{box-sizing:border-box;cursor:pointer;position:relative}.codemirror-colorpicker.box .value>.value-container{background-image:linear-gradient(90deg,#000 0,hsla(0,0%,100%,0));border-radius:3px;box-sizing:border-box;height:10px;position:relative;width:100%}.codemirror-colorpicker.box .value>.value-container .drag-bar{border-radius:50%;cursor:pointer;height:12px;left:0;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:12px}.codemirror-colorpicker.box .information{margin-top:6px}.codemirror-colorpicker.box .information .information-change{display:none}.codemirror-colorpicker.box .information>.information-item{margin:0!important;padding:0!important}.codemirror-colorpicker.box .colorsets{border:0;position:relative}.codemirror-colorpicker.box .colorsets .color-list{margin-right:0!important;padding:0!important}.codemirror-colorpicker.box .colorsets .color-list .current-color-sets .color-item{height:20px;margin-bottom:4px!important;margin-right:4px!important;width:20px}.codemirror-colorpicker.box .colorsets .menu{float:none;position:absolute;right:-20px;top:-15px}.codemirror-colorpicker.box .color-chooser .color-chooser-container{left:200px;top:0}.colorsets-contextmenu{background-color:#ececec;border:1px solid #ccc;border-radius:6px;display:none;font-size:13px;list-style:none;padding:4px 0;position:fixed}.colorsets-contextmenu.show{display:inline-block}.colorsets-contextmenu .menu-item{cursor:default;padding:2px 20px}.colorsets-contextmenu .menu-item:hover{background-color:#5ea3fb;color:#fff}.colorsets-contextmenu.small .menu-item.small-hide{display:none}.el-cp-color-eyedropper button{background:none;border:none;border-radius:var(--size-radius);box-sizing:border-box;cursor:pointer;display:block;font-size:0;height:30px;margin:-4px;outline:none;padding:0;transition:box-shadow var(--speed-focus) ease-out,opacity var(--speed-focus) ease-out;width:30px}.el-cp-color-eyedropper button:focus-visible{box-shadow:0 0 0 2px var(--color-key)}.el-cp-color-eyedropper button:active{opacity:.5}.el-cp-color-eyedropper svg{color:var(--color-fill);display:block;margin:0 auto}.CodeMirror{background-color:#fff;border:1px solid #dfdfdf;border-radius:3px;height:auto!important}.CodeMirror-code{outline:none}.CodeMirror-focused .cm-matchhighlight{color:#fff!important;outline:1px solid green}.CodeMirror-sizer:after,.CodeMirror-sizer:before{color:#bbb;display:block}.CodeMirror-sizer:before{content:"";padding-bottom:5px}.cm-s-rubyblue .CodeMirror-cursor{border-left:1px solid #fff!important}.CodeMirror-lint-marker-multiple,[class*=CodeMirror-lint-marker],[class*=CodeMirror-lint-message]{background-image:none}.CodeMirror-lint-marker-error,.CodeMirror-lint-marker-warning{cursor:help}.CodeMirror-lint-marker-multiple{position:absolute;top:0}[class*=CodeMirror-lint-marker]:before{font:normal 18px/1 dashicons;position:relative;top:-2px}[class*=CodeMirror-lint-message]:before{font:normal 16px/1 dashicons;left:16px;position:absolute}.CodeMirror-lint-message-error,.CodeMirror-lint-message-warning{box-shadow:0 1px 1px 0 rgba(0,0,0,.1);margin:5px 0 2px;padding:3px 12px 3px 28px}.CodeMirror-lint-message-warning{background-color:#fff8e5;border-left:4px solid #ffb900}.CodeMirror-lint-marker-warning:before,.CodeMirror-lint-message-warning:before{color:#f6a306;content:"\f534"}.CodeMirror-lint-message-error{background-color:#fbeaea;border-left:4px solid #dc3232}.CodeMirror-lint-marker-error:before,.CodeMirror-lint-message-error:before{color:#dc3232;content:"\f153"}.CodeMirror-lint-tooltip{background:none;border:none;border-radius:0;direction:ltr}.CodeMirror .CodeMirror-matchingbracket{background:rgba(255,150,0,.3);color:inherit}.CodeMirror .CodeMirror-linenumber{color:#666}.go-pro-button span,.nav-tab span,.snippet-type-badge{border:1px solid;border-radius:5px;font-size:10px;padding:1px 2px;text-transform:uppercase}.button .snippet-type-badge,.go-pro-button span h1 .snippet-type-badge,.nav-tab span,h2 .snippet-type-badge,h3 .snippet-type-badge{margin-left:3px}.nav-tab span{vertical-align:middle}.nav-tab[data-type=php] span,.snippet-type-badge[data-type=php]{border-color:currentColor;color:#0073aa}.nav-tab[data-type=css] span,.snippet-type-badge[data-type=css]{border-color:currentColor;color:#8000ff}.nav-tab[data-type=js] span,.snippet-type-badge[data-type=js]{border-color:currentColor;color:#cd6600}.nav-tab[data-type=html] span,.snippet-type-badge[data-type=html]{border-color:currentColor;color:#548b54}.go-pro-button span{border-color:#ce0000;color:#ce0000}.form-table th{width:auto}h2{margin:25px 0 15px}h2:first-of-type{margin-top:20px}h2 label{cursor:auto}.active-snippet #title,.inactive-snippet #title{border-left-width:4px}.active-snippet #title{border-left-color:#46b450}.inactive-snippet #title{border-left-color:#bbb}.erroneous-snippet #title{border-left-color:#dc3232}#snippet-form{margin-top:10px}label[for=snippet_description] h3 div{position:absolute}.button+.button{margin-left:.5em}.submit-inline{float:right}.snippet-scope p,p.snippet-scope{margin-top:15px}.html-shortcode-options strong,.snippet-scope label{display:inline-block;margin-right:1.5em}.below-editor{display:flex;justify-content:space-between}.snippet-priority label{cursor:help;font-size:1.1em;font-weight:700;padding-right:.5em}.snippet-priority input{width:4em}.snippet-editor{position:relative}.editor-help-tooltip{background:transparent!important;cursor:help;display:inline-block;font-size:10px;padding:.3em .3em 0}.snippet-editor-help{position:absolute;right:5px;top:5px}.snippet-editor-help:hover .editor-help-text{opacity:1;visibility:visible}.editor-help-text{background-color:#555;border-radius:6px;color:#fff;font-size:small;margin-right:-10px;opacity:0;padding:5px;position:absolute;right:0;top:125%;transition:opacity .3s;visibility:hidden;white-space:nowrap;z-index:99}.editor-help-text:after{border:5px solid transparent;border-bottom-color:#555;bottom:100%;content:"";margin-right:10px;position:absolute;right:0}.editor-help-text td:first-child{padding-right:.5em}.editor-help-text .mac-key{display:none}.editor-help-text.platform-mac .mac-key{display:inline}.editor-help-text.platform-mac .pc-key{display:none}.CodeMirror{width:100%}.wrap h2.nav-tab-wrapper{border-bottom:none}.snippet-scope{display:none}.snippet-scope .description{display:block}.CodeMirror-sizer{box-sizing:border-box;min-height:300px!important;padding-bottom:1.5em!important}.CodeMirror-sizer:after{bottom:0;position:absolute}[data-snippet-type=php] .php-scopes-list{display:block}[data-snippet-type=php] .CodeMirror-sizer{padding-bottom:0!important}[data-snippet-type=php] .CodeMirror-sizer:before{content:"<?php"}[data-snippet-type=css] .css-scopes-list{display:block}[data-snippet-type=css] .CodeMirror-sizer:before{content:"<style>"}[data-snippet-type=css] .CodeMirror-sizer:after{content:"</style>"}[data-snippet-type=js] .js-scopes-list{display:block}[data-snippet-type=js] .CodeMirror-sizer:before{content:"<script>"}[data-snippet-type=js] .CodeMirror-sizer:after{content:"</script>"}[data-snippet-type=html] .html-scopes-list{display:block}[data-snippet-type=html] .CodeMirror-sizer:before{content:"<!-- begin content -->"}[data-snippet-type=html] .CodeMirror-sizer:after{content:"<!-- end content -->"}.tagger{border:0}.tagger ul{background-color:#fff;border:1px solid #dfdfdf;border-radius:3px}.tagger li:not(.tagger-new)>span,.tagger-new ul,.tagger>ul>li:not(.tagger-new)>a{background-color:#dee7f8;border:1px solid #cad8f3;border-radius:6px}.tagger li:not(.tagger-new)>span:hover,.tagger-new ul:hover,.tagger>ul>li:not(.tagger-new)>a:hover{background-color:#bbcef1;border-color:#6d95e0}.tagger-new ul a,.tagger-new ul a:visited,.tagger>ul>li:not(.tagger-new) a,.tagger>ul>li:not(.tagger-new) a:visited{color:#555;font-size:1.1em}
1
+ .tagger{border:1px solid #909497}.tagger input[type=hidden]{display:none}.tagger>ul{align-items:center;box-sizing:border-box;display:flex;height:auto;justify-content:space-between;padding:4px 0;width:100%}.tagger ul{list-style:none;margin:0}.tagger>ul>li{margin:.4rem 0;padding-left:10px}.tagger-new ul a,.tagger-new ul a:visited,.tagger>ul>li:not(.tagger-new) a,.tagger>ul>li:not(.tagger-new) a:visited{color:#000}.tagger .tagger-new ul,.tagger li:not(.tagger-new)>span,.tagger>ul>li:not(.tagger-new)>a{background:#b1c3d7;border:1px solid #4181ed;border-radius:3px;padding:4px 4px 4px 8px}.tagger li a.close{filter:alpha(opacity=100);float:none;font-size:16px;line-height:16px;margin-left:4px;opacity:1;padding:4px}.tagger li a.close:hover{color:#fff}.tagger li:not(.tagger-new) a{text-decoration:none}.tagger .tagger-new input{background:transparent;border:none;box-shadow:none;outline:none;padding-left:0;width:100%}.tagger .tagger-new{flex-grow:1;position:relative}.tagger .tagger-new ul{padding:5px}.tagger .tagger-completion{position:absolute;z-index:100}.tagger.wrap>ul{flex-wrap:wrap;justify-content:start}.codemirror-colorview{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAJElEQVQYV2NctWrVfwYkEBYWxojMZ6SDAmT7QGx0K1EcRBsFAADeG/3M/HteAAAAAElFTkSuQmCC") repeat;border:1px solid #cecece;box-sizing:border-box;cursor:pointer;display:inline-block;height:10px;margin:0 2px;position:relative;vertical-align:middle;width:10px}.codemirror-colorview .codemirror-colorview-background{bottom:0;content:"";left:0;position:absolute;right:0;top:0}.codemirror-colorview:hover{border-color:#494949}.codemirror-colorpicker{background-color:#fff;border:1px solid rgba(0,0,0,.2);border-radius:3px;box-shadow:0 0 10px 2px rgba(0,0,0,.12);display:inline-block;position:relative;width:224px;z-index:1000}.codemirror-colorpicker>.arrow{border-bottom:10px solid rgba(0,0,0,.2);border-left:10px solid transparent;border-right:10px solid transparent;display:none;height:0;left:7px;pointer-events:none;position:absolute;top:-10px;width:0}.codemirror-colorpicker>.arrow:after{border-bottom:9px solid #fff;border-left:9px solid transparent;border-right:9px solid transparent;content:"";height:0;left:-9px;position:absolute;top:1px;width:0}.codemirror-colorpicker .colorpicker-body .arrow-button{background-color:transparent;height:12px;padding:0;position:relative;width:10px}.codemirror-colorpicker .colorpicker-body .arrow-button:before{border-bottom:3px solid #000;height:50%;top:0}.codemirror-colorpicker .colorpicker-body .arrow-button:after,.codemirror-colorpicker .colorpicker-body .arrow-button:before{border-left:3px solid transparent;border-right:3px solid transparent;box-sizing:border-box;content:"";display:inline-block;height:0;left:0;margin:2px;pointer-events:none;position:absolute;right:0;width:0}.codemirror-colorpicker .colorpicker-body .arrow-button:after{border-top:3px solid #000;bottom:0;top:50%}.codemirror-colorpicker .colorpicker-body .color{cursor:pointer;height:120px;overflow:hidden;position:relative}.codemirror-colorpicker .colorpicker-body .color>.saturation,.codemirror-colorpicker .colorpicker-body .color>.saturation>.value{height:100%;position:relative;width:100%}.codemirror-colorpicker .colorpicker-body .color>.saturation>.value>.drag-pointer{border-radius:50%;height:10px;position:absolute;transform:translateX(-50%) translateY(-50%);width:10px}.codemirror-colorpicker .colorpicker-body .color>.saturation{background-color:hsla(20,42%,65%,0);background-image:linear-gradient(90deg,#fff,hsla(20,42%,65%,0));background-repeat:repeat-x}.codemirror-colorpicker .colorpicker-body .color>.saturation>.value{background-image:linear-gradient(0deg,#000,hsla(20,42%,65%,0))}.codemirror-colorpicker .colorpicker-body .color>.saturation>.value>.drag-pointer{border:1px solid #fff;box-shadow:0 0 2px 0 rgba(0,0,0,.05)}.codemirror-colorpicker .colorpicker-body .control{padding:10px 0;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.codemirror-colorpicker .colorpicker-body .control.has-eyedropper{padding-left:30px}.codemirror-colorpicker .colorpicker-body .control.has-eyedropper .el-cp-color-control__left{border-radius:50%;box-sizing:border-box;height:30px;left:12px;position:absolute;top:20px;width:30px}.codemirror-colorpicker .colorpicker-body .control.has-eyedropper>.color,.codemirror-colorpicker .colorpicker-body .control.has-eyedropper>.empty{left:45px}.codemirror-colorpicker .colorpicker-body .control>.color,.codemirror-colorpicker .colorpicker-body .control>.empty{border-radius:50%;box-sizing:border-box;height:30px;left:12px;position:absolute;top:14px;width:30px}.codemirror-colorpicker .colorpicker-body .control>.color{border:1px solid rgba(0,0,0,.1)}.codemirror-colorpicker .colorpicker-body .control>.hue{box-sizing:border-box;cursor:pointer;margin:0 0 0 42px;padding:6px 16px;position:relative}.codemirror-colorpicker .colorpicker-body .control>.hue>.hue-container{border-radius:3px;height:10px;position:relative;width:100%}.codemirror-colorpicker .colorpicker-body .control>.opacity{box-sizing:border-box;cursor:pointer;margin:0 0 0 42px;padding:3px 16px;position:relative}.codemirror-colorpicker .colorpicker-body .control>.opacity>.opacity-container{border-radius:3px;height:10px;position:relative;width:100%}.codemirror-colorpicker .colorpicker-body .control .drag-bar,.codemirror-colorpicker .colorpicker-body .control .drag-bar2{border-radius:50%;cursor:pointer;height:12px;left:0;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:12px}.codemirror-colorpicker .colorpicker-body .control>.hue>.hue-container{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.codemirror-colorpicker .colorpicker-body .control>.opacity>.opacity-container{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAJElEQVQYV2NctWrVfwYkEBYWxojMZ6SDAmT7QGx0K1EcRBsFAADeG/3M/HteAAAAAElFTkSuQmCC") repeat}.codemirror-colorpicker .colorpicker-body .control>.opacity>.opacity-container>.color-bar{bottom:0;content:"";display:block;left:0;position:absolute;right:0;top:0}.codemirror-colorpicker .colorpicker-body .control>.empty{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAJElEQVQYV2NctWrVfwYkEBYWxojMZ6SDAmT7QGx0K1EcRBsFAADeG/3M/HteAAAAAElFTkSuQmCC") repeat}.codemirror-colorpicker .colorpicker-body .control .drag-bar,.codemirror-colorpicker .colorpicker-body .control .drag-bar2{background-color:#fefefe;border:1px solid rgba(0,0,0,.05);box-shadow:2px 2px 2px 0 rgba(0,0,0,.2)}.codemirror-colorpicker .colorpicker-body .information{box-sizing:padding-box;position:relative}.codemirror-colorpicker .colorpicker-body .information>input{bottom:20px;box-sizing:border-box;font-size:10px;height:20px;padding:0 0 0 2px;position:absolute;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.codemirror-colorpicker .colorpicker-body .information>input[type=number]{-webkit-appearance:none;-moz-appearance:none;appearance:none}.codemirror-colorpicker .colorpicker-body .information>input[type=number]::-webkit-inner-spin-button,.codemirror-colorpicker .colorpicker-body .information>input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.codemirror-colorpicker .colorpicker-body .information.hex>.information-item.hex,.codemirror-colorpicker .colorpicker-body .information.hsl>.information-item.hsl,.codemirror-colorpicker .colorpicker-body .information.rgb>.information-item.rgb{display:flex}.codemirror-colorpicker .colorpicker-body .information>.information-item{box-sizing:border-box;display:none;margin-right:40px;padding:0 5px 0 9px;position:relative}.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field{box-sizing:border-box;display:block;flex:1;padding:3px;position:relative}.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field>.title{color:#a9a9a9;cursor:pointer;font-size:12px;padding-top:2px;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field input{border:1px solid #cbcbcb;border-radius:2px;box-sizing:border-box;color:#333;font-size:11px;height:21px;padding:3px;text-align:center;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;width:100%}.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field input[type=number]{-webkit-appearance:none;-moz-appearance:none;appearance:none}.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field input[type=number]::-webkit-inner-spin-button,.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field.hsl-l input[type=number],.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field.hsl-s input[type=number]{padding-left:1px;padding-right:10px}.codemirror-colorpicker .colorpicker-body .information>.information-item>.input-field .postfix{box-sizing:border-box;display:inline-block;font-size:11px;height:21px;line-height:2;padding:2px;position:absolute;right:3px;text-align:center;top:2px}.codemirror-colorpicker .colorpicker-body .information>.information-change{bottom:0;box-sizing:border-box;display:block;padding-top:5px;position:absolute;right:0;text-align:center;top:0;width:40px}.codemirror-colorpicker .colorpicker-body .information>.information-change>.format-change-button{background:transparent;border:0;box-sizing:border-box;cursor:pointer;outline:none}.codemirror-colorpicker .colorpicker-body .information>.title{color:#a3a3a3}.codemirror-colorpicker .colorpicker-body .information>.input{color:#333}.codemirror-colorpicker .colorpicker-body .colorsets{border-top:1px solid #e2e2e2}.codemirror-colorpicker .colorpicker-body .colorsets>.menu{float:right;padding:10px 15px 10px 5px}.codemirror-colorpicker .colorpicker-body .colorsets>.menu button{border:0;cursor:pointer;font-family:serif,sans-serif;font-size:14px;font-weight:300;outline:none}.codemirror-colorpicker .colorpicker-body .colorsets>.color-list{box-sizing:border-box;display:block;line-height:0;margin-right:30px;padding:12px 0 0 12px}.codemirror-colorpicker .colorpicker-body .colorsets>.color-list .color-item{background-size:contain;border-radius:2px;box-sizing:border-box;cursor:pointer;display:inline-block;height:13px;margin-bottom:12px;margin-right:12px;overflow:hidden;position:relative;vertical-align:middle;width:13px}.codemirror-colorpicker .colorpicker-body .colorsets>.color-list .color-item:hover{transform:scale(1.2)}.codemirror-colorpicker .colorpicker-body .colorsets>.color-list .color-item .empty{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAJElEQVQYV2NctWrVfwYkEBYWxojMZ6SDAmT7QGx0K1EcRBsFAADeG/3M/HteAAAAAElFTkSuQmCC") repeat;height:100%;left:0;margin:0;padding:0;pointer-events:none;position:absolute;top:0;width:100%}.codemirror-colorpicker .colorpicker-body .colorsets>.color-list .color-item .color-view{border:1px solid rgba(0,0,0,.1);box-sizing:border-box;height:100%;left:0;margin:0;padding:0;pointer-events:none;position:absolute;top:0;width:100%}.codemirror-colorpicker .colorpicker-body .colorsets>.color-list .add-color-item{color:#8e8e8e;cursor:pointer;display:inline-block;font-family:serif,sans-serif;font-size:16px;font-weight:400;height:13px;line-height:1;margin-bottom:12px;margin-right:12px;text-align:center;vertical-align:middle;width:13px}.codemirror-colorpicker .colorpicker-body .color-chooser{background-color:rgba(0,0,0,.5);bottom:0;left:0;opacity:0;pointer-events:none;position:absolute;right:0;top:0;transition:opacity .05s ease-out}.codemirror-colorpicker .colorpicker-body .color-chooser.open{opacity:1;pointer-events:all}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container{background-color:#fff;bottom:0;left:0;position:absolute;right:0;top:120px}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-item-header{border-bottom:1px solid rgba(0,0,0,.2);box-sizing:border-box;display:flex;height:34px;left:0;padding:3px 0;position:absolute;right:0;top:0}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-item-header .title{box-sizing:border-box;color:#000;flex:2;font-size:15px;font-weight:700;margin:0;overflow:hidden;padding:5px 5px 5px 14px;text-align:left;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-item-header .items{cursor:pointer;display:block;flex:1;height:100%;line-height:2;padding-right:10px;text-align:right}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-list{bottom:0;left:0;overflow:auto;position:absolute;right:0;top:34px}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-list .colorsets-item{border-bottom:1px solid rgba(0,0,0,.1);cursor:pointer;display:flex;padding:3px 0}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-list .colorsets-item:hover{background-color:rgba(0,0,0,.05)}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-list .colorsets-item .title{box-sizing:border-box;color:#000;flex:2;font-size:14px;font-size:13px;font-weight:400;margin:0;overflow:hidden;padding:5px 5px 5px 14px;pointer-events:none;text-align:left;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-list .colorsets-item .items{cursor:pointer;display:block;flex:3;height:100%;line-height:1.6;pointer-events:none}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-list .colorsets-item .items .color-item{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAJElEQVQYV2NctWrVfwYkEBYWxojMZ6SDAmT7QGx0K1EcRBsFAADeG/3M/HteAAAAAElFTkSuQmCC") repeat;background-size:contain;border:1px solid #ddd;border-radius:3px;box-sizing:border-box;cursor:pointer;display:inline-block;height:13px;margin-right:10px;overflow:hidden;vertical-align:middle;width:13px}.codemirror-colorpicker .colorpicker-body .color-chooser .color-chooser-container .colorsets-list .colorsets-item .items .color-item .color-view{height:100%;margin:0;padding:0;pointer-events:none;width:100%}.codemirror-colorpicker.sketch{border-radius:5px}.codemirror-colorpicker.sketch>.colorpicker-body>.color{box-sizing:border-box;height:150px;margin:10px 10px 2px}.codemirror-colorpicker.sketch>.colorpicker-body>.control{padding:0}.codemirror-colorpicker.sketch>.colorpicker-body>.control.has-eyedropper{padding-left:30px}.codemirror-colorpicker.sketch>.colorpicker-body>.control.has-eyedropper .el-cp-color-control__left{top:4px}.codemirror-colorpicker.sketch>.colorpicker-body>.control>.color,.codemirror-colorpicker.sketch>.colorpicker-body>.control>.empty{border-radius:2px;box-sizing:border-box;height:26px;left:auto;position:absolute;right:10px;top:1px;width:26px}.codemirror-colorpicker.sketch>.colorpicker-body>.control>.color{box-shadow:inset 0 0 1px 0 rgba(0,0,0,.5)}.codemirror-colorpicker.sketch>.colorpicker-body>.control>.hue{margin:0 38px 0 0;padding:2px 2px 2px 10px;position:relative}.codemirror-colorpicker.sketch>.colorpicker-body>.control>.hue>.hue-container{border-radius:0}.codemirror-colorpicker.sketch>.colorpicker-body>.control>.opacity{margin:0 38px 0 0;padding:2px 2px 2px 10px;position:relative}.codemirror-colorpicker.sketch>.colorpicker-body>.control>.opacity>.opacity-container{border-radius:0}.codemirror-colorpicker.sketch>.colorpicker-body>.control .drag-bar,.codemirror-colorpicker.sketch>.colorpicker-body>.control .drag-bar2{border-radius:0;border-radius:1px;bottom:1px!important;height:50%;left:0;top:50%;transform:translateX(-50%) translateY(-50%);width:2px}.codemirror-colorpicker.sketch>.colorpicker-body>.control .drag-bar.first,.codemirror-colorpicker.sketch>.colorpicker-body>.control .drag-bar2.first{left:0;transform:translateX(50%) translateY(-50%)!important}.codemirror-colorpicker.sketch>.colorpicker-body>.control .drag-bar.last,.codemirror-colorpicker.sketch>.colorpicker-body>.control .drag-bar2.last{transform:translateX(-150%) translateY(-50%)!important}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-change{display:none}.codemirror-colorpicker.sketch>.colorpicker-body>.information.rgb .information-item.rgb{display:inherit}.codemirror-colorpicker.sketch>.colorpicker-body>.information.rgb .information-item.hsl{display:none!important}.codemirror-colorpicker.sketch>.colorpicker-body>.information.hex .information-item.hex{display:inherit}.codemirror-colorpicker.sketch>.colorpicker-body>.information.hex .information-item.hsl,.codemirror-colorpicker.sketch>.colorpicker-body>.information.hsl .information-item.rgb{display:none!important}.codemirror-colorpicker.sketch>.colorpicker-body>.information.hsl .information-item.hsl{display:inherit}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-item{display:inline-flex!important;margin-right:0}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-item>.input-field{padding-left:0}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-item>.input-field:last-child{padding-right:0}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-item>.input-field>.title{color:#000;cursor:pointer;font-size:11px}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-item>.input-field:last-child:not(:first-child){padding-right:0}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-item.hex{padding-left:5px;padding-right:0;width:74px}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-item.rgb{padding-left:0;padding-right:0;width:140px}.codemirror-colorpicker.sketch>.colorpicker-body>.information .information-item.hsl{display:none;padding-left:0;padding-right:0;width:140px}.codemirror-colorpicker.sketch>.colorpicker-body>.colorsets>.color-list{margin-right:0;padding-right:12px}.codemirror-colorpicker.sketch>.colorpicker-body>.colorsets>.color-list .color-item{border-radius:3px;height:16px;margin-bottom:10px;margin-right:9px;width:16px}.codemirror-colorpicker.palette{border-radius:3px;box-shadow:none}.codemirror-colorpicker.palette>.colorpicker-body>.color,.codemirror-colorpicker.palette>.colorpicker-body>.control,.codemirror-colorpicker.palette>.colorpicker-body>.information{display:none}.codemirror-colorpicker.palette>.colorpicker-body>.colorsets{border-top:0;box-sizing:border-box}.codemirror-colorpicker.palette>.colorpicker-body>.colorsets>.color-list .color-item{height:15px;margin-bottom:10px;margin-right:10px;width:15px}.codemirror-colorpicker.palette>.colorpicker-body>.color-chooser{box-sizing:border-box;display:none}.codemirror-colorpicker.palette>.colorpicker-body>.color-chooser.open{border:1px solid #d8d8d8;border-radius:3px;bottom:auto;box-shadow:0 0 10px 2px rgba(0,0,0,.12);display:block;left:-1px;right:-1px;top:-1px}.codemirror-colorpicker.palette>.colorpicker-body>.color-chooser.open .color-chooser-container{background-color:#fff;border-radius:2px;bottom:auto;box-sizing:border-box;left:auto;position:relative;right:auto;top:auto}.codemirror-colorpicker.palette>.colorpicker-body>.color-chooser.open .color-chooser-container .colorsets-item-header{border-top-left-radius:3px;border-top-right-radius:3px;bottom:auto;left:auto;position:relative;right:auto;top:auto}.codemirror-colorpicker.palette>.colorpicker-body>.color-chooser.open .color-chooser-container .colorsets-list{bottom:auto;left:auto;overflow:auto;position:relative;right:auto;top:auto}.codemirror-colorpicker.palette>.colorpicker-body>.color-chooser.open .color-chooser-container .colorsets-list .colorsets-item:last-child{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.codemirror-colorpicker.macos .colorpicker-body .wheel{box-sizing:border-box;height:224px;position:relative;width:224px}.codemirror-colorpicker.macos .colorpicker-body .wheel .wheel-canvas{border-radius:50%;height:214px;left:5px;position:absolute;top:5px;width:214px}.codemirror-colorpicker.macos .colorpicker-body .wheel .drag-pointer{border:1px solid #fff;border-radius:50%;display:inline-block;height:10px;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:10px;z-index:2}.codemirror-colorpicker.macos .control{padding-top:0}.codemirror-colorpicker.macos .control>.color,.codemirror-colorpicker.macos .control>.empty{top:4px}.codemirror-colorpicker.macos .control.has-eyedropper{padding-left:30px}.codemirror-colorpicker.macos .control.has-eyedropper .el-cp-color-control__left{top:9px}.codemirror-colorpicker.macos .value{box-sizing:border-box;cursor:pointer;margin:0 0 0 42px;padding:6px 16px;position:relative}.codemirror-colorpicker.macos .value>.value-container{background-image:linear-gradient(90deg,#000 0,hsla(0,0%,100%,0));border-radius:3px;box-sizing:border-box;height:10px;position:relative;width:100%}.codemirror-colorpicker.macos .value>.value-container .drag-bar{border-radius:50%;cursor:pointer;height:12px;left:0;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:12px}.codemirror-colorpicker.mini{display:inline-block;width:180px}.codemirror-colorpicker.mini .control{padding:0}.codemirror-colorpicker.mini .control .hue,.codemirror-colorpicker.mini .control .opacity{margin:0;padding:0}.codemirror-colorpicker.mini .control .hue>.hue-container,.codemirror-colorpicker.mini .control .opacity>.opacity-container{border-radius:0;height:20px;overflow:hidden}.codemirror-colorpicker.mini .control .drag-bar,.codemirror-colorpicker.mini .control .drag-bar2{background-color:transparent;border:0;box-shadow:none;box-sizing:border-box;height:100%;width:5px}.codemirror-colorpicker.mini .control .drag-bar.last:before,.codemirror-colorpicker.mini .control .drag-bar.lastafter,.codemirror-colorpicker.mini .control .drag-bar2.last:before,.codemirror-colorpicker.mini .control .drag-bar2.lastafter{left:1px}.codemirror-colorpicker.mini .control .drag-bar.first:after,.codemirror-colorpicker.mini .control .drag-bar.first:before,.codemirror-colorpicker.mini .control .drag-bar2.first:after,.codemirror-colorpicker.mini .control .drag-bar2.first:before{left:3px}.codemirror-colorpicker.mini .control .drag-bar2:before,.codemirror-colorpicker.mini .control .drag-bar:before{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #000;content:"";height:0;left:2px;position:absolute;top:0;transform:translateX(-50%);width:0}.codemirror-colorpicker.mini .control .drag-bar2:after,.codemirror-colorpicker.mini .control .drag-bar:after{border-bottom:4px solid #000;border-left:4px solid transparent;border-right:4px solid transparent;bottom:0;content:"";height:0;left:2px;position:absolute;transform:translateX(-50%);width:0}.codemirror-colorpicker.mini-vertical{display:inline-block;width:180px}.codemirror-colorpicker.mini-vertical .color{display:inline-block;height:160px;vertical-align:middle;width:140px}.codemirror-colorpicker.mini-vertical .control{display:inline-block;height:160px;padding:0;vertical-align:middle}.codemirror-colorpicker.mini-vertical .control .hue,.codemirror-colorpicker.mini-vertical .control .opacity{display:inline-block;height:100%;margin:0;padding:0;position:relative;vertical-align:middle;width:20px}.codemirror-colorpicker.mini-vertical .control .hue>.hue-container{background:linear-gradient(0deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);border-radius:0;height:100%;overflow:hidden}.codemirror-colorpicker.mini-vertical .control .opacity>.opacity-container{border-radius:0;height:100%;overflow:hidden;width:20px}.codemirror-colorpicker.mini-vertical .control .drag-bar,.codemirror-colorpicker.mini-vertical .control .drag-bar2{background-color:transparent;border:0;box-shadow:none;box-sizing:border-box;height:2px;transform:none;width:100%}.codemirror-colorpicker.mini-vertical .control .drag-bar.last:after,.codemirror-colorpicker.mini-vertical .control .drag-bar.last:before,.codemirror-colorpicker.mini-vertical .control .drag-bar2.last:after,.codemirror-colorpicker.mini-vertical .control .drag-bar2.last:before{top:2px}.codemirror-colorpicker.mini-vertical .control .drag-bar.first:after,.codemirror-colorpicker.mini-vertical .control .drag-bar.first:before,.codemirror-colorpicker.mini-vertical .control .drag-bar2.first:after,.codemirror-colorpicker.mini-vertical .control .drag-bar2.first:before{top:-1px}.codemirror-colorpicker.mini-vertical .control .drag-bar2:before,.codemirror-colorpicker.mini-vertical .control .drag-bar:before{border-bottom:4px solid transparent;border-left:4px solid #000;border-top:4px solid transparent;content:"";height:0;left:0;position:absolute;top:2px;transform:translateY(-50%);width:0}.codemirror-colorpicker.mini-vertical .control .drag-bar2:after,.codemirror-colorpicker.mini-vertical .control .drag-bar:after{border-bottom:4px solid transparent;border-right:4px solid #000;border-top:4px solid transparent;content:"";height:0;position:absolute;right:0;top:2px;transform:translateY(-50%);width:0}.codemirror-colorpicker.ring .colorpicker-body>.color{height:120px;left:52px;position:absolute;top:52px;width:120px}.codemirror-colorpicker.ring .colorpicker-body .wheel{box-sizing:border-box;height:224px;position:relative;width:224px}.codemirror-colorpicker.ring .colorpicker-body .wheel .wheel-canvas{border-radius:50%;height:214px;left:5px;position:absolute;top:5px;width:214px}.codemirror-colorpicker.ring .colorpicker-body .wheel .drag-pointer{border:1px solid #fff;border-radius:50%;display:inline-block;height:10px;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:10px;z-index:2}.codemirror-colorpicker.ring .control{padding-top:0}.codemirror-colorpicker.ring .control .value{display:none}.codemirror-colorpicker.ring .control>.color,.codemirror-colorpicker.ring .control>.empty{border-radius:2px;height:30px;top:-17px;width:30px}.codemirror-colorpicker.ring .control.has-eyedropper{padding-left:30px;padding-top:10px}.codemirror-colorpicker.ring .control.has-eyedropper>.color,.codemirror-colorpicker.ring .control.has-eyedropper>.empty{top:-2px}.codemirror-colorpicker.ring .control.has-eyedropper .el-cp-color-control__left{top:4px}.codemirror-colorpicker.xd{display:inline-block;padding-top:12px;width:245px}.codemirror-colorpicker.xd .color{border:1px solid #cecece;border-radius:3px;box-sizing:border-box;display:inline-block;height:170px;margin-bottom:12px;margin-left:12px;overflow:hidden;vertical-align:middle;width:170px}.codemirror-colorpicker.xd .color>.saturation>.value>.drag-pointer{border:2px solid #fff;box-shadow:0 0 1px 0 #000,inset 0 0 1px 0 #000;height:7px;width:7px}.codemirror-colorpicker.xd .control{display:inline-block;height:170px;margin-bottom:12px;margin-right:12px;padding:0;vertical-align:middle}.codemirror-colorpicker.xd .control .hue,.codemirror-colorpicker.xd .control .opacity{border-radius:3px;display:inline-block;height:100%;margin:0 0 0 8px;overflow:hidden;padding:0;position:relative;vertical-align:middle;width:13px}.codemirror-colorpicker.xd .control .hue>.hue-container{background:linear-gradient(0deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);border-radius:0;height:100%;overflow:hidden}.codemirror-colorpicker.xd .control .opacity>.opacity-container{border-radius:0;height:100%;overflow:hidden}.codemirror-colorpicker.xd .control .drag-bar,.codemirror-colorpicker.xd .control .drag-bar2{background-color:transparent;border:2px solid #fff;box-shadow:0 0 1px 0 #000,inset 0 0 1px 0 #000;box-sizing:border-box;height:10px;left:50%;overflow:hidden;transform:none;transform:translateX(-50%) translateY(-50%);width:10px}.codemirror-colorpicker.xd .information{margin-top:5px}.codemirror-colorpicker.vscode{background-color:#333;border:1px solid #ececec;box-sizing:border-box;width:336px}.codemirror-colorpicker.vscode,.codemirror-colorpicker.vscode .colorpicker-body{border-radius:0;display:inline-block}.codemirror-colorpicker.vscode .colorpicker-body .color-view{height:34px}.codemirror-colorpicker.vscode .colorpicker-body .color-view.has-eyedropper{display:flex}.codemirror-colorpicker.vscode .colorpicker-body .color-view.has-eyedropper .color-view-container{display:inline-block;width:254px}.codemirror-colorpicker.vscode .colorpicker-body .color-view.has-eyedropper .el-cp-color-control__left{float:right;padding:6px 0;text-align:center;width:80px}.codemirror-colorpicker.vscode .colorpicker-body .color-view.has-eyedropper .el-cp-color-control__left button{display:inline-block}.codemirror-colorpicker.vscode .colorpicker-body .color-view.has-eyedropper .el-cp-color-control__left button svg path{fill:#fff}.codemirror-colorpicker.vscode .colorpicker-body .color-view .color-view-container{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAJElEQVQYV2NctWrVfwYkEBYWxojMZ6SDAmT7QGx0K1EcRBsFAADeG/3M/HteAAAAAElFTkSuQmCC") repeat;cursor:pointer;font-size:14px;height:100%;line-height:34px;text-align:center;text-shadow:0 0 3px #535353;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:100%}.codemirror-colorpicker.vscode .colorpicker-body .color-view .color-view-container .preview{display:block;height:100%}.codemirror-colorpicker.vscode .colorpicker-body .color-tool{padding:8px}.codemirror-colorpicker.vscode .color{display:inline-block;height:160px;vertical-align:middle;width:240px}.codemirror-colorpicker.vscode .control{display:inline-block;height:160px;padding:0 0 0 4px;vertical-align:middle}.codemirror-colorpicker.vscode .control .hue,.codemirror-colorpicker.vscode .control .opacity{display:inline-block;height:100%;margin:0;padding:0;position:relative;vertical-align:middle;width:30px}.codemirror-colorpicker.vscode .control .hue{padding-left:5px;width:35px}.codemirror-colorpicker.vscode .control .hue>.hue-container{background:linear-gradient(0deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);border-radius:0;height:100%}.codemirror-colorpicker.vscode .control .opacity>.opacity-container{border-radius:0;height:100%;width:30px}.codemirror-colorpicker.vscode .control .drag-bar,.codemirror-colorpicker.vscode .control .drag-bar2{background-color:transparent;border:1px solid #fff;border-radius:0;box-shadow:none;box-shadow:0 0 2px 0 #000,inset 0 0 0 0 #000;box-sizing:border-box;height:5px;transform:translateY(-50%) translateX(-2px);width:33px}.codemirror-colorpicker.box{border-radius:10px;width:420px}.codemirror-colorpicker.box .colorpicker-body{-moz-column-gap:10px;column-gap:10px;display:grid;grid-template-columns:200px 1fr;grid-template-rows:auto;padding:10px 20px 10px 10px}.codemirror-colorpicker.box .colorpicker-body>.color{border-radius:8px;height:100%;overflow:hidden}.codemirror-colorpicker.box .control{padding:0!important}.codemirror-colorpicker.box .control>*{vertical-align:middle}.codemirror-colorpicker.box .control .color-info{display:inline-block;height:30px;position:relative;width:30px}.codemirror-colorpicker.box .control .color-info>.color,.codemirror-colorpicker.box .control .color-info>.empty{border-radius:50%;box-sizing:border-box;height:100%;position:absolute;width:100%}.codemirror-colorpicker.box .control .color-info>.color{border:1px solid rgba(0,0,0,.1)}.codemirror-colorpicker.box .control>.color,.codemirror-colorpicker.box .control>.empty{top:4px}.codemirror-colorpicker.box .control.has-eyedropper{padding-left:30px}.codemirror-colorpicker.box .control.has-eyedropper .el-cp-color-control__left{display:inline-block;height:30px;left:auto;position:relative;top:auto;width:30px}.codemirror-colorpicker.box .control .hue,.codemirror-colorpicker.box .control .opacity{margin-left:0!important;padding-left:0!important;padding-right:0!important}.codemirror-colorpicker.box .value{box-sizing:border-box;cursor:pointer;position:relative}.codemirror-colorpicker.box .value>.value-container{background-image:linear-gradient(90deg,#000 0,hsla(0,0%,100%,0));border-radius:3px;box-sizing:border-box;height:10px;position:relative;width:100%}.codemirror-colorpicker.box .value>.value-container .drag-bar{border-radius:50%;cursor:pointer;height:12px;left:0;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:12px}.codemirror-colorpicker.box .information{margin-top:6px}.codemirror-colorpicker.box .information .information-change{display:none}.codemirror-colorpicker.box .information>.information-item{margin:0!important;padding:0!important}.codemirror-colorpicker.box .colorsets{border:0;position:relative}.codemirror-colorpicker.box .colorsets .color-list{margin-right:0!important;padding:0!important}.codemirror-colorpicker.box .colorsets .color-list .current-color-sets .color-item{height:20px;margin-bottom:4px!important;margin-right:4px!important;width:20px}.codemirror-colorpicker.box .colorsets .menu{float:none;position:absolute;right:-20px;top:-15px}.codemirror-colorpicker.box .color-chooser .color-chooser-container{left:200px;top:0}.colorsets-contextmenu{background-color:#ececec;border:1px solid #ccc;border-radius:6px;display:none;font-size:13px;list-style:none;padding:4px 0;position:fixed}.colorsets-contextmenu.show{display:inline-block}.colorsets-contextmenu .menu-item{cursor:default;padding:2px 20px}.colorsets-contextmenu .menu-item:hover{background-color:#5ea3fb;color:#fff}.colorsets-contextmenu.small .menu-item.small-hide{display:none}.el-cp-color-eyedropper button{background:none;border:none;border-radius:var(--size-radius);box-sizing:border-box;cursor:pointer;display:block;font-size:0;height:30px;margin:-4px;outline:none;padding:0;transition:box-shadow var(--speed-focus) ease-out,opacity var(--speed-focus) ease-out;width:30px}.el-cp-color-eyedropper button:focus-visible{box-shadow:0 0 0 2px var(--color-key)}.el-cp-color-eyedropper button:active{opacity:.5}.el-cp-color-eyedropper svg{color:var(--color-fill);display:block;margin:0 auto}.CodeMirror{background-color:#fff;border:1px solid #dfdfdf;border-radius:3px;height:auto!important}.CodeMirror-code{outline:none}.CodeMirror-focused .cm-matchhighlight{color:#fff!important;outline:1px solid green}.CodeMirror-sizer:after,.CodeMirror-sizer:before{color:#bbb;display:block}.CodeMirror-sizer:before{content:"";padding-bottom:5px}.cm-s-rubyblue .CodeMirror-cursor{border-left:1px solid #fff!important}.CodeMirror-lint-marker-multiple,[class*=CodeMirror-lint-marker],[class*=CodeMirror-lint-message]{background-image:none}.CodeMirror-lint-marker-error,.CodeMirror-lint-marker-warning{cursor:help}.CodeMirror-lint-marker-multiple{position:absolute;top:0}[class*=CodeMirror-lint-marker]:before{font:normal 18px/1 dashicons;position:relative;top:-2px}[class*=CodeMirror-lint-message]:before{font:normal 16px/1 dashicons;left:16px;position:absolute}.CodeMirror-lint-message-error,.CodeMirror-lint-message-warning{box-shadow:0 1px 1px 0 rgba(0,0,0,.1);margin:5px 0 2px;padding:3px 12px 3px 28px}.CodeMirror-lint-message-warning{background-color:#fff8e5;border-left:4px solid #ffb900}.CodeMirror-lint-marker-warning:before,.CodeMirror-lint-message-warning:before{color:#f6a306;content:"\f534"}.CodeMirror-lint-message-error{background-color:#fbeaea;border-left:4px solid #dc3232}.CodeMirror-lint-marker-error:before,.CodeMirror-lint-message-error:before{color:#dc3232;content:"\f153"}.CodeMirror-lint-tooltip{background:none;border:none;border-radius:0;direction:ltr}.CodeMirror .CodeMirror-matchingbracket{background:rgba(255,150,0,.3);color:inherit}.CodeMirror .CodeMirror-linenumber{color:#666}.go-pro-button .badge,.nav-tab .badge,.snippet-type-badge{border:1px solid;border-radius:5px;font-size:10px;padding:1px 2px;text-transform:uppercase}.button .snippet-type-badge,.go-pro-button .badge,.nav-tab .badge,h1 .snippet-type-badge,h2 .snippet-type-badge,h3 .snippet-type-badge{margin-left:3px}.nav-tab span{vertical-align:middle}.nav-tab[data-type=php] .badge,.snippet-type-badge[data-type=php]{border-color:currentColor;color:#0073aa}.nav-tab[data-type=css] .badge,.snippet-type-badge[data-type=css]{border-color:currentColor;color:#8000ff}.nav-tab[data-type=js] .badge,.snippet-type-badge[data-type=js]{border-color:currentColor;color:#cd6600}.nav-tab[data-type=html] .badge,.snippet-type-badge[data-type=html]{border-color:currentColor;color:#548b54}.nav-tab .dashicons-external{color:#666;font-size:15px}.go-pro-button .badge{border-color:#ce0000;color:#ce0000}.form-table th{width:auto}h2{margin:25px 0 15px}h2:first-of-type{margin-top:20px}h2 label{cursor:auto}.active-snippet #title,.inactive-snippet #title{border-left-width:4px}.active-snippet #title{border-left-color:#46b450}.inactive-snippet #title{border-left-color:#bbb}.erroneous-snippet #title{border-left-color:#dc3232}#snippet-form{margin-top:10px}label[for=snippet_description] h3 div{position:absolute}.button+.button{margin-left:.5em}.submit-inline{float:right}.snippet-scope p,p.snippet-scope{margin-top:15px}.html-shortcode-options strong,.snippet-scope label{display:inline-block;margin-right:1.5em}.below-editor{display:flex;justify-content:space-between}.snippet-priority label{cursor:help;font-size:1.1em;font-weight:700;padding-right:.5em}.snippet-priority input{width:4em}.snippet-editor{position:relative}.editor-help-tooltip{background:transparent!important;cursor:help;display:inline-block;font-size:10px;padding:.3em .3em 0}.snippet-editor-help{position:absolute;right:5px;top:5px}.snippet-editor-help:hover .editor-help-text{opacity:1;visibility:visible}.editor-help-text{background-color:#555;border-radius:6px;color:#fff;font-size:small;margin-right:-10px;opacity:0;padding:5px;position:absolute;right:0;top:125%;transition:opacity .3s;visibility:hidden;white-space:nowrap;z-index:99}.editor-help-text:after{border:5px solid transparent;border-bottom-color:#555;bottom:100%;content:"";margin-right:10px;position:absolute;right:0}.editor-help-text td:first-child{padding-right:.5em}.editor-help-text .mac-key{display:none}.editor-help-text.platform-mac .mac-key{display:inline}.editor-help-text.platform-mac .pc-key{display:none}.CodeMirror{width:100%}.wrap h2.nav-tab-wrapper{border-bottom:none}.snippet-scope{display:none}.snippet-scope .description{display:block}.CodeMirror-sizer{box-sizing:border-box;min-height:300px!important;padding-bottom:1.5em!important}.CodeMirror-sizer:after{bottom:0;position:absolute}[data-snippet-type=php] .php-scopes-list{display:block}[data-snippet-type=php] .CodeMirror-sizer{padding-bottom:0!important}[data-snippet-type=php] .CodeMirror-sizer:before{content:"<?php"}[data-snippet-type=css] .css-scopes-list{display:block}[data-snippet-type=css] .CodeMirror-sizer:before{content:"<style>"}[data-snippet-type=css] .CodeMirror-sizer:after{content:"</style>"}[data-snippet-type=js] .js-scopes-list{display:block}[data-snippet-type=js] .CodeMirror-sizer:before{content:"<script>"}[data-snippet-type=js] .CodeMirror-sizer:after{content:"</script>"}[data-snippet-type=html] .html-scopes-list{display:block}[data-snippet-type=html] .CodeMirror-sizer:before{content:"<!-- begin content -->"}[data-snippet-type=html] .CodeMirror-sizer:after{content:"<!-- end content -->"}.tagger{border:0}.tagger ul{background-color:#fff;border:1px solid #dfdfdf;border-radius:3px}.tagger li:not(.tagger-new)>span,.tagger-new ul,.tagger>ul>li:not(.tagger-new)>a{background-color:#dee7f8;border:1px solid #cad8f3;border-radius:6px}.tagger li:not(.tagger-new)>span:hover,.tagger-new ul:hover,.tagger>ul>li:not(.tagger-new)>a:hover{background-color:#bbcef1;border-color:#6d95e0}.tagger-new ul a,.tagger-new ul a:visited,.tagger>ul>li:not(.tagger-new) a,.tagger>ul>li:not(.tagger-new) a:visited{color:#555;font-size:1.1em}
css/min/manage-rtl.css CHANGED
@@ -1,2 +1,2 @@
1
- .go-pro-button span,.nav-tab span,.snippet-type-badge{border:1px solid;border-radius:5px;font-size:10px;padding:1px 2px;text-transform:uppercase}.button .snippet-type-badge,.go-pro-button span h1 .snippet-type-badge,.nav-tab span,h2 .snippet-type-badge,h3 .snippet-type-badge{margin-right:3px}.nav-tab span{vertical-align:middle}.nav-tab[data-type=php] span,.snippet-type-badge[data-type=php]{border-color:currentColor;color:#0073aa}.nav-tab[data-type=css] span,.snippet-type-badge[data-type=css]{border-color:currentColor;color:#8000ff}.nav-tab[data-type=js] span,.snippet-type-badge[data-type=js]{border-color:currentColor;color:#cd6600}.nav-tab[data-type=html] span,.snippet-type-badge[data-type=html]{border-color:currentColor;color:#548b54}.go-pro-button span{border-color:#ce0000;color:#ce0000}.wp-core-ui .button.nav-tab-button{background:#dcdcde;border:1px solid #c3c4c7;color:#50575e;float:right;margin-right:.5em}.wp-core-ui .button.nav-tab-button:hover{background-color:#fff;color:#3c434a}.column-name .dashicons{font-size:16px;height:16px;vertical-align:middle;width:16px}.column-name .dashicons-clock{vertical-align:middle}.active-snippet .column-name>a{font-weight:600}.column-priority input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;box-shadow:none;color:#666;text-align:center;width:4em}.column-priority input:active,.column-priority input:focus,.column-priority input:hover{background-color:#f5f5f5;background-color:rgba(0,0,0,.1);border-radius:6px;color:#000}.column-priority input:disabled{color:inherit}.snippet-activation-switch,.snippet-execution-button{display:block;position:relative}.snippet-activation-switch{background-color:#ccc;border-radius:34px;height:17px;margin-top:5px;width:30px}.snippet-activation-switch:before{background-color:#fff;border-radius:50%;content:"";display:inline-block;height:13px;margin:2px;transition:all .4s;width:13px}.snippet-activation-switch:hover:before{transform:translateX(-40%)}.snippets .active-snippet .snippet-activation-switch{background-color:#2196f3}.snippets .active-snippet .snippet-activation-switch:before{transform:translateX(-100%)}.snippets .active-snippet .snippet-activation-switch:hover:before{transform:translateX(-60%)}.snippets .erroneous-snippet .snippet-activation-switch:before{color:#bbb;content:"!";font-weight:700;line-height:1;text-align:center;transform:translateX(-50%)}.snippet-execution-button{border-bottom:9px solid transparent;border-right:10px solid #ccc;border-top:9px solid transparent;height:0;margin-right:10px;margin-top:9px;transition:all .3s;width:0}.snippet-execution-button:before{border:1.8px solid #ccc;border-radius:50%;bottom:-14px;content:"";right:-21px;position:absolute;left:-8px;top:-14px;transition:all .3s;z-index:2}.snippet-execution-button:focus,.snippet-execution-button:hover{border-right-color:#579}.snippet-execution-button:focus:before,.snippet-execution-button:hover:before{border-color:#579;transform:scale(1.1)}.clear-filters{vertical-align:baseline!important}.snippets tr{background:#fff}.snippets ol,.snippets ul{margin:0 1.5em 1.5em 0}.snippets ul{list-style:disc}.snippets th.sortable a,.snippets th.sorted a{display:flex;flex-direction:row}.snippets .row-actions{color:#ddd;right:0;position:relative}.snippets .column-activate{padding-left:0!important}.snippets .clear-filters{vertical-align:middle}.snippets tfoot th.check-column{padding:13px 3px 0 0}.snippets .inactive-snippet th.check-column,.snippets tfoot th.check-column,.snippets thead th.check-column{padding-right:5px}.snippets td.column-description{max-width:700px}.snippets .active-snippet td,.snippets .active-snippet th,.snippets .inactive-snippet td,.snippets .inactive-snippet th{border:none;box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);padding:10px 9px}.snippets .badge{background-color:#e0e0e0;background-color:rgba(0,0,0,.08);border:none;border-radius:2px;font-size:smaller;line-height:1.2;margin-right:4px;padding:3px 6px;text-decoration:none}.rtl .snippets .badge{float:right}.snippets tr.active-snippet+tr.inactive-snippet td,.snippets tr.active-snippet+tr.inactive-snippet th{border-top:1px solid rgba(0,0,0,.03);box-shadow:inset 0 1px 0 rgba(0,0,0,.02),inset 0 -1px 0 #e1e1e1}.snippets #all-snippets-table a.delete:hover,.snippets #search-snippets-table a.delete:hover,.snippets a.delete:hover{border-bottom:1px solid red;color:red}#wpbody-content .snippets .column-name{white-space:nowrap}.inactive-snippet a{color:#579}.inactive-snippet a:active,.inactive-snippet a:focus,.inactive-snippet a:hover{color:#819db9}.active-snippet td,.active-snippet th{background-color:rgba(120,200,230,.06)}.active-snippet th.check-column{border-right:2px solid #2ea2cc}.active-snippet .snippet-activation-switch{background-color:#2196f3}.css-snippet a{color:#b452cd}.css-snippet a:active,.css-snippet a:focus,.css-snippet a:hover{color:#ce8dde}.css-snippet.active-snippet a{color:#7d26cd}.css-snippet.active-snippet a:active,.css-snippet.active-snippet a:focus,.css-snippet.active-snippet a:hover{color:#a25ee1}.css-snippet.active-snippet td,.css-snippet.active-snippet th{background-color:rgba(85,26,139,.06)}.css-snippet.active-snippet .snippet-activation-switch{background-color:#8000ff}.css-snippet.active-snippet th.check-column{border-right-color:#8000ff}.html-snippet a{color:#548b54}.html-snippet a:active,.html-snippet a:focus,.html-snippet a:hover{color:#7cb07c}.html-snippet.active-snippet a{color:#548b54}.html-snippet.active-snippet a:active,.html-snippet.active-snippet a:focus,.html-snippet.active-snippet a:hover{color:#7cb07c}.html-snippet.active-snippet td,.html-snippet.active-snippet th{background-color:rgba(84,139,84,.06)}.html-snippet.active-snippet .snippet-activation-switch{background-color:#548b54}.html-snippet.active-snippet th.check-column{border-right-color:#548b54}.js-snippet a{color:#cd6600}.js-snippet a:active,.js-snippet a:focus,.js-snippet a:hover{color:#ff8c1b}.js-snippet.active-snippet a{color:#d44500}.js-snippet.active-snippet a:active,.js-snippet.active-snippet a:focus,.js-snippet.active-snippet a:hover{color:#ff6a22}.js-snippet.active-snippet td,.js-snippet.active-snippet th{background-color:rgba(205,102,0,.06)}.js-snippet.active-snippet .snippet-activation-switch{background-color:#cd6600}.js-snippet.active-snippet th.check-column{border-right-color:#cd6600}@media screen and (max-width:782px){p.search-box{float:right;height:auto;margin:1em 0 0;position:static}}.wp-list-table .is-expanded td.column-activate.activate{display:table-cell!important}.nav-tab-wrapper+.subsubsub,p.search-box{margin:10px 0 0}.snippet-type-description{border-bottom:1px solid #ccc;margin:0;padding:1em 0}
2
 
1
+ .go-pro-button .badge,.nav-tab .badge,.snippet-type-badge{border:1px solid;border-radius:5px;font-size:10px;padding:1px 2px;text-transform:uppercase}.button .snippet-type-badge,.go-pro-button .badge,.nav-tab .badge,h1 .snippet-type-badge,h2 .snippet-type-badge,h3 .snippet-type-badge{margin-right:3px}.nav-tab span{vertical-align:middle}.nav-tab[data-type=php] .badge,.snippet-type-badge[data-type=php]{border-color:currentColor;color:#0073aa}.nav-tab[data-type=css] .badge,.snippet-type-badge[data-type=css]{border-color:currentColor;color:#8000ff}.nav-tab[data-type=js] .badge,.snippet-type-badge[data-type=js]{border-color:currentColor;color:#cd6600}.nav-tab[data-type=html] .badge,.snippet-type-badge[data-type=html]{border-color:currentColor;color:#548b54}.nav-tab .dashicons-external{color:#666;font-size:15px}.go-pro-button .badge{border-color:#ce0000;color:#ce0000}.wp-core-ui .button.nav-tab-button{background:#dcdcde;border:1px solid #c3c4c7;color:#50575e;float:right;margin-right:.5em}.wp-core-ui .button.nav-tab-button:hover{background-color:#fff;color:#3c434a}.column-name .dashicons{font-size:16px;height:16px;vertical-align:middle;width:16px}.column-name .dashicons-clock{vertical-align:middle}.active-snippet .column-name>a{font-weight:600}.column-priority input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;box-shadow:none;color:#666;text-align:center;width:4em}.column-priority input:active,.column-priority input:focus,.column-priority input:hover{background-color:#f5f5f5;background-color:rgba(0,0,0,.1);border-radius:6px;color:#000}.column-priority input:disabled{color:inherit}.snippet-activation-switch,.snippet-execution-button{display:block;position:relative}.snippet-activation-switch{background-color:#ccc;border-radius:34px;height:17px;margin-top:5px;width:30px}.snippet-activation-switch:before{background-color:#fff;border-radius:50%;content:"";display:inline-block;height:13px;margin:2px;transition:all .4s;width:13px}.snippet-activation-switch:hover:before{transform:translateX(-40%)}.snippets .active-snippet .snippet-activation-switch{background-color:#2196f3}.snippets .active-snippet .snippet-activation-switch:before{transform:translateX(-100%)}.snippets .active-snippet .snippet-activation-switch:hover:before{transform:translateX(-60%)}.snippets .erroneous-snippet .snippet-activation-switch:before{color:#bbb;content:"!";font-weight:700;line-height:1;text-align:center;transform:translateX(-50%)}.snippet-execution-button{border-bottom:9px solid transparent;border-right:10px solid #ccc;border-top:9px solid transparent;height:0;margin-right:10px;margin-top:9px;transition:all .3s;width:0}.snippet-execution-button:before{border:1.8px solid #ccc;border-radius:50%;bottom:-14px;content:"";right:-21px;position:absolute;left:-8px;top:-14px;transition:all .3s;z-index:2}.snippet-execution-button:focus,.snippet-execution-button:hover{border-right-color:#579}.snippet-execution-button:focus:before,.snippet-execution-button:hover:before{border-color:#579;transform:scale(1.1)}.clear-filters{vertical-align:baseline!important}.snippets tr{background:#fff}.snippets ol,.snippets ul{margin:0 1.5em 1.5em 0}.snippets ul{list-style:disc}.snippets th.sortable a,.snippets th.sorted a{display:flex;flex-direction:row}.snippets .row-actions{color:#ddd;right:0;position:relative}.snippets .column-activate{padding-left:0!important}.snippets .clear-filters{vertical-align:middle}.snippets tfoot th.check-column{padding:13px 3px 0 0}.snippets .inactive-snippet th.check-column,.snippets tfoot th.check-column,.snippets thead th.check-column{padding-right:5px}.snippets td.column-description{max-width:700px}.snippets .active-snippet td,.snippets .active-snippet th,.snippets .inactive-snippet td,.snippets .inactive-snippet th{border:none;box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);padding:10px 9px}.snippets .badge{background-color:#e0e0e0;background-color:rgba(0,0,0,.08);border:none;border-radius:2px;font-size:smaller;line-height:1.2;margin-right:4px;padding:3px 6px;text-decoration:none}.rtl .snippets .badge{float:right}.snippets tr.active-snippet+tr.inactive-snippet td,.snippets tr.active-snippet+tr.inactive-snippet th{border-top:1px solid rgba(0,0,0,.03);box-shadow:inset 0 1px 0 rgba(0,0,0,.02),inset 0 -1px 0 #e1e1e1}.snippets #all-snippets-table a.delete:hover,.snippets #search-snippets-table a.delete:hover,.snippets a.delete:hover{border-bottom:1px solid red;color:red}#wpbody-content .snippets .column-name{white-space:nowrap}.inactive-snippet a{color:#579}.inactive-snippet a:active,.inactive-snippet a:focus,.inactive-snippet a:hover{color:#819db9}.active-snippet td,.active-snippet th{background-color:rgba(120,200,230,.06)}.active-snippet th.check-column{border-right:2px solid #2ea2cc}.active-snippet .snippet-activation-switch{background-color:#2196f3}.css-snippet a{color:#b452cd}.css-snippet a:active,.css-snippet a:focus,.css-snippet a:hover{color:#ce8dde}.css-snippet.active-snippet a{color:#7d26cd}.css-snippet.active-snippet a:active,.css-snippet.active-snippet a:focus,.css-snippet.active-snippet a:hover{color:#a25ee1}.css-snippet.active-snippet td,.css-snippet.active-snippet th{background-color:rgba(85,26,139,.06)}.css-snippet.active-snippet .snippet-activation-switch{background-color:#8000ff}.css-snippet.active-snippet th.check-column{border-right-color:#8000ff}.html-snippet a{color:#548b54}.html-snippet a:active,.html-snippet a:focus,.html-snippet a:hover{color:#7cb07c}.html-snippet.active-snippet a{color:#548b54}.html-snippet.active-snippet a:active,.html-snippet.active-snippet a:focus,.html-snippet.active-snippet a:hover{color:#7cb07c}.html-snippet.active-snippet td,.html-snippet.active-snippet th{background-color:rgba(84,139,84,.06)}.html-snippet.active-snippet .snippet-activation-switch{background-color:#548b54}.html-snippet.active-snippet th.check-column{border-right-color:#548b54}.js-snippet a{color:#cd6600}.js-snippet a:active,.js-snippet a:focus,.js-snippet a:hover{color:#ff8c1b}.js-snippet.active-snippet a{color:#d44500}.js-snippet.active-snippet a:active,.js-snippet.active-snippet a:focus,.js-snippet.active-snippet a:hover{color:#ff6a22}.js-snippet.active-snippet td,.js-snippet.active-snippet th{background-color:rgba(205,102,0,.06)}.js-snippet.active-snippet .snippet-activation-switch{background-color:#cd6600}.js-snippet.active-snippet th.check-column{border-right-color:#cd6600}@media screen and (max-width:782px){p.search-box{float:right;height:auto;margin:1em 0 0;position:static}}.wp-list-table .is-expanded td.column-activate.activate{display:table-cell!important}.nav-tab-wrapper+.subsubsub,p.search-box{margin:10px 0 0}.snippet-type-description{border-bottom:1px solid #ccc;margin:0;padding:1em 0}
2
 
css/min/manage.css CHANGED
@@ -1 +1 @@
1
- .go-pro-button span,.nav-tab span,.snippet-type-badge{border:1px solid;border-radius:5px;font-size:10px;padding:1px 2px;text-transform:uppercase}.button .snippet-type-badge,.go-pro-button span h1 .snippet-type-badge,.nav-tab span,h2 .snippet-type-badge,h3 .snippet-type-badge{margin-left:3px}.nav-tab span{vertical-align:middle}.nav-tab[data-type=php] span,.snippet-type-badge[data-type=php]{border-color:currentColor;color:#0073aa}.nav-tab[data-type=css] span,.snippet-type-badge[data-type=css]{border-color:currentColor;color:#8000ff}.nav-tab[data-type=js] span,.snippet-type-badge[data-type=js]{border-color:currentColor;color:#cd6600}.nav-tab[data-type=html] span,.snippet-type-badge[data-type=html]{border-color:currentColor;color:#548b54}.go-pro-button span{border-color:#ce0000;color:#ce0000}.wp-core-ui .button.nav-tab-button{background:#dcdcde;border:1px solid #c3c4c7;color:#50575e;float:left;margin-left:.5em}.wp-core-ui .button.nav-tab-button:hover{background-color:#fff;color:#3c434a}.column-name .dashicons{font-size:16px;height:16px;vertical-align:middle;width:16px}.column-name .dashicons-clock{vertical-align:middle}.active-snippet .column-name>a{font-weight:600}.column-priority input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;box-shadow:none;color:#666;text-align:center;width:4em}.column-priority input:active,.column-priority input:focus,.column-priority input:hover{background-color:#f5f5f5;background-color:rgba(0,0,0,.1);border-radius:6px;color:#000}.column-priority input:disabled{color:inherit}.snippet-activation-switch,.snippet-execution-button{display:block;position:relative}.snippet-activation-switch{background-color:#ccc;border-radius:34px;height:17px;margin-top:5px;width:30px}.snippet-activation-switch:before{background-color:#fff;border-radius:50%;content:"";display:inline-block;height:13px;margin:2px;transition:all .4s;width:13px}.snippet-activation-switch:hover:before{transform:translateX(40%)}.snippets .active-snippet .snippet-activation-switch{background-color:#2196f3}.snippets .active-snippet .snippet-activation-switch:before{transform:translateX(100%)}.snippets .active-snippet .snippet-activation-switch:hover:before{transform:translateX(60%)}.snippets .erroneous-snippet .snippet-activation-switch:before{color:#bbb;content:"!";font-weight:700;line-height:1;text-align:center;transform:translateX(50%)}.snippet-execution-button{border-bottom:9px solid transparent;border-left:10px solid #ccc;border-top:9px solid transparent;height:0;margin-left:10px;margin-top:9px;transition:all .3s;width:0}.snippet-execution-button:before{border:1.8px solid #ccc;border-radius:50%;bottom:-14px;content:"";left:-21px;position:absolute;right:-8px;top:-14px;transition:all .3s;z-index:2}.snippet-execution-button:focus,.snippet-execution-button:hover{border-left-color:#579}.snippet-execution-button:focus:before,.snippet-execution-button:hover:before{border-color:#579;transform:scale(1.1)}.clear-filters{vertical-align:baseline!important}.snippets tr{background:#fff}.snippets ol,.snippets ul{margin:0 0 1.5em 1.5em}.snippets ul{list-style:disc}.snippets th.sortable a,.snippets th.sorted a{display:flex;flex-direction:row}.snippets .row-actions{color:#ddd;left:0;position:relative}.snippets .column-activate{padding-right:0!important}.snippets .clear-filters{vertical-align:middle}.snippets tfoot th.check-column{padding:13px 0 0 3px}.snippets .inactive-snippet th.check-column,.snippets tfoot th.check-column,.snippets thead th.check-column{padding-left:5px}.snippets td.column-description{max-width:700px}.snippets .active-snippet td,.snippets .active-snippet th,.snippets .inactive-snippet td,.snippets .inactive-snippet th{border:none;box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);padding:10px 9px}.snippets .badge{background-color:#e0e0e0;background-color:rgba(0,0,0,.08);border:none;border-radius:2px;font-size:smaller;line-height:1.2;margin-left:4px;padding:3px 6px;text-decoration:none}.rtl .snippets .badge{float:left}.snippets tr.active-snippet+tr.inactive-snippet td,.snippets tr.active-snippet+tr.inactive-snippet th{border-top:1px solid rgba(0,0,0,.03);box-shadow:inset 0 1px 0 rgba(0,0,0,.02),inset 0 -1px 0 #e1e1e1}.snippets #all-snippets-table a.delete:hover,.snippets #search-snippets-table a.delete:hover,.snippets a.delete:hover{border-bottom:1px solid red;color:red}#wpbody-content .snippets .column-name{white-space:nowrap}.inactive-snippet a{color:#579}.inactive-snippet a:active,.inactive-snippet a:focus,.inactive-snippet a:hover{color:#819db9}.active-snippet td,.active-snippet th{background-color:rgba(120,200,230,.06)}.active-snippet th.check-column{border-left:2px solid #2ea2cc}.active-snippet .snippet-activation-switch{background-color:#2196f3}.css-snippet a{color:#b452cd}.css-snippet a:active,.css-snippet a:focus,.css-snippet a:hover{color:#ce8dde}.css-snippet.active-snippet a{color:#7d26cd}.css-snippet.active-snippet a:active,.css-snippet.active-snippet a:focus,.css-snippet.active-snippet a:hover{color:#a25ee1}.css-snippet.active-snippet td,.css-snippet.active-snippet th{background-color:rgba(85,26,139,.06)}.css-snippet.active-snippet .snippet-activation-switch{background-color:#8000ff}.css-snippet.active-snippet th.check-column{border-left-color:#8000ff}.html-snippet a{color:#548b54}.html-snippet a:active,.html-snippet a:focus,.html-snippet a:hover{color:#7cb07c}.html-snippet.active-snippet a{color:#548b54}.html-snippet.active-snippet a:active,.html-snippet.active-snippet a:focus,.html-snippet.active-snippet a:hover{color:#7cb07c}.html-snippet.active-snippet td,.html-snippet.active-snippet th{background-color:rgba(84,139,84,.06)}.html-snippet.active-snippet .snippet-activation-switch{background-color:#548b54}.html-snippet.active-snippet th.check-column{border-left-color:#548b54}.js-snippet a{color:#cd6600}.js-snippet a:active,.js-snippet a:focus,.js-snippet a:hover{color:#ff8c1b}.js-snippet.active-snippet a{color:#d44500}.js-snippet.active-snippet a:active,.js-snippet.active-snippet a:focus,.js-snippet.active-snippet a:hover{color:#ff6a22}.js-snippet.active-snippet td,.js-snippet.active-snippet th{background-color:rgba(205,102,0,.06)}.js-snippet.active-snippet .snippet-activation-switch{background-color:#cd6600}.js-snippet.active-snippet th.check-column{border-left-color:#cd6600}@media screen and (max-width:782px){p.search-box{float:left;height:auto;margin:1em 0 0;position:static}}.wp-list-table .is-expanded td.column-activate.activate{display:table-cell!important}.nav-tab-wrapper+.subsubsub,p.search-box{margin:10px 0 0}.snippet-type-description{border-bottom:1px solid #ccc;margin:0;padding:1em 0}
1
+ .go-pro-button .badge,.nav-tab .badge,.snippet-type-badge{border:1px solid;border-radius:5px;font-size:10px;padding:1px 2px;text-transform:uppercase}.button .snippet-type-badge,.go-pro-button .badge,.nav-tab .badge,h1 .snippet-type-badge,h2 .snippet-type-badge,h3 .snippet-type-badge{margin-left:3px}.nav-tab span{vertical-align:middle}.nav-tab[data-type=php] .badge,.snippet-type-badge[data-type=php]{border-color:currentColor;color:#0073aa}.nav-tab[data-type=css] .badge,.snippet-type-badge[data-type=css]{border-color:currentColor;color:#8000ff}.nav-tab[data-type=js] .badge,.snippet-type-badge[data-type=js]{border-color:currentColor;color:#cd6600}.nav-tab[data-type=html] .badge,.snippet-type-badge[data-type=html]{border-color:currentColor;color:#548b54}.nav-tab .dashicons-external{color:#666;font-size:15px}.go-pro-button .badge{border-color:#ce0000;color:#ce0000}.wp-core-ui .button.nav-tab-button{background:#dcdcde;border:1px solid #c3c4c7;color:#50575e;float:left;margin-left:.5em}.wp-core-ui .button.nav-tab-button:hover{background-color:#fff;color:#3c434a}.column-name .dashicons{font-size:16px;height:16px;vertical-align:middle;width:16px}.column-name .dashicons-clock{vertical-align:middle}.active-snippet .column-name>a{font-weight:600}.column-priority input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;box-shadow:none;color:#666;text-align:center;width:4em}.column-priority input:active,.column-priority input:focus,.column-priority input:hover{background-color:#f5f5f5;background-color:rgba(0,0,0,.1);border-radius:6px;color:#000}.column-priority input:disabled{color:inherit}.snippet-activation-switch,.snippet-execution-button{display:block;position:relative}.snippet-activation-switch{background-color:#ccc;border-radius:34px;height:17px;margin-top:5px;width:30px}.snippet-activation-switch:before{background-color:#fff;border-radius:50%;content:"";display:inline-block;height:13px;margin:2px;transition:all .4s;width:13px}.snippet-activation-switch:hover:before{transform:translateX(40%)}.snippets .active-snippet .snippet-activation-switch{background-color:#2196f3}.snippets .active-snippet .snippet-activation-switch:before{transform:translateX(100%)}.snippets .active-snippet .snippet-activation-switch:hover:before{transform:translateX(60%)}.snippets .erroneous-snippet .snippet-activation-switch:before{color:#bbb;content:"!";font-weight:700;line-height:1;text-align:center;transform:translateX(50%)}.snippet-execution-button{border-bottom:9px solid transparent;border-left:10px solid #ccc;border-top:9px solid transparent;height:0;margin-left:10px;margin-top:9px;transition:all .3s;width:0}.snippet-execution-button:before{border:1.8px solid #ccc;border-radius:50%;bottom:-14px;content:"";left:-21px;position:absolute;right:-8px;top:-14px;transition:all .3s;z-index:2}.snippet-execution-button:focus,.snippet-execution-button:hover{border-left-color:#579}.snippet-execution-button:focus:before,.snippet-execution-button:hover:before{border-color:#579;transform:scale(1.1)}.clear-filters{vertical-align:baseline!important}.snippets tr{background:#fff}.snippets ol,.snippets ul{margin:0 0 1.5em 1.5em}.snippets ul{list-style:disc}.snippets th.sortable a,.snippets th.sorted a{display:flex;flex-direction:row}.snippets .row-actions{color:#ddd;left:0;position:relative}.snippets .column-activate{padding-right:0!important}.snippets .clear-filters{vertical-align:middle}.snippets tfoot th.check-column{padding:13px 0 0 3px}.snippets .inactive-snippet th.check-column,.snippets tfoot th.check-column,.snippets thead th.check-column{padding-left:5px}.snippets td.column-description{max-width:700px}.snippets .active-snippet td,.snippets .active-snippet th,.snippets .inactive-snippet td,.snippets .inactive-snippet th{border:none;box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);padding:10px 9px}.snippets .badge{background-color:#e0e0e0;background-color:rgba(0,0,0,.08);border:none;border-radius:2px;font-size:smaller;line-height:1.2;margin-left:4px;padding:3px 6px;text-decoration:none}.rtl .snippets .badge{float:left}.snippets tr.active-snippet+tr.inactive-snippet td,.snippets tr.active-snippet+tr.inactive-snippet th{border-top:1px solid rgba(0,0,0,.03);box-shadow:inset 0 1px 0 rgba(0,0,0,.02),inset 0 -1px 0 #e1e1e1}.snippets #all-snippets-table a.delete:hover,.snippets #search-snippets-table a.delete:hover,.snippets a.delete:hover{border-bottom:1px solid red;color:red}#wpbody-content .snippets .column-name{white-space:nowrap}.inactive-snippet a{color:#579}.inactive-snippet a:active,.inactive-snippet a:focus,.inactive-snippet a:hover{color:#819db9}.active-snippet td,.active-snippet th{background-color:rgba(120,200,230,.06)}.active-snippet th.check-column{border-left:2px solid #2ea2cc}.active-snippet .snippet-activation-switch{background-color:#2196f3}.css-snippet a{color:#b452cd}.css-snippet a:active,.css-snippet a:focus,.css-snippet a:hover{color:#ce8dde}.css-snippet.active-snippet a{color:#7d26cd}.css-snippet.active-snippet a:active,.css-snippet.active-snippet a:focus,.css-snippet.active-snippet a:hover{color:#a25ee1}.css-snippet.active-snippet td,.css-snippet.active-snippet th{background-color:rgba(85,26,139,.06)}.css-snippet.active-snippet .snippet-activation-switch{background-color:#8000ff}.css-snippet.active-snippet th.check-column{border-left-color:#8000ff}.html-snippet a{color:#548b54}.html-snippet a:active,.html-snippet a:focus,.html-snippet a:hover{color:#7cb07c}.html-snippet.active-snippet a{color:#548b54}.html-snippet.active-snippet a:active,.html-snippet.active-snippet a:focus,.html-snippet.active-snippet a:hover{color:#7cb07c}.html-snippet.active-snippet td,.html-snippet.active-snippet th{background-color:rgba(84,139,84,.06)}.html-snippet.active-snippet .snippet-activation-switch{background-color:#548b54}.html-snippet.active-snippet th.check-column{border-left-color:#548b54}.js-snippet a{color:#cd6600}.js-snippet a:active,.js-snippet a:focus,.js-snippet a:hover{color:#ff8c1b}.js-snippet.active-snippet a{color:#d44500}.js-snippet.active-snippet a:active,.js-snippet.active-snippet a:focus,.js-snippet.active-snippet a:hover{color:#ff6a22}.js-snippet.active-snippet td,.js-snippet.active-snippet th{background-color:rgba(205,102,0,.06)}.js-snippet.active-snippet .snippet-activation-switch{background-color:#cd6600}.js-snippet.active-snippet th.check-column{border-left-color:#cd6600}@media screen and (max-width:782px){p.search-box{float:left;height:auto;margin:1em 0 0;position:static}}.wp-list-table .is-expanded td.column-activate.activate{display:table-cell!important}.nav-tab-wrapper+.subsubsub,p.search-box{margin:10px 0 0}.snippet-type-description{border-bottom:1px solid #ccc;margin:0;padding:1em 0}
languages/code-snippets.pot CHANGED
@@ -6,7 +6,7 @@ msgstr ""
6
  "MIME-Version: 1.0\n"
7
  "Content-Type: text/plain; charset=UTF-8\n"
8
  "Content-Transfer-Encoding: 8bit\n"
9
- "POT-Creation-Date: 2022-05-14 04:32+0000\n"
10
  "Report-Msgid-Bugs-To: https://github.com/sheabunge/code-snippets/issues\n"
11
  "X-Poedit-Basepath: ..\n"
12
  "X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
@@ -15,7 +15,7 @@ msgstr ""
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
 
18
- #: code-snippets.php:16, php/admin-menus/class-import-menu.php:117
19
  msgid "Code Snippets"
20
  msgstr ""
21
 
@@ -44,7 +44,7 @@ msgstr ""
44
  msgid "Please <a href=\"%s\">upgrade your server to the latest version of PHP</a> to continue using Code Snippets."
45
  msgstr ""
46
 
47
- #: php/class-admin.php:77, php/class-admin.php:151, php/admin-menus/class-manage-menu.php:27, php/admin-menus/class-manage-menu.php:56, php/admin-menus/class-manage-menu.php:98, php/views/manage.php:28
48
  msgid "Snippets"
49
  msgstr ""
50
 
@@ -56,7 +56,7 @@ msgstr ""
56
  msgid "Change plugin settings"
57
  msgstr ""
58
 
59
- #: php/class-admin.php:141, php/admin-menus/class-settings-menu.php:126
60
  msgid "Settings"
61
  msgstr ""
62
 
@@ -97,15 +97,15 @@ msgstr ""
97
  msgid "Active Snippets"
98
  msgstr ""
99
 
100
- #: php/class-admin.php:299
101
  msgid "<strong>Have feedback on Code Snippets?</strong> Please take the time to answer a short survey on how you use this plugin and what you'd like to see changed or added in the future."
102
  msgstr ""
103
 
104
- #: php/class-admin.php:306
105
  msgid "Take the survey now"
106
  msgstr ""
107
 
108
- #: php/class-admin.php:310
109
  msgid "Dismiss"
110
  msgstr ""
111
 
@@ -207,190 +207,190 @@ msgstr ""
207
  msgid "Snippets per page"
208
  msgstr ""
209
 
210
- #: php/class-list-table.php:220
211
  msgid "Edit"
212
  msgstr ""
213
 
214
- #: php/class-list-table.php:221, php/class-list-table.php:444
215
  msgid "Clone"
216
  msgstr ""
217
 
218
- #: php/class-list-table.php:222, php/class-list-table.php:446, php/admin-menus/class-edit-menu.php:748
219
  msgid "Export"
220
  msgstr ""
221
 
222
- #: php/class-list-table.php:231, php/class-list-table.php:447, php/admin-menus/class-edit-menu.php:749
223
  msgid "Delete"
224
  msgstr ""
225
 
226
- #: php/class-list-table.php:236
227
  msgid "You are about to permanently delete the selected item."
228
  msgstr ""
229
 
230
- #: php/class-list-table.php:237, php/admin-menus/class-edit-menu.php:778
231
  msgid "'Cancel' to stop, 'OK' to delete."
232
  msgstr ""
233
 
234
- #: php/class-list-table.php:214
235
  msgid "Network Only"
236
  msgstr ""
237
 
238
- #: php/class-list-table.php:212
239
  msgid "Network Active"
240
  msgstr ""
241
 
242
- #: php/class-list-table.php:267, php/class-list-table.php:443
243
  msgid "Network Deactivate"
244
  msgstr ""
245
 
246
- #: php/class-list-table.php:267, php/class-list-table.php:442
247
  msgid "Network Activate"
248
  msgstr ""
249
 
250
- #: php/class-list-table.php:268, php/class-list-table.php:443, php/admin-menus/class-edit-menu.php:494, php/admin-menus/class-manage-menu.php:151
251
  msgid "Deactivate"
252
  msgstr ""
253
 
254
- #: php/class-list-table.php:268, php/class-list-table.php:442, php/admin-menus/class-edit-menu.php:500, php/admin-menus/class-manage-menu.php:150
255
  msgid "Activate"
256
  msgstr ""
257
 
258
- #: php/class-list-table.php:262
259
  msgid "Run Once"
260
  msgstr ""
261
 
262
- #: php/class-list-table.php:313
263
  msgid "Shared on Network"
264
  msgstr ""
265
 
266
- #: php/class-list-table.php:388, php/views/edit.php:71
267
  msgid "Name"
268
  msgstr ""
269
 
270
- #: php/class-list-table.php:389
271
  msgid "Type"
272
  msgstr ""
273
 
274
- #: php/class-list-table.php:390, php/admin-menus/class-edit-menu.php:390
275
  msgid "Description"
276
  msgstr ""
277
 
278
- #: php/class-list-table.php:391, php/admin-menus/class-edit-menu.php:418
279
  msgid "Tags"
280
  msgstr ""
281
 
282
- #: php/class-list-table.php:392
283
  msgid "Modified"
284
  msgstr ""
285
 
286
- #: php/class-list-table.php:393, php/admin-menus/class-edit-menu.php:441, php/settings/settings-fields.php:77
287
  msgid "Priority"
288
  msgstr ""
289
 
290
- #: php/class-list-table.php:394
291
  msgid "ID"
292
  msgstr ""
293
 
294
- #: php/class-list-table.php:445, php/admin-menus/class-edit-menu.php:745
295
  msgid "Download"
296
  msgstr ""
297
 
298
  #. translators: %s: total number of snippets
299
- #: php/class-list-table.php:489
300
  msgid "All <span class=\"count\">(%s)</span>"
301
  msgid_plural "All <span class=\"count\">(%s)</span>"
302
  msgstr[0] ""
303
  msgstr[1] ""
304
 
305
  #. translators: %s: total number of active snippets
306
- #: php/class-list-table.php:497
307
  msgid "Active <span class=\"count\">(%s)</span>"
308
  msgid_plural "Active <span class=\"count\">(%s)</span>"
309
  msgstr[0] ""
310
  msgstr[1] ""
311
 
312
  #. translators: %s: total number of inactive snippets
313
- #: php/class-list-table.php:505
314
  msgid "Inactive <span class=\"count\">(%s)</span>"
315
  msgid_plural "Inactive <span class=\"count\">(%s)</span>"
316
  msgstr[0] ""
317
  msgstr[1] ""
318
 
319
  #. translators: %s: total number of recently activated snippets
320
- #: php/class-list-table.php:513
321
  msgid "Recently Active <span class=\"count\">(%s)</span>"
322
  msgid_plural "Recently Active <span class=\"count\">(%s)</span>"
323
  msgstr[0] ""
324
  msgstr[1] ""
325
 
326
- #: php/class-list-table.php:587
327
  msgid "Show all tags"
328
  msgstr ""
329
 
330
- #: php/class-list-table.php:602
331
  msgid "Filter"
332
  msgstr ""
333
 
334
- #: php/class-list-table.php:610
335
  msgid "Clear List"
336
  msgstr ""
337
 
338
- #: php/class-list-table.php:848
339
  msgid "It looks like you don't have any snippets of this type."
340
  msgstr ""
341
 
342
- #: php/class-list-table.php:846
343
  msgid "It looks like you don't have any snippets."
344
  msgstr ""
345
 
346
- #: php/class-list-table.php:855
347
  msgid "Perhaps you would like to add a new one?"
348
  msgstr ""
349
 
350
- #: php/class-list-table.php:840
351
  msgid "No snippets were found matching the current search query. Please enter a new query or use the \"Clear Filters\" button above."
352
  msgstr ""
353
 
354
- #: php/class-list-table.php:1218
355
  msgid "Search results"
356
  msgstr ""
357
 
358
  #. translators: %s: search query
359
- #: php/class-list-table.php:1233
360
  msgid " for &ldquo;%s&rdquo;"
361
  msgstr ""
362
 
363
- #: php/class-list-table.php:1226
364
  msgid " for &ldquo;%1$s&rdquo; on line %2$d"
365
  msgstr ""
366
 
367
  #. translators: %s: tag name
368
- #: php/class-list-table.php:1240
369
  msgid " in tag &ldquo;%s&rdquo;"
370
  msgstr ""
371
 
372
- #: php/class-list-table.php:1248
373
  msgid "Clear Filters"
374
  msgstr ""
375
 
376
  #. translators: %s: snippet title
377
- #: php/class-list-table.php:1287
378
  msgid "%s [CLONE]"
379
  msgstr ""
380
 
381
- #: php/class-plugin.php:299, php/class-snippet.php:373
382
  msgid "Functions"
383
  msgstr ""
384
 
385
- #: php/class-plugin.php:300, php/class-snippet.php:374, php/class-snippet.php:499
386
  msgid "Content"
387
  msgstr ""
388
 
389
- #: php/class-plugin.php:313
390
  msgid "Function snippets are run on your site as if there were in a plugin or theme functions.php file."
391
  msgstr ""
392
 
393
- #: php/class-plugin.php:314
394
  msgid "Content snippets are bits of reusable PHP and HTML content that can be inserted into posts and pages."
395
  msgstr ""
396
 
@@ -461,15 +461,15 @@ msgctxt "date and time format"
461
  msgid "%1$s \a\t %2$s"
462
  msgstr ""
463
 
464
- #: php/class-upgrade.php:173
465
  msgid "This is a sample snippet. Feel free to use it, edit it, or remove it."
466
  msgstr ""
467
 
468
- #: php/class-upgrade.php:178
469
  msgid "Make upload filenames lowercase"
470
  msgstr ""
471
 
472
- #: php/class-upgrade.php:180
473
  msgid "Makes sure that image and file uploads have lowercase filenames."
474
  msgstr ""
475
 
@@ -481,19 +481,19 @@ msgstr ""
481
  msgid "Turns off the WordPress admin bar for everyone except administrators."
482
  msgstr ""
483
 
484
- #: php/class-upgrade.php:193
485
  msgid "Allow smilies"
486
  msgstr ""
487
 
488
- #: php/class-upgrade.php:195
489
  msgid "Allows smiley conversion in obscure places."
490
  msgstr ""
491
 
492
- #: php/class-upgrade.php:200
493
  msgid "Current year"
494
  msgstr ""
495
 
496
- #: php/class-upgrade.php:202
497
  msgid "Shortcode for inserting the current year into a post or page.."
498
  msgstr ""
499
 
@@ -529,12 +529,12 @@ msgstr ""
529
  msgid "You are not authorized to access this page."
530
  msgstr ""
531
 
532
- #: php/admin-menus/class-admin-menu.php:213, php/admin-menus/class-settings-menu.php:130
533
  msgctxt "snippets"
534
  msgid "Manage"
535
  msgstr ""
536
 
537
- #: php/admin-menus/class-admin-menu.php:216, php/admin-menus/class-settings-menu.php:131, php/views/edit.php:38
538
  msgctxt "snippet"
539
  msgid "Add New"
540
  msgstr ""
@@ -563,128 +563,128 @@ msgctxt "menu label"
563
  msgid "Add New"
564
  msgstr ""
565
 
566
- #: php/admin-menus/class-edit-menu.php:55, php/views/edit.php:41
567
  msgid "Add New Snippet"
568
  msgstr ""
569
 
570
- #: php/admin-menus/class-edit-menu.php:224
571
  msgid "Don't Panic"
572
  msgstr ""
573
 
574
  #. translators: %d: line where error was produced
575
- #: php/admin-menus/class-edit-menu.php:226
576
  msgid "The code snippet you are trying to save produced a fatal error on line %d:"
577
  msgstr ""
578
 
579
- #: php/admin-menus/class-edit-menu.php:228
580
  msgid "The previous version of the snippet is unchanged, and the rest of this site should be functioning normally as before."
581
  msgstr ""
582
 
583
- #: php/admin-menus/class-edit-menu.php:229
584
  msgid "Please use the back button in your browser to return to the previous page and try to fix the code error."
585
  msgstr ""
586
 
587
- #: php/admin-menus/class-edit-menu.php:230
588
  msgid "If you prefer, you can close this page and discard the changes you just made. No changes will be made to this site."
589
  msgstr ""
590
 
591
- #: php/admin-menus/class-edit-menu.php:423
592
  msgid "Enter a list of tags; separated by commas"
593
  msgstr ""
594
 
595
- #: php/admin-menus/class-edit-menu.php:440
596
  msgid "Snippets with a lower priority number will run before those with a higher number."
597
  msgstr ""
598
 
599
- #: php/admin-menus/class-edit-menu.php:459
600
  msgid "Sharing Settings"
601
  msgstr ""
602
 
603
- #: php/admin-menus/class-edit-menu.php:463
604
  msgid "Allow this snippet to be activated on individual sites on the network"
605
  msgstr ""
606
 
607
- #: php/admin-menus/class-edit-menu.php:478, php/admin-menus/class-edit-menu.php:722
608
  msgid "Save Changes"
609
  msgstr ""
610
 
611
- #: php/admin-menus/class-edit-menu.php:479
612
  msgid "Save Snippet"
613
  msgstr ""
614
 
615
- #: php/admin-menus/class-edit-menu.php:501
616
  msgid "Save Snippet and Activate"
617
  msgstr ""
618
 
619
- #: php/admin-menus/class-edit-menu.php:495
620
  msgid "Save Snippet and Deactivate"
621
  msgstr ""
622
 
623
- #: php/admin-menus/class-edit-menu.php:486
624
  msgid "Execute Once"
625
  msgstr ""
626
 
627
- #: php/admin-menus/class-edit-menu.php:487
628
  msgid "Save Snippet and Execute Once"
629
  msgstr ""
630
 
631
- #: php/admin-menus/class-edit-menu.php:522
632
  msgid "Code Direction"
633
  msgstr ""
634
 
635
- #: php/admin-menus/class-edit-menu.php:525
636
  msgid "LTR"
637
  msgstr ""
638
 
639
- #: php/admin-menus/class-edit-menu.php:526
640
  msgid "RTL"
641
  msgstr ""
642
 
643
- #: php/admin-menus/class-edit-menu.php:600
644
  msgid "The snippet has been deactivated due to an error in the code."
645
  msgstr ""
646
 
647
- #: php/admin-menus/class-edit-menu.php:590
648
  msgid "The snippet has been deactivated due to an error on line %d:"
649
  msgstr ""
650
 
651
- #: php/admin-menus/class-edit-menu.php:609
652
  msgid "An error occurred when saving the snippet."
653
  msgstr ""
654
 
655
- #: php/admin-menus/class-edit-menu.php:615
656
  msgid "Snippet <strong>added</strong>."
657
  msgstr ""
658
 
659
- #: php/admin-menus/class-edit-menu.php:616
660
  msgid "Snippet <strong>updated</strong>."
661
  msgstr ""
662
 
663
- #: php/admin-menus/class-edit-menu.php:617
664
  msgid "Snippet <strong>added</strong> and <strong>activated</strong>."
665
  msgstr ""
666
 
667
- #: php/admin-menus/class-edit-menu.php:618
668
  msgid "Snippet <strong>added</strong> and <strong>executed</strong>."
669
  msgstr ""
670
 
671
- #: php/admin-menus/class-edit-menu.php:619
672
  msgid "Snippet <strong>updated</strong> and <strong>activated</strong>."
673
  msgstr ""
674
 
675
- #: php/admin-menus/class-edit-menu.php:620
676
  msgid "Snippet <strong>updated</strong> and <strong>deactivated</strong>."
677
  msgstr ""
678
 
679
- #: php/admin-menus/class-edit-menu.php:657
680
  msgid "This snippet has no code or title. Continue?"
681
  msgstr ""
682
 
683
- #: php/admin-menus/class-edit-menu.php:658
684
  msgid "This snippet has no title. Continue?"
685
  msgstr ""
686
 
687
- #: php/admin-menus/class-edit-menu.php:659
688
  msgid "This snippet has no snippet code. Continue?"
689
  msgstr ""
690
 
@@ -749,111 +749,111 @@ msgctxt "keyboard key"
749
  msgid "S"
750
  msgstr ""
751
 
752
- #: php/admin-menus/class-import-menu.php:18
753
  msgctxt "menu label"
754
  msgid "Import"
755
  msgstr ""
756
 
757
- #: php/admin-menus/class-import-menu.php:19, php/views/import.php:25
758
  msgid "Import Snippets"
759
  msgstr ""
760
 
761
- #: php/admin-menus/class-import-menu.php:118
762
  msgid "Import snippets from a code snippets export file"
763
  msgstr ""
764
 
765
- #: php/admin-menus/class-import-menu.php:130
766
  msgid "An error occurred when processing the import files."
767
  msgstr ""
768
 
769
  #. translators: 1: amount of snippets imported, 2: link to Snippets menu
770
- #: php/admin-menus/class-import-menu.php:144
771
  msgid "Successfully imported <strong>%1$d</strong> snippet. <a href=\"%2$s\">Have fun!</a>"
772
  msgid_plural "Successfully imported <strong>%1$d</strong> snippets. <a href=\"%2$s\">Have fun!</a>"
773
  msgstr[0] ""
774
  msgstr[1] ""
775
 
776
- #: php/admin-menus/class-import-menu.php:140
777
  msgid "No snippets were imported."
778
  msgstr ""
779
 
780
- #: php/admin-menus/class-manage-menu.php:26
781
  msgctxt "menu label"
782
  msgid "All Snippets"
783
  msgstr ""
784
 
785
- #: php/admin-menus/class-manage-menu.php:57
786
  msgctxt "top-level menu label"
787
  msgid "Snippets"
788
  msgstr ""
789
 
790
- #: php/admin-menus/class-manage-menu.php:99
791
  msgctxt "tools submenu label"
792
  msgid "Snippets"
793
  msgstr ""
794
 
795
- #: php/admin-menus/class-manage-menu.php:152
796
  msgid "An error occurred when attempting to activate"
797
  msgstr ""
798
 
799
- #: php/admin-menus/class-manage-menu.php:165
800
  msgid "<strong>Warning:</strong> Safe mode is active and snippets will not execute! Remove the <code>CODE_SNIPPETS_SAFE_MODE</code> constant from <code>wp-config.php</code> to turn off safe mode. <a href=\"https://help.codesnippets.pro/article/12-safe-mode\" target=\"_blank\">Help</a>"
801
  msgstr ""
802
 
803
- #: php/admin-menus/class-manage-menu.php:171
804
  msgid "Snippet <strong>executed</strong>."
805
  msgstr ""
806
 
807
- #: php/admin-menus/class-manage-menu.php:172
808
  msgid "Snippet <strong>activated</strong>."
809
  msgstr ""
810
 
811
- #: php/admin-menus/class-manage-menu.php:173
812
  msgid "Selected snippets <strong>activated</strong>."
813
  msgstr ""
814
 
815
- #: php/admin-menus/class-manage-menu.php:174
816
  msgid "Snippet <strong>deactivated</strong>."
817
  msgstr ""
818
 
819
- #: php/admin-menus/class-manage-menu.php:175
820
  msgid "Selected snippets <strong>deactivated</strong>."
821
  msgstr ""
822
 
823
- #: php/admin-menus/class-manage-menu.php:176
824
  msgid "Snippet <strong>deleted</strong>."
825
  msgstr ""
826
 
827
- #: php/admin-menus/class-manage-menu.php:177
828
  msgid "Selected snippets <strong>deleted</strong>."
829
  msgstr ""
830
 
831
- #: php/admin-menus/class-manage-menu.php:178
832
  msgid "Snippet <strong>cloned</strong>."
833
  msgstr ""
834
 
835
- #: php/admin-menus/class-manage-menu.php:179
836
  msgid "Selected snippets <strong>cloned</strong>."
837
  msgstr ""
838
 
839
- #: php/admin-menus/class-settings-menu.php:24
840
  msgctxt "menu label"
841
  msgid "Settings"
842
  msgstr ""
843
 
844
- #: php/admin-menus/class-settings-menu.php:25
845
  msgid "Snippets Settings"
846
  msgstr ""
847
 
848
- #: php/admin-menus/class-settings-menu.php:46
849
  msgid "All settings have been reset to their defaults."
850
  msgstr ""
851
 
852
- #: php/admin-menus/class-settings-menu.php:161
853
  msgid "Reset to Default"
854
  msgstr ""
855
 
856
- #: php/admin-menus/class-settings-menu.php:227, php/settings/settings.php:280
857
  msgid "Settings saved."
858
  msgstr ""
859
 
@@ -1059,27 +1059,27 @@ msgstr ""
1059
  msgid "Highlight the line that is currently being edited."
1060
  msgstr ""
1061
 
1062
- #: php/settings/settings.php:142
1063
  msgid "General"
1064
  msgstr ""
1065
 
1066
- #: php/settings/settings.php:143
1067
  msgid "Description Editor"
1068
  msgstr ""
1069
 
1070
- #: php/settings/settings.php:144
1071
  msgid "Code Editor"
1072
  msgstr ""
1073
 
1074
- #: php/settings/settings.php:196
1075
  msgid "Editor Preview"
1076
  msgstr ""
1077
 
1078
- #: php/views/edit.php:74
1079
  msgid "Enter title here"
1080
  msgstr ""
1081
 
1082
- #: php/views/edit.php:84
1083
  msgid "Code"
1084
  msgstr ""
1085
 
@@ -1137,32 +1137,32 @@ msgstr ""
1137
  msgid "All Snippets"
1138
  msgstr ""
1139
 
1140
- #: php/views/manage.php:57
1141
- msgid "Go <span>Pro</span>"
1142
  msgstr ""
1143
 
1144
- #: php/views/manage.php:67
1145
  msgid "function snippets"
1146
  msgstr ""
1147
 
1148
- #: php/views/manage.php:68
1149
  msgid "content snippets"
1150
  msgstr ""
1151
 
1152
- #: php/views/manage.php:69
1153
  msgid "style snippets"
1154
  msgstr ""
1155
 
1156
- #: php/views/manage.php:70
1157
  msgid "javascript snippets"
1158
  msgstr ""
1159
 
1160
  #. translators: %s: snippet type name
1161
- #: php/views/manage.php:74
1162
  msgid "Learn more about %s &rarr;"
1163
  msgstr ""
1164
 
1165
- #: php/views/manage.php:92
1166
  msgid "Search Snippets"
1167
  msgstr ""
1168
 
@@ -1215,19 +1215,19 @@ msgstr ""
1215
  msgid "After saving, you will be able to use the %s shortcode to insert your content into a post or page."
1216
  msgstr ""
1217
 
1218
- #: php/views/partials/edit-scopes.php:89
1219
  msgid "Shortcode Options: "
1220
  msgstr ""
1221
 
1222
- #: php/views/partials/edit-scopes.php:93
1223
  msgid "Evaluate PHP code"
1224
  msgstr ""
1225
 
1226
- #: php/views/partials/edit-scopes.php:97
1227
  msgid "Add paragraphs and formatting"
1228
  msgstr ""
1229
 
1230
- #: php/views/partials/edit-scopes.php:101
1231
  msgid "Evaluate additional shortcode tags"
1232
  msgstr ""
1233
 
6
  "MIME-Version: 1.0\n"
7
  "Content-Type: text/plain; charset=UTF-8\n"
8
  "Content-Transfer-Encoding: 8bit\n"
9
+ "POT-Creation-Date: 2022-05-17 06:49+0000\n"
10
  "Report-Msgid-Bugs-To: https://github.com/sheabunge/code-snippets/issues\n"
11
  "X-Poedit-Basepath: ..\n"
12
  "X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
 
18
+ #: code-snippets.php:16, php/admin-menus/class-import-menu.php:114
19
  msgid "Code Snippets"
20
  msgstr ""
21
 
44
  msgid "Please <a href=\"%s\">upgrade your server to the latest version of PHP</a> to continue using Code Snippets."
45
  msgstr ""
46
 
47
+ #: php/class-admin.php:77, php/class-admin.php:151, php/admin-menus/class-manage-menu.php:28, php/admin-menus/class-manage-menu.php:54, php/admin-menus/class-manage-menu.php:96, php/views/manage.php:28
48
  msgid "Snippets"
49
  msgstr ""
50
 
56
  msgid "Change plugin settings"
57
  msgstr ""
58
 
59
+ #: php/class-admin.php:141, php/admin-menus/class-settings-menu.php:127
60
  msgid "Settings"
61
  msgstr ""
62
 
97
  msgid "Active Snippets"
98
  msgstr ""
99
 
100
+ #: php/class-admin.php:300
101
  msgid "<strong>Have feedback on Code Snippets?</strong> Please take the time to answer a short survey on how you use this plugin and what you'd like to see changed or added in the future."
102
  msgstr ""
103
 
104
+ #: php/class-admin.php:307
105
  msgid "Take the survey now"
106
  msgstr ""
107
 
108
+ #: php/class-admin.php:311
109
  msgid "Dismiss"
110
  msgstr ""
111
 
207
  msgid "Snippets per page"
208
  msgstr ""
209
 
210
+ #: php/class-list-table.php:240
211
  msgid "Edit"
212
  msgstr ""
213
 
214
+ #: php/class-list-table.php:241, php/class-list-table.php:465
215
  msgid "Clone"
216
  msgstr ""
217
 
218
+ #: php/class-list-table.php:242, php/class-list-table.php:467, php/admin-menus/class-edit-menu.php:748
219
  msgid "Export"
220
  msgstr ""
221
 
222
+ #: php/class-list-table.php:251, php/class-list-table.php:468, php/admin-menus/class-edit-menu.php:749
223
  msgid "Delete"
224
  msgstr ""
225
 
226
+ #: php/class-list-table.php:256
227
  msgid "You are about to permanently delete the selected item."
228
  msgstr ""
229
 
230
+ #: php/class-list-table.php:257, php/admin-menus/class-edit-menu.php:778
231
  msgid "'Cancel' to stop, 'OK' to delete."
232
  msgstr ""
233
 
234
+ #: php/class-list-table.php:234
235
  msgid "Network Only"
236
  msgstr ""
237
 
238
+ #: php/class-list-table.php:232
239
  msgid "Network Active"
240
  msgstr ""
241
 
242
+ #: php/class-list-table.php:287, php/class-list-table.php:464
243
  msgid "Network Deactivate"
244
  msgstr ""
245
 
246
+ #: php/class-list-table.php:287, php/class-list-table.php:463
247
  msgid "Network Activate"
248
  msgstr ""
249
 
250
+ #: php/class-list-table.php:288, php/class-list-table.php:464, php/admin-menus/class-edit-menu.php:493, php/admin-menus/class-manage-menu.php:149
251
  msgid "Deactivate"
252
  msgstr ""
253
 
254
+ #: php/class-list-table.php:288, php/class-list-table.php:463, php/admin-menus/class-edit-menu.php:499, php/admin-menus/class-manage-menu.php:148
255
  msgid "Activate"
256
  msgstr ""
257
 
258
+ #: php/class-list-table.php:282
259
  msgid "Run Once"
260
  msgstr ""
261
 
262
+ #: php/class-list-table.php:333
263
  msgid "Shared on Network"
264
  msgstr ""
265
 
266
+ #: php/class-list-table.php:409, php/views/edit.php:72
267
  msgid "Name"
268
  msgstr ""
269
 
270
+ #: php/class-list-table.php:410
271
  msgid "Type"
272
  msgstr ""
273
 
274
+ #: php/class-list-table.php:411, php/admin-menus/class-edit-menu.php:388
275
  msgid "Description"
276
  msgstr ""
277
 
278
+ #: php/class-list-table.php:412, php/admin-menus/class-edit-menu.php:417
279
  msgid "Tags"
280
  msgstr ""
281
 
282
+ #: php/class-list-table.php:413
283
  msgid "Modified"
284
  msgstr ""
285
 
286
+ #: php/class-list-table.php:414, php/admin-menus/class-edit-menu.php:440, php/settings/settings-fields.php:77
287
  msgid "Priority"
288
  msgstr ""
289
 
290
+ #: php/class-list-table.php:415
291
  msgid "ID"
292
  msgstr ""
293
 
294
+ #: php/class-list-table.php:466, php/admin-menus/class-edit-menu.php:745
295
  msgid "Download"
296
  msgstr ""
297
 
298
  #. translators: %s: total number of snippets
299
+ #: php/class-list-table.php:510
300
  msgid "All <span class=\"count\">(%s)</span>"
301
  msgid_plural "All <span class=\"count\">(%s)</span>"
302
  msgstr[0] ""
303
  msgstr[1] ""
304
 
305
  #. translators: %s: total number of active snippets
306
+ #: php/class-list-table.php:518
307
  msgid "Active <span class=\"count\">(%s)</span>"
308
  msgid_plural "Active <span class=\"count\">(%s)</span>"
309
  msgstr[0] ""
310
  msgstr[1] ""
311
 
312
  #. translators: %s: total number of inactive snippets
313
+ #: php/class-list-table.php:526
314
  msgid "Inactive <span class=\"count\">(%s)</span>"
315
  msgid_plural "Inactive <span class=\"count\">(%s)</span>"
316
  msgstr[0] ""
317
  msgstr[1] ""
318
 
319
  #. translators: %s: total number of recently activated snippets
320
+ #: php/class-list-table.php:534
321
  msgid "Recently Active <span class=\"count\">(%s)</span>"
322
  msgid_plural "Recently Active <span class=\"count\">(%s)</span>"
323
  msgstr[0] ""
324
  msgstr[1] ""
325
 
326
+ #: php/class-list-table.php:609
327
  msgid "Show all tags"
328
  msgstr ""
329
 
330
+ #: php/class-list-table.php:624
331
  msgid "Filter"
332
  msgstr ""
333
 
334
+ #: php/class-list-table.php:632
335
  msgid "Clear List"
336
  msgstr ""
337
 
338
+ #: php/class-list-table.php:871
339
  msgid "It looks like you don't have any snippets of this type."
340
  msgstr ""
341
 
342
+ #: php/class-list-table.php:869
343
  msgid "It looks like you don't have any snippets."
344
  msgstr ""
345
 
346
+ #: php/class-list-table.php:878
347
  msgid "Perhaps you would like to add a new one?"
348
  msgstr ""
349
 
350
+ #: php/class-list-table.php:863
351
  msgid "No snippets were found matching the current search query. Please enter a new query or use the \"Clear Filters\" button above."
352
  msgstr ""
353
 
354
+ #: php/class-list-table.php:1227
355
  msgid "Search results"
356
  msgstr ""
357
 
358
  #. translators: %s: search query
359
+ #: php/class-list-table.php:1244
360
  msgid " for &ldquo;%s&rdquo;"
361
  msgstr ""
362
 
363
+ #: php/class-list-table.php:1235
364
  msgid " for &ldquo;%1$s&rdquo; on line %2$d"
365
  msgstr ""
366
 
367
  #. translators: %s: tag name
368
+ #: php/class-list-table.php:1251
369
  msgid " in tag &ldquo;%s&rdquo;"
370
  msgstr ""
371
 
372
+ #: php/class-list-table.php:1260
373
  msgid "Clear Filters"
374
  msgstr ""
375
 
376
  #. translators: %s: snippet title
377
+ #: php/class-list-table.php:1299
378
  msgid "%s [CLONE]"
379
  msgstr ""
380
 
381
+ #: php/class-plugin.php:301, php/class-snippet.php:373
382
  msgid "Functions"
383
  msgstr ""
384
 
385
+ #: php/class-plugin.php:302, php/class-snippet.php:374, php/class-snippet.php:499
386
  msgid "Content"
387
  msgstr ""
388
 
389
+ #: php/class-plugin.php:315
390
  msgid "Function snippets are run on your site as if there were in a plugin or theme functions.php file."
391
  msgstr ""
392
 
393
+ #: php/class-plugin.php:316
394
  msgid "Content snippets are bits of reusable PHP and HTML content that can be inserted into posts and pages."
395
  msgstr ""
396
 
461
  msgid "%1$s \a\t %2$s"
462
  msgstr ""
463
 
464
+ #: php/class-upgrade.php:175
465
  msgid "This is a sample snippet. Feel free to use it, edit it, or remove it."
466
  msgstr ""
467
 
468
+ #: php/class-upgrade.php:179
469
  msgid "Make upload filenames lowercase"
470
  msgstr ""
471
 
472
+ #: php/class-upgrade.php:181
473
  msgid "Makes sure that image and file uploads have lowercase filenames."
474
  msgstr ""
475
 
481
  msgid "Turns off the WordPress admin bar for everyone except administrators."
482
  msgstr ""
483
 
484
+ #: php/class-upgrade.php:192
485
  msgid "Allow smilies"
486
  msgstr ""
487
 
488
+ #: php/class-upgrade.php:194
489
  msgid "Allows smiley conversion in obscure places."
490
  msgstr ""
491
 
492
+ #: php/class-upgrade.php:198
493
  msgid "Current year"
494
  msgstr ""
495
 
496
+ #: php/class-upgrade.php:200
497
  msgid "Shortcode for inserting the current year into a post or page.."
498
  msgstr ""
499
 
529
  msgid "You are not authorized to access this page."
530
  msgstr ""
531
 
532
+ #: php/admin-menus/class-admin-menu.php:213, php/admin-menus/class-settings-menu.php:131
533
  msgctxt "snippets"
534
  msgid "Manage"
535
  msgstr ""
536
 
537
+ #: php/admin-menus/class-admin-menu.php:216, php/admin-menus/class-settings-menu.php:132, php/views/edit.php:39
538
  msgctxt "snippet"
539
  msgid "Add New"
540
  msgstr ""
563
  msgid "Add New"
564
  msgstr ""
565
 
566
+ #: php/admin-menus/class-edit-menu.php:55, php/views/edit.php:42
567
  msgid "Add New Snippet"
568
  msgstr ""
569
 
570
+ #: php/admin-menus/class-edit-menu.php:222
571
  msgid "Don't Panic"
572
  msgstr ""
573
 
574
  #. translators: %d: line where error was produced
575
+ #: php/admin-menus/class-edit-menu.php:224
576
  msgid "The code snippet you are trying to save produced a fatal error on line %d:"
577
  msgstr ""
578
 
579
+ #: php/admin-menus/class-edit-menu.php:226
580
  msgid "The previous version of the snippet is unchanged, and the rest of this site should be functioning normally as before."
581
  msgstr ""
582
 
583
+ #: php/admin-menus/class-edit-menu.php:227
584
  msgid "Please use the back button in your browser to return to the previous page and try to fix the code error."
585
  msgstr ""
586
 
587
+ #: php/admin-menus/class-edit-menu.php:228
588
  msgid "If you prefer, you can close this page and discard the changes you just made. No changes will be made to this site."
589
  msgstr ""
590
 
591
+ #: php/admin-menus/class-edit-menu.php:422
592
  msgid "Enter a list of tags; separated by commas"
593
  msgstr ""
594
 
595
+ #: php/admin-menus/class-edit-menu.php:439
596
  msgid "Snippets with a lower priority number will run before those with a higher number."
597
  msgstr ""
598
 
599
+ #: php/admin-menus/class-edit-menu.php:458
600
  msgid "Sharing Settings"
601
  msgstr ""
602
 
603
+ #: php/admin-menus/class-edit-menu.php:462
604
  msgid "Allow this snippet to be activated on individual sites on the network"
605
  msgstr ""
606
 
607
+ #: php/admin-menus/class-edit-menu.php:477, php/admin-menus/class-edit-menu.php:722
608
  msgid "Save Changes"
609
  msgstr ""
610
 
611
+ #: php/admin-menus/class-edit-menu.php:478
612
  msgid "Save Snippet"
613
  msgstr ""
614
 
615
+ #: php/admin-menus/class-edit-menu.php:500
616
  msgid "Save Snippet and Activate"
617
  msgstr ""
618
 
619
+ #: php/admin-menus/class-edit-menu.php:494
620
  msgid "Save Snippet and Deactivate"
621
  msgstr ""
622
 
623
+ #: php/admin-menus/class-edit-menu.php:485
624
  msgid "Execute Once"
625
  msgstr ""
626
 
627
+ #: php/admin-menus/class-edit-menu.php:486
628
  msgid "Save Snippet and Execute Once"
629
  msgstr ""
630
 
631
+ #: php/admin-menus/class-edit-menu.php:521
632
  msgid "Code Direction"
633
  msgstr ""
634
 
635
+ #: php/admin-menus/class-edit-menu.php:524
636
  msgid "LTR"
637
  msgstr ""
638
 
639
+ #: php/admin-menus/class-edit-menu.php:525
640
  msgid "RTL"
641
  msgstr ""
642
 
643
+ #: php/admin-menus/class-edit-menu.php:599
644
  msgid "The snippet has been deactivated due to an error in the code."
645
  msgstr ""
646
 
647
+ #: php/admin-menus/class-edit-menu.php:589
648
  msgid "The snippet has been deactivated due to an error on line %d:"
649
  msgstr ""
650
 
651
+ #: php/admin-menus/class-edit-menu.php:608
652
  msgid "An error occurred when saving the snippet."
653
  msgstr ""
654
 
655
+ #: php/admin-menus/class-edit-menu.php:614
656
  msgid "Snippet <strong>added</strong>."
657
  msgstr ""
658
 
659
+ #: php/admin-menus/class-edit-menu.php:615
660
  msgid "Snippet <strong>updated</strong>."
661
  msgstr ""
662
 
663
+ #: php/admin-menus/class-edit-menu.php:616
664
  msgid "Snippet <strong>added</strong> and <strong>activated</strong>."
665
  msgstr ""
666
 
667
+ #: php/admin-menus/class-edit-menu.php:617
668
  msgid "Snippet <strong>added</strong> and <strong>executed</strong>."
669
  msgstr ""
670
 
671
+ #: php/admin-menus/class-edit-menu.php:618
672
  msgid "Snippet <strong>updated</strong> and <strong>activated</strong>."
673
  msgstr ""
674
 
675
+ #: php/admin-menus/class-edit-menu.php:619
676
  msgid "Snippet <strong>updated</strong> and <strong>deactivated</strong>."
677
  msgstr ""
678
 
679
+ #: php/admin-menus/class-edit-menu.php:656
680
  msgid "This snippet has no code or title. Continue?"
681
  msgstr ""
682
 
683
+ #: php/admin-menus/class-edit-menu.php:657
684
  msgid "This snippet has no title. Continue?"
685
  msgstr ""
686
 
687
+ #: php/admin-menus/class-edit-menu.php:658
688
  msgid "This snippet has no snippet code. Continue?"
689
  msgstr ""
690
 
749
  msgid "S"
750
  msgstr ""
751
 
752
+ #: php/admin-menus/class-import-menu.php:19
753
  msgctxt "menu label"
754
  msgid "Import"
755
  msgstr ""
756
 
757
+ #: php/admin-menus/class-import-menu.php:20, php/views/import.php:25
758
  msgid "Import Snippets"
759
  msgstr ""
760
 
761
+ #: php/admin-menus/class-import-menu.php:115
762
  msgid "Import snippets from a code snippets export file"
763
  msgstr ""
764
 
765
+ #: php/admin-menus/class-import-menu.php:127
766
  msgid "An error occurred when processing the import files."
767
  msgstr ""
768
 
769
  #. translators: 1: amount of snippets imported, 2: link to Snippets menu
770
+ #: php/admin-menus/class-import-menu.php:141
771
  msgid "Successfully imported <strong>%1$d</strong> snippet. <a href=\"%2$s\">Have fun!</a>"
772
  msgid_plural "Successfully imported <strong>%1$d</strong> snippets. <a href=\"%2$s\">Have fun!</a>"
773
  msgstr[0] ""
774
  msgstr[1] ""
775
 
776
+ #: php/admin-menus/class-import-menu.php:137
777
  msgid "No snippets were imported."
778
  msgstr ""
779
 
780
+ #: php/admin-menus/class-manage-menu.php:27
781
  msgctxt "menu label"
782
  msgid "All Snippets"
783
  msgstr ""
784
 
785
+ #: php/admin-menus/class-manage-menu.php:55
786
  msgctxt "top-level menu label"
787
  msgid "Snippets"
788
  msgstr ""
789
 
790
+ #: php/admin-menus/class-manage-menu.php:97
791
  msgctxt "tools submenu label"
792
  msgid "Snippets"
793
  msgstr ""
794
 
795
+ #: php/admin-menus/class-manage-menu.php:150
796
  msgid "An error occurred when attempting to activate"
797
  msgstr ""
798
 
799
+ #: php/admin-menus/class-manage-menu.php:163
800
  msgid "<strong>Warning:</strong> Safe mode is active and snippets will not execute! Remove the <code>CODE_SNIPPETS_SAFE_MODE</code> constant from <code>wp-config.php</code> to turn off safe mode. <a href=\"https://help.codesnippets.pro/article/12-safe-mode\" target=\"_blank\">Help</a>"
801
  msgstr ""
802
 
803
+ #: php/admin-menus/class-manage-menu.php:169
804
  msgid "Snippet <strong>executed</strong>."
805
  msgstr ""
806
 
807
+ #: php/admin-menus/class-manage-menu.php:170
808
  msgid "Snippet <strong>activated</strong>."
809
  msgstr ""
810
 
811
+ #: php/admin-menus/class-manage-menu.php:171
812
  msgid "Selected snippets <strong>activated</strong>."
813
  msgstr ""
814
 
815
+ #: php/admin-menus/class-manage-menu.php:172
816
  msgid "Snippet <strong>deactivated</strong>."
817
  msgstr ""
818
 
819
+ #: php/admin-menus/class-manage-menu.php:173
820
  msgid "Selected snippets <strong>deactivated</strong>."
821
  msgstr ""
822
 
823
+ #: php/admin-menus/class-manage-menu.php:174
824
  msgid "Snippet <strong>deleted</strong>."
825
  msgstr ""
826
 
827
+ #: php/admin-menus/class-manage-menu.php:175
828
  msgid "Selected snippets <strong>deleted</strong>."
829
  msgstr ""
830
 
831
+ #: php/admin-menus/class-manage-menu.php:176
832
  msgid "Snippet <strong>cloned</strong>."
833
  msgstr ""
834
 
835
+ #: php/admin-menus/class-manage-menu.php:177
836
  msgid "Selected snippets <strong>cloned</strong>."
837
  msgstr ""
838
 
839
+ #: php/admin-menus/class-settings-menu.php:25
840
  msgctxt "menu label"
841
  msgid "Settings"
842
  msgstr ""
843
 
844
+ #: php/admin-menus/class-settings-menu.php:26
845
  msgid "Snippets Settings"
846
  msgstr ""
847
 
848
+ #: php/admin-menus/class-settings-menu.php:47
849
  msgid "All settings have been reset to their defaults."
850
  msgstr ""
851
 
852
+ #: php/admin-menus/class-settings-menu.php:162
853
  msgid "Reset to Default"
854
  msgstr ""
855
 
856
+ #: php/admin-menus/class-settings-menu.php:229, php/settings/settings.php:283
857
  msgid "Settings saved."
858
  msgstr ""
859
 
1059
  msgid "Highlight the line that is currently being edited."
1060
  msgstr ""
1061
 
1062
+ #: php/settings/settings.php:143
1063
  msgid "General"
1064
  msgstr ""
1065
 
1066
+ #: php/settings/settings.php:144
1067
  msgid "Description Editor"
1068
  msgstr ""
1069
 
1070
+ #: php/settings/settings.php:145
1071
  msgid "Code Editor"
1072
  msgstr ""
1073
 
1074
+ #: php/settings/settings.php:197
1075
  msgid "Editor Preview"
1076
  msgstr ""
1077
 
1078
+ #: php/views/edit.php:75
1079
  msgid "Enter title here"
1080
  msgstr ""
1081
 
1082
+ #: php/views/edit.php:86
1083
  msgid "Code"
1084
  msgstr ""
1085
 
1137
  msgid "All Snippets"
1138
  msgstr ""
1139
 
1140
+ #: php/views/manage.php:59
1141
+ msgid "Go <span class=\"badge\">Pro</span>"
1142
  msgstr ""
1143
 
1144
+ #: php/views/manage.php:70
1145
  msgid "function snippets"
1146
  msgstr ""
1147
 
1148
+ #: php/views/manage.php:71
1149
  msgid "content snippets"
1150
  msgstr ""
1151
 
1152
+ #: php/views/manage.php:72
1153
  msgid "style snippets"
1154
  msgstr ""
1155
 
1156
+ #: php/views/manage.php:73
1157
  msgid "javascript snippets"
1158
  msgstr ""
1159
 
1160
  #. translators: %s: snippet type name
1161
+ #: php/views/manage.php:77
1162
  msgid "Learn more about %s &rarr;"
1163
  msgstr ""
1164
 
1165
+ #: php/views/manage.php:95
1166
  msgid "Search Snippets"
1167
  msgstr ""
1168
 
1215
  msgid "After saving, you will be able to use the %s shortcode to insert your content into a post or page."
1216
  msgstr ""
1217
 
1218
+ #: php/views/partials/edit-scopes.php:90
1219
  msgid "Shortcode Options: "
1220
  msgstr ""
1221
 
1222
+ #: php/views/partials/edit-scopes.php:94
1223
  msgid "Evaluate PHP code"
1224
  msgstr ""
1225
 
1226
+ #: php/views/partials/edit-scopes.php:98
1227
  msgid "Add paragraphs and formatting"
1228
  msgstr ""
1229
 
1230
+ #: php/views/partials/edit-scopes.php:102
1231
  msgid "Evaluate additional shortcode tags"
1232
  msgstr ""
1233
 
license.txt CHANGED
@@ -1,6 +1,6 @@
1
  Code Snippets – WordPress Plugin
2
 
3
- Copyright 2012-2021 Shea Bunge
4
 
5
  This program is free software: you can redistribute it and/or modify
6
  it under the terms of the GNU General Public License as published by
1
  Code Snippets – WordPress Plugin
2
 
3
+ Copyright 2012-2022 Shea Bunge
4
 
5
  This program is free software: you can redistribute it and/or modify
6
  it under the terms of the GNU General Public License as published by
php/admin-menus/class-edit-menu.php CHANGED
@@ -62,7 +62,7 @@ class Edit_Menu extends Admin_Menu {
62
  public function load() {
63
  parent::load();
64
 
65
- // Retrieve the current snippet object
66
  $this->load_snippet_data();
67
 
68
  $screen = get_current_screen();
@@ -71,20 +71,20 @@ class Edit_Menu extends Admin_Menu {
71
  $edit_hook .= '-network';
72
  }
73
 
74
- // Disallow visiting the edit snippet page without a valid ID
75
- if ( $screen->base === $edit_hook && ( ! isset( $_REQUEST['id'] ) || 0 === $this->snippet->id ) ) {
76
- wp_redirect( code_snippets()->get_menu_url( 'add' ) );
77
  exit;
78
  }
79
 
80
- // Process any submitted actions
81
  $this->process_actions();
82
 
83
- // Load the contextual help tabs
84
  $contextual_help = new Contextual_Help( 'edit' );
85
  $contextual_help->load();
86
 
87
- // Register action hooks
88
  if ( get_setting( 'general', 'enable_description' ) ) {
89
  add_action( 'code_snippets_edit_snippet', array( $this, 'render_description_editor' ), 9 );
90
  }
@@ -153,7 +153,7 @@ class Edit_Menu extends Admin_Menu {
153
  /* Delete the snippet if the button was clicked */
154
  if ( isset( $_POST['delete_snippet'] ) ) {
155
  delete_snippet( $snippet_id );
156
- wp_redirect( add_query_arg( 'result', 'delete', code_snippets()->get_menu_url( 'manage' ) ) );
157
  exit;
158
  }
159
 
@@ -175,8 +175,6 @@ class Edit_Menu extends Admin_Menu {
175
  * Remove the sharing status from a network snippet
176
  *
177
  * @param int $snippet_id Snippet ID.
178
- *
179
- * @phpcs:disable WordPress.DB.DirectDatabaseQuery.NoCaching
180
  */
181
  private function unshare_network_snippet( $snippet_id ) {
182
  $shared_snippets = get_site_option( 'shared_network_snippets', array() );
@@ -190,21 +188,21 @@ class Edit_Menu extends Admin_Menu {
190
  update_site_option( 'shared_network_snippets', array_values( $shared_snippets ) );
191
 
192
  /* Deactivate on all sites */
193
- global $wpdb;
194
- $sites = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs" );
195
- if ( $sites ) {
196
- foreach ( $sites as $site ) {
197
- switch_to_blog( $site );
198
- $active_shared_snippets = get_option( 'active_shared_network_snippets' );
199
-
200
- if ( is_array( $active_shared_snippets ) ) {
201
- $active_shared_snippets = array_diff( $active_shared_snippets, array( $snippet_id ) );
202
- update_option( 'active_shared_network_snippets', $active_shared_snippets );
203
- }
204
  }
205
 
206
- restore_current_blog();
207
  }
 
 
208
  }
209
 
210
  /**
@@ -282,7 +280,7 @@ class Edit_Menu extends Admin_Menu {
282
  if ( isset( $_POST['save_snippet_execute'] ) ) {
283
  $snippet->active = 1;
284
  } elseif ( isset( $_POST['snippet_sharing'] ) && 'on' === $_POST['snippet_sharing'] ) {
285
- // Shared network snippets cannot be network-activated
286
  $snippet->active = 0;
287
  unset( $_POST['save_snippet_activate'], $_POST['save_snippet_deactivate'] );
288
  } elseif ( isset( $_POST['save_snippet_activate'] ) ) {
@@ -335,13 +333,13 @@ class Edit_Menu extends Admin_Menu {
335
  /* If the saved snippet ID is invalid, display an error message */
336
  if ( ! $snippet_id || $snippet_id < 1 ) {
337
  /* An error occurred */
338
- wp_redirect( add_query_arg( 'result', 'save-error', code_snippets()->get_menu_url( 'add' ) ) );
339
  exit;
340
  }
341
 
342
  /* Display message if a parse error occurred */
343
  if ( isset( $code_error ) && $code_error ) {
344
- wp_redirect(
345
  add_query_arg(
346
  array(
347
  'id' => $snippet_id,
@@ -374,7 +372,7 @@ class Edit_Menu extends Admin_Menu {
374
  code_snippets()->get_menu_url( 'edit' )
375
  );
376
 
377
- wp_redirect( esc_url_raw( $redirect_uri ) );
378
  exit;
379
  }
380
 
@@ -389,12 +387,13 @@ class Edit_Menu extends Admin_Menu {
389
 
390
  echo '<h2><label for="snippet_description">', esc_html__( 'Description', 'code-snippets' ), '</label></h2>';
391
 
392
- remove_editor_styles(); // stop custom theme styling interfering with the editor
393
 
394
  wp_editor(
395
  $snippet->desc,
396
  'description',
397
- apply_filters( 'code_snippets/admin/description_editor_settings',
 
398
  array(
399
  'textarea_name' => 'snippet_description',
400
  'textarea_rows' => $settings['rows'],
@@ -680,7 +679,8 @@ class Edit_Menu extends Admin_Menu {
680
  true
681
  );
682
 
683
- $options = apply_filters( 'code_snippets/tag_editor_options',
 
684
  array(
685
  'allow_spaces' => true,
686
  'available_tags' => get_all_snippet_tags(),
@@ -733,7 +733,7 @@ class Edit_Menu extends Admin_Menu {
733
  }
734
  }
735
 
736
- // Make the 'Save and Activate' button the default if the setting is enabled
737
  if ( ! $snippet->active && 'single-use' !== $snippet->scope &&
738
  get_setting( 'general', 'activate_by_default' ) ) {
739
  $actions = array_reverse( $actions );
62
  public function load() {
63
  parent::load();
64
 
65
+ // Retrieve the current snippet object.
66
  $this->load_snippet_data();
67
 
68
  $screen = get_current_screen();
71
  $edit_hook .= '-network';
72
  }
73
 
74
+ // Disallow visiting the edit snippet page without a valid ID.
75
+ if ( $screen->base === $edit_hook && ( empty( $_REQUEST['id'] ) || 0 === $this->snippet->id || null === $this->snippet->id ) ) {
76
+ wp_safe_redirect( code_snippets()->get_menu_url( 'add' ) );
77
  exit;
78
  }
79
 
80
+ // Process any submitted actions.
81
  $this->process_actions();
82
 
83
+ // Load the contextual help tabs.
84
  $contextual_help = new Contextual_Help( 'edit' );
85
  $contextual_help->load();
86
 
87
+ // Register action hooks.
88
  if ( get_setting( 'general', 'enable_description' ) ) {
89
  add_action( 'code_snippets_edit_snippet', array( $this, 'render_description_editor' ), 9 );
90
  }
153
  /* Delete the snippet if the button was clicked */
154
  if ( isset( $_POST['delete_snippet'] ) ) {
155
  delete_snippet( $snippet_id );
156
+ wp_safe_redirect( add_query_arg( 'result', 'delete', code_snippets()->get_menu_url( 'manage' ) ) );
157
  exit;
158
  }
159
 
175
  * Remove the sharing status from a network snippet
176
  *
177
  * @param int $snippet_id Snippet ID.
 
 
178
  */
179
  private function unshare_network_snippet( $snippet_id ) {
180
  $shared_snippets = get_site_option( 'shared_network_snippets', array() );
188
  update_site_option( 'shared_network_snippets', array_values( $shared_snippets ) );
189
 
190
  /* Deactivate on all sites */
191
+ $sites = get_sites( [ 'fields' => 'ids' ] );
192
+
193
+ foreach ( $sites as $site ) {
194
+ switch_to_blog( $site );
195
+ $active_shared_snippets = get_option( 'active_shared_network_snippets' );
196
+
197
+ if ( is_array( $active_shared_snippets ) ) {
198
+ $active_shared_snippets = array_diff( $active_shared_snippets, array( $snippet_id ) );
199
+ update_option( 'active_shared_network_snippets', $active_shared_snippets );
 
 
200
  }
201
 
202
+ clean_active_snippets_cache( code_snippets()->db->ms_table );
203
  }
204
+
205
+ restore_current_blog();
206
  }
207
 
208
  /**
280
  if ( isset( $_POST['save_snippet_execute'] ) ) {
281
  $snippet->active = 1;
282
  } elseif ( isset( $_POST['snippet_sharing'] ) && 'on' === $_POST['snippet_sharing'] ) {
283
+ // Shared network snippets cannot be network-activated.
284
  $snippet->active = 0;
285
  unset( $_POST['save_snippet_activate'], $_POST['save_snippet_deactivate'] );
286
  } elseif ( isset( $_POST['save_snippet_activate'] ) ) {
333
  /* If the saved snippet ID is invalid, display an error message */
334
  if ( ! $snippet_id || $snippet_id < 1 ) {
335
  /* An error occurred */
336
+ wp_safe_redirect( add_query_arg( 'result', 'save-error', code_snippets()->get_menu_url( 'add' ) ) );
337
  exit;
338
  }
339
 
340
  /* Display message if a parse error occurred */
341
  if ( isset( $code_error ) && $code_error ) {
342
+ wp_safe_redirect(
343
  add_query_arg(
344
  array(
345
  'id' => $snippet_id,
372
  code_snippets()->get_menu_url( 'edit' )
373
  );
374
 
375
+ wp_safe_redirect( esc_url_raw( $redirect_uri ) );
376
  exit;
377
  }
378
 
387
 
388
  echo '<h2><label for="snippet_description">', esc_html__( 'Description', 'code-snippets' ), '</label></h2>';
389
 
390
+ remove_editor_styles(); // Stop custom theme styling interfering with the editor.
391
 
392
  wp_editor(
393
  $snippet->desc,
394
  'description',
395
+ apply_filters(
396
+ 'code_snippets/admin/description_editor_settings',
397
  array(
398
  'textarea_name' => 'snippet_description',
399
  'textarea_rows' => $settings['rows'],
679
  true
680
  );
681
 
682
+ $options = apply_filters(
683
+ 'code_snippets/tag_editor_options',
684
  array(
685
  'allow_spaces' => true,
686
  'available_tags' => get_all_snippet_tags(),
733
  }
734
  }
735
 
736
+ // Make the 'Save and Activate' button the default if the setting is enabled.
737
  if ( ! $snippet->active && 'single-use' !== $snippet->scope &&
738
  get_setting( 'general', 'activate_by_default' ) ) {
739
  $actions = array_reverse( $actions );
php/admin-menus/class-import-menu.php CHANGED
@@ -14,7 +14,8 @@ class Import_Menu extends Admin_Menu {
14
  * Class constructor
15
  */
16
  public function __construct() {
17
- parent::__construct( 'import',
 
18
  _x( 'Import', 'menu label', 'code-snippets' ),
19
  __( 'Import Snippets', 'code-snippets' )
20
  );
@@ -43,10 +44,6 @@ class Import_Menu extends Admin_Menu {
43
 
44
  /**
45
  * Process the uploaded import files
46
- *
47
- * @uses import_snippets() to process the import file
48
- * @uses wp_redirect() to pass the import results to the page
49
- * @uses add_query_arg() to append the results to the current URI
50
  */
51
  private function process_import_files() {
52
 
@@ -97,7 +94,7 @@ class Import_Menu extends Admin_Menu {
97
 
98
  /* Send the amount of imported snippets to the page */
99
  $url = add_query_arg( $error ? array( 'error' => true ) : array( 'imported' => $count ) );
100
- wp_redirect( esc_url_raw( $url ) );
101
  exit;
102
  }
103
 
14
  * Class constructor
15
  */
16
  public function __construct() {
17
+ parent::__construct(
18
+ 'import',
19
  _x( 'Import', 'menu label', 'code-snippets' ),
20
  __( 'Import Snippets', 'code-snippets' )
21
  );
44
 
45
  /**
46
  * Process the uploaded import files
 
 
 
 
47
  */
48
  private function process_import_files() {
49
 
94
 
95
  /* Send the amount of imported snippets to the page */
96
  $url = add_query_arg( $error ? array( 'error' => true ) : array( 'imported' => $count ) );
97
+ wp_safe_redirect( esc_url_raw( $url ) );
98
  exit;
99
  }
100
 
php/admin-menus/class-manage-menu.php CHANGED
@@ -22,7 +22,8 @@ class Manage_Menu extends Admin_Menu {
22
  */
23
  public function __construct() {
24
 
25
- parent::__construct( 'manage',
 
26
  _x( 'All Snippets', 'menu label', 'code-snippets' ),
27
  __( 'Snippets', 'code-snippets' )
28
  );
@@ -45,24 +46,21 @@ class Manage_Menu extends Admin_Menu {
45
 
46
  /**
47
  * Register the top-level 'Snippets' menu and associated 'Manage' subpage
48
- *
49
- * @uses add_menu_page() to register a top-level menu
50
- * @uses add_submenu_page() to register a sub-menu
51
  */
52
  public function register() {
53
 
54
- /* Register the top-level menu */
55
  add_menu_page(
56
  __( 'Snippets', 'code-snippets' ),
57
  _x( 'Snippets', 'top-level menu label', 'code-snippets' ),
58
  code_snippets()->get_cap(),
59
  code_snippets()->get_menu_slug(),
60
  array( $this, 'render' ),
61
- 'div', // icon is added through CSS
62
  is_network_admin() ? 21 : 67
63
  );
64
 
65
- /* Register the sub-menu */
66
  parent::register();
67
  }
68
 
@@ -199,9 +197,29 @@ class Manage_Menu extends Admin_Menu {
199
  }
200
 
201
  /**
202
- * Handle AJAX requests
 
 
203
  *
204
- * @phpcs:disable WordPress.DB.DirectDatabaseQuery.NoCaching
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
205
  */
206
  public function ajax_callback() {
207
  check_ajax_referer( 'code_snippets_manage_ajax' );
@@ -232,15 +250,7 @@ class Manage_Menu extends Admin_Menu {
232
  );
233
  }
234
 
235
- global $wpdb;
236
-
237
- $wpdb->update(
238
- code_snippets()->db->get_table_name( $snippet->network ),
239
- array( 'priority' => $snippet->priority ),
240
- array( 'id' => $snippet->id ),
241
- array( '%d' ),
242
- array( '%d' )
243
- );
244
 
245
  } elseif ( 'active' === $field ) {
246
 
@@ -263,6 +273,7 @@ class Manage_Menu extends Admin_Menu {
263
  array_diff( $active_shared_snippets, array( $snippet->id ) );
264
 
265
  update_option( 'active_shared_network_snippets', $active_shared_snippets );
 
266
  }
267
  } else {
268
 
22
  */
23
  public function __construct() {
24
 
25
+ parent::__construct(
26
+ 'manage',
27
  _x( 'All Snippets', 'menu label', 'code-snippets' ),
28
  __( 'Snippets', 'code-snippets' )
29
  );
46
 
47
  /**
48
  * Register the top-level 'Snippets' menu and associated 'Manage' subpage
 
 
 
49
  */
50
  public function register() {
51
 
52
+ // Register the top-level menu.
53
  add_menu_page(
54
  __( 'Snippets', 'code-snippets' ),
55
  _x( 'Snippets', 'top-level menu label', 'code-snippets' ),
56
  code_snippets()->get_cap(),
57
  code_snippets()->get_menu_slug(),
58
  array( $this, 'render' ),
59
+ 'div', // Icon is added through CSS.
60
  is_network_admin() ? 21 : 67
61
  );
62
 
63
+ // Register the sub-menu.
64
  parent::register();
65
  }
66
 
197
  }
198
 
199
  /**
200
+ * Update the priority value for a snippet.
201
+ *
202
+ * @param Snippet $snippet Snippet to update.
203
  *
204
+ * @return void
205
+ */
206
+ private function update_snippet_priority( Snippet $snippet ) {
207
+ global $wpdb;
208
+ $table = code_snippets()->db->get_table_name( $snippet->network );
209
+
210
+ $wpdb->update(
211
+ $table,
212
+ array( 'priority' => $snippet->priority ),
213
+ array( 'id' => $snippet->id ),
214
+ array( '%d' ),
215
+ array( '%d' )
216
+ ); // db call ok.
217
+
218
+ clean_snippets_cache( $table );
219
+ }
220
+
221
+ /**
222
+ * Handle AJAX requests
223
  */
224
  public function ajax_callback() {
225
  check_ajax_referer( 'code_snippets_manage_ajax' );
250
  );
251
  }
252
 
253
+ $this->update_snippet_priority( $snippet );
 
 
 
 
 
 
 
 
254
 
255
  } elseif ( 'active' === $field ) {
256
 
273
  array_diff( $active_shared_snippets, array( $snippet->id ) );
274
 
275
  update_option( 'active_shared_network_snippets', $active_shared_snippets );
276
+ clean_active_snippets_cache( code_snippets()->db->ms_table );
277
  }
278
  } else {
279
 
php/admin-menus/class-settings-menu.php CHANGED
@@ -20,7 +20,8 @@ class Settings_Menu extends Admin_Menu {
20
  */
21
  public function __construct() {
22
 
23
- parent::__construct( 'settings',
 
24
  _x( 'Settings', 'menu label', 'code-snippets' ),
25
  __( 'Snippets Settings', 'code-snippets' )
26
  );
@@ -49,7 +50,7 @@ class Settings_Menu extends Admin_Menu {
49
 
50
  set_transient( 'settings_errors', get_settings_errors(), 30 );
51
 
52
- wp_redirect( esc_url_raw( add_query_arg( 'settings-updated', true, remove_query_arg( 'reset_settings' ) ) ) );
53
  exit;
54
  }
55
 
@@ -57,7 +58,7 @@ class Settings_Menu extends Admin_Menu {
57
  if ( Settings\are_settings_unified() ) {
58
  $this->update_network_options();
59
  } else {
60
- wp_redirect( code_snippets()->get_menu_url( 'settings', 'admin' ) );
61
  exit;
62
  }
63
  }
@@ -211,26 +212,27 @@ class Settings_Menu extends Admin_Menu {
211
  */
212
  public function update_network_options() {
213
 
214
- /* Ensure the settings have been saved */
215
  if ( empty( $_GET['update_site_option'] ) || empty( $_POST['code_snippets_settings'] ) ) {
216
  return;
217
  }
218
 
219
  check_admin_referer( 'code-snippets-options' );
220
 
221
- /* Retrieve the saved options and save them to the database */
222
  $value = map_deep( wp_unslash( $_POST['code_snippets_settings'] ), 'sanitize_key' );
223
  update_site_option( 'code_snippets_settings', $value );
 
224
 
225
- /* Add an updated notice */
226
  if ( ! count( get_settings_errors() ) ) {
227
  add_settings_error( 'general', 'settings_updated', __( 'Settings saved.', 'code-snippets' ), 'updated' );
228
  }
229
  set_transient( 'settings_errors', get_settings_errors(), 30 );
230
 
231
- /* Redirect back to the settings menu */
232
  $redirect = add_query_arg( 'settings-updated', 'true', remove_query_arg( 'update_site_option', wp_get_referer() ) );
233
- wp_redirect( esc_url_raw( $redirect ) );
234
  exit;
235
  }
236
 
20
  */
21
  public function __construct() {
22
 
23
+ parent::__construct(
24
+ 'settings',
25
  _x( 'Settings', 'menu label', 'code-snippets' ),
26
  __( 'Snippets Settings', 'code-snippets' )
27
  );
50
 
51
  set_transient( 'settings_errors', get_settings_errors(), 30 );
52
 
53
+ wp_safe_redirect( esc_url_raw( add_query_arg( 'settings-updated', true, remove_query_arg( 'reset_settings' ) ) ) );
54
  exit;
55
  }
56
 
58
  if ( Settings\are_settings_unified() ) {
59
  $this->update_network_options();
60
  } else {
61
+ wp_safe_redirect( code_snippets()->get_menu_url( 'settings', 'admin' ) );
62
  exit;
63
  }
64
  }
212
  */
213
  public function update_network_options() {
214
 
215
+ // Ensure the settings have been saved.
216
  if ( empty( $_GET['update_site_option'] ) || empty( $_POST['code_snippets_settings'] ) ) {
217
  return;
218
  }
219
 
220
  check_admin_referer( 'code-snippets-options' );
221
 
222
+ // Retrieve the saved options and save them to the database.
223
  $value = map_deep( wp_unslash( $_POST['code_snippets_settings'] ), 'sanitize_key' );
224
  update_site_option( 'code_snippets_settings', $value );
225
+ wp_cache_delete( Settings\CACHE_KEY );
226
 
227
+ // Add an updated notice.
228
  if ( ! count( get_settings_errors() ) ) {
229
  add_settings_error( 'general', 'settings_updated', __( 'Settings saved.', 'code-snippets' ), 'updated' );
230
  }
231
  set_transient( 'settings_errors', get_settings_errors(), 30 );
232
 
233
+ // Redirect back to the settings menu.
234
  $redirect = add_query_arg( 'settings-updated', 'true', remove_query_arg( 'update_site_option', wp_get_referer() ) );
235
+ wp_safe_redirect( esc_url_raw( $redirect ) );
236
  exit;
237
  }
238
 
php/class-active-snippets.php CHANGED
@@ -28,7 +28,7 @@ class Active_Snippets {
28
  */
29
  public function init() {
30
  $db = code_snippets()->db;
31
- $this->content_snippets = $db->fetch_active_snippets( [ 'head-content', 'footer-content' ], 'code, scope' );
32
 
33
  add_action( 'wp_head', [ $this, 'load_head_content' ] );
34
  add_action( 'wp_footer', [ $this, 'load_footer_content' ] );
28
  */
29
  public function init() {
30
  $db = code_snippets()->db;
31
+ $this->content_snippets = $db->fetch_active_snippets( [ 'head-content', 'footer-content' ] );
32
 
33
  add_action( 'wp_head', [ $this, 'load_head_content' ] );
34
  add_action( 'wp_footer', [ $this, 'load_footer_content' ] );
php/class-admin.php CHANGED
@@ -295,7 +295,8 @@ class Admin {
295
 
296
  <div class="updated code-snippets-survey-message">
297
  <p>
298
- <?php echo wp_kses(
 
299
  __( "<strong>Have feedback on Code Snippets?</strong> Please take the time to answer a short survey on how you use this plugin and what you'd like to see changed or added in the future.", 'code-snippets' ),
300
  array( 'strong' => array() )
301
  );
295
 
296
  <div class="updated code-snippets-survey-message">
297
  <p>
298
+ <?php
299
+ echo wp_kses(
300
  __( "<strong>Have feedback on Code Snippets?</strong> Please take the time to answer a short survey on how you use this plugin and what you'd like to see changed or added in the future.", 'code-snippets' ),
301
  array( 'strong' => array() )
302
  );
php/class-db.php CHANGED
@@ -66,7 +66,7 @@ class DB {
66
  *
67
  * @return bool Validated value of multisite parameter.
68
  */
69
- public function validate_network_param( $network ) {
70
 
71
  /* If multisite is not active, then the parameter should always be false */
72
  if ( ! is_multisite() ) {
@@ -109,12 +109,10 @@ class DB {
109
  * @param string $table_name Name of database table to check.
110
  *
111
  * @return bool Whether the database table exists.
112
- *
113
- * @phpcs:disable WordPress.DB.DirectDatabaseQuery.NoCaching
114
  */
115
  public static function table_exists( $table_name ) {
116
  global $wpdb;
117
- return $wpdb->get_var( sprintf( "SHOW TABLES LIKE '%s'", $table_name ) ) === $table_name;
118
  }
119
 
120
  /**
@@ -212,55 +210,88 @@ class DB {
212
  }
213
 
214
  /**
215
- * Generate the SQL for fetching active snippets from the database
 
 
 
 
216
  *
217
- * @param array|string $scopes List of scopes to retrieve in.
218
- * @param string $select_list List of table columns in SQL format.
219
  *
220
- * @return array List of SQL queries
221
  */
222
- public function fetch_active_snippets( $scopes, $select_list = 'id, code, scope' ) {
223
  global $wpdb;
224
- $db = code_snippets()->db;
225
 
226
- $queries = array();
 
227
 
228
- if ( ! is_array( $scopes ) ) {
229
- $scopes = array( $scopes );
230
  }
231
 
232
- $scopes_format = self::build_format_list( count( $scopes ) );
233
- $select = "SELECT $select_list FROM";
234
- $where = "WHERE scope IN ($scopes_format)";
235
- $order = 'ORDER BY priority ASC, id ASC';
236
-
237
- /* Fetch snippets from site table */
238
- if ( self::table_exists( $db->table ) ) {
239
- $queries[ $db->table ] = $wpdb->prepare( "$select $db->table $where AND active=1 $order", $scopes );
240
  }
241
 
242
- /* Fetch snippets from the network table */
243
- if ( is_multisite() && self::table_exists( $db->ms_table ) ) {
244
- $active_shared_ids = get_option( 'active_shared_network_snippets', array() );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
245
 
246
- /* If there are active shared snippets, include them in the query */
247
- if ( is_array( $active_shared_ids ) && count( $active_shared_ids ) ) {
248
- $ids_format = self::build_format_list( count( $active_shared_ids ), '%d' );
249
- $sql = "$select $db->ms_table $where AND (active=1 OR id IN ($ids_format)) $order";
250
 
251
- $queries[ $db->ms_table ] = $wpdb->prepare( $sql, array_merge( $scopes, $active_shared_ids ) );
 
 
 
 
 
 
 
 
252
 
253
- } else {
254
- $queries[ $db->ms_table ] = $wpdb->prepare( "$select $db->ms_table $where AND active=1 $order", $scopes );
255
- }
256
  }
257
 
258
- $active_snippets = array();
 
 
 
 
259
 
260
- foreach ( $queries as $table => $query ) {
261
- // phpcs:disable WordPress.DB.DirectDatabaseQuery.NoCaching
262
- $results = $wpdb->get_results( $query, 'ARRAY_A' );
263
- $active_snippets[ $table ] = is_array( $results ) ? $results : array();
 
 
 
 
 
 
 
 
 
264
  }
265
 
266
  return $active_snippets;
66
  *
67
  * @return bool Validated value of multisite parameter.
68
  */
69
+ public static function validate_network_param( $network ) {
70
 
71
  /* If multisite is not active, then the parameter should always be false */
72
  if ( ! is_multisite() ) {
109
  * @param string $table_name Name of database table to check.
110
  *
111
  * @return bool Whether the database table exists.
 
 
112
  */
113
  public static function table_exists( $table_name ) {
114
  global $wpdb;
115
+ return $wpdb->get_var( "SHOW TABLES LIKE '$table_name'" ) === $table_name; // cache pass, db call ok.
116
  }
117
 
118
  /**
210
  }
211
 
212
  /**
213
+ * Fetch a list of active snippets from a database table.
214
+ *
215
+ * @param string $table_name Name of table to fetch snippets from.
216
+ * @param array $scopes List of scopes to include in query.
217
+ * @param array $active_only Whether to only fetch active snippets from the table.
218
  *
219
+ * @return array|false List of active snippets, if any could be retrieved.
 
220
  *
221
+ * @phpcs:disable WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare
222
  */
223
+ private static function fetch_snippets_from_table( $table_name, array $scopes, $active_only = true ) {
224
  global $wpdb;
 
225
 
226
+ $cache_key = sprintf( 'active_snippets_%s_%s', sanitize_key( join( '_', $scopes ) ), $table_name );
227
+ $cached_snippets = wp_cache_get( $cache_key, CACHE_GROUP );
228
 
229
+ if ( is_array( $cached_snippets ) ) {
230
+ return $cached_snippets;
231
  }
232
 
233
+ if ( ! self::table_exists( $table_name ) ) {
234
+ return false;
 
 
 
 
 
 
235
  }
236
 
237
+ $scopes_format = self::build_format_list( count( $scopes ) );
238
+ $extra_where = $active_only ? 'AND active=1' : '';
239
+
240
+ $snippets = $wpdb->get_results(
241
+ $wpdb->prepare(
242
+ "
243
+ SELECT id, code, scope, active
244
+ FROM $table_name
245
+ WHERE scope IN ($scopes_format) $extra_where
246
+ ORDER BY priority, id",
247
+ $scopes
248
+ ),
249
+ 'ARRAY_A'
250
+ ); // db call ok.
251
+
252
+ // Cache the full list of snippets.
253
+ if ( is_array( $snippets ) ) {
254
+ wp_cache_set( $cache_key, $snippets, CACHE_GROUP );
255
+ return $snippets;
256
+ }
257
 
258
+ return false;
259
+ }
 
 
260
 
261
+ /**
262
+ * Generate the SQL for fetching active snippets from the database.
263
+ *
264
+ * @param array|string $scopes List of scopes to retrieve in.
265
+ *
266
+ * @return array List of active snippets, indexed by table.
267
+ */
268
+ public function fetch_active_snippets( $scopes ) {
269
+ $active_snippets = array();
270
 
271
+ // Ensure that the list of scopes is an array.
272
+ if ( ! is_array( $scopes ) ) {
273
+ $scopes = array( $scopes );
274
  }
275
 
276
+ // Fetch the active snippets for the current site, if there are any.
277
+ $snippets = $this->fetch_snippets_from_table( $this->table, $scopes );
278
+ if ( $snippets ) {
279
+ $active_snippets[ $this->table ] = $snippets;
280
+ }
281
 
282
+ // If multisite is enabled, fetch all snippets from the network table, and filter down to only active snippets.
283
+ if ( is_multisite() ) {
284
+ $active_shared_ids = (array) get_option( 'active_shared_network_snippets', array() );
285
+ $ms_snippets = $this->fetch_snippets_from_table( $this->ms_table, $scopes, false );
286
+
287
+ if ( $ms_snippets ) {
288
+ $active_snippets[ $this->ms_table ] = array_filter(
289
+ $ms_snippets,
290
+ function ( $snippet ) use ( $active_shared_ids ) {
291
+ return $snippet['active'] || in_array( intval( $snippet['id'] ), $active_shared_ids, true );
292
+ }
293
+ );
294
+ }
295
  }
296
 
297
  return $active_snippets;
php/class-export.php CHANGED
@@ -32,13 +32,9 @@ class Export {
32
  *
33
  * @param array|int $ids List of snippet IDs to export.
34
  * @param string $table_name Name of database table to fetch snippets from.
35
- *
36
- * @phpcs:disable WordPress.DB.DirectDatabaseQuery.NoCaching
37
  */
38
  private function fetch_snippets( $ids, $table_name ) {
39
- global $wpdb;
40
 
41
- /* Fetch the snippets from the database */
42
  if ( '' === $table_name ) {
43
  $table_name = code_snippets()->db->get_table_name();
44
  }
@@ -47,18 +43,7 @@ class Export {
47
  $ids = array( $ids );
48
  }
49
 
50
- if ( count( $ids ) ) {
51
- $sql = sprintf(
52
- 'SELECT * FROM %s WHERE id IN (%s)',
53
- $table_name,
54
- implode( ',', array_fill( 0, count( $ids ), '%d' ) )
55
- );
56
-
57
- $this->snippets_list = $wpdb->get_results( $wpdb->prepare( $sql, $ids ), ARRAY_A );
58
-
59
- } else {
60
- $this->snippets_list = array();
61
- }
62
  }
63
 
64
  /**
@@ -94,8 +79,6 @@ class Export {
94
  $snippets = array();
95
 
96
  foreach ( $this->snippets_list as $snippet ) {
97
- $snippet = new Snippet( $snippet );
98
-
99
  $fields = array( 'name', 'desc', 'tags', 'scope', 'code', 'priority' );
100
  $final_snippet = array();
101
 
32
  *
33
  * @param array|int $ids List of snippet IDs to export.
34
  * @param string $table_name Name of database table to fetch snippets from.
 
 
35
  */
36
  private function fetch_snippets( $ids, $table_name ) {
 
37
 
 
38
  if ( '' === $table_name ) {
39
  $table_name = code_snippets()->db->get_table_name();
40
  }
43
  $ids = array( $ids );
44
  }
45
 
46
+ $this->snippets_list = count( $ids ) ? get_snippets( $ids, $table_name ) : array();
 
 
 
 
 
 
 
 
 
 
 
47
  }
48
 
49
  /**
79
  $snippets = array();
80
 
81
  foreach ( $this->snippets_list as $snippet ) {
 
 
82
  $fields = array( 'name', 'desc', 'tags', 'scope', 'code', 'priority' );
83
  $final_snippet = array();
84
 
php/class-list-table.php CHANGED
@@ -93,7 +93,7 @@ class List_Table extends WP_List_Table {
93
  $_SERVER['REQUEST_URI'] = remove_query_arg( 'result' );
94
 
95
  /* Add filters to format the snippet description in the same way the post content is formatted */
96
- $filters = [ 'wptexturize', 'convert_smilies', 'convert_chars', 'wpautop', 'shortcode_unautop', 'capital_P_dangit', 'wp_kses_post' ];
97
  foreach ( $filters as $filter ) {
98
  add_filter( 'code_snippets/list_table/column_description', $filter );
99
  }
@@ -108,6 +108,26 @@ class List_Table extends WP_List_Table {
108
  );
109
  }
110
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
  /**
112
  * Set the 'id' column as hidden by default.
113
  *
@@ -155,7 +175,7 @@ class List_Table extends WP_List_Table {
155
  esc_html( $type )
156
  );
157
 
158
- case 'modified':
159
  return $item->modified ? $item->format_modified() : '&#8212;';
160
 
161
  default:
@@ -173,11 +193,11 @@ class List_Table extends WP_List_Table {
173
  */
174
  public function get_action_link( $action, $snippet ) {
175
 
176
- // redirect actions to the network dashboard for shared network snippets
177
  $local_actions = array( 'activate', 'activate-shared', 'run-once', 'run-once-shared' );
178
  $network_redirect = $snippet->shared_network && ! $this->is_network && ! in_array( $action, $local_actions, true );
179
 
180
- // edit links go to a different menu
181
  if ( 'edit' === $action ) {
182
  return code_snippets()->get_snippet_edit_url( $snippet->id, $network_redirect ? 'network' : 'self' );
183
  }
@@ -192,7 +212,7 @@ class List_Table extends WP_List_Table {
192
  add_query_arg( $query_args, code_snippets()->get_menu_url( 'manage', 'network' ) ) :
193
  add_query_arg( $query_args );
194
 
195
- // add a nonce to the URL for security purposes
196
  return wp_nonce_url( $url, 'code_snippets_manage_snippet_' . $snippet->id );
197
  }
198
 
@@ -207,7 +227,7 @@ class List_Table extends WP_List_Table {
207
  $actions = array();
208
 
209
  if ( ! $this->is_network && $snippet->network && ! $snippet->shared_network ) {
210
- // display special links if on a subsite and dealing with a network-active snippet
211
  if ( $snippet->active ) {
212
  $actions['network_active'] = esc_html__( 'Network Active', 'code-snippets' );
213
  } else {
@@ -215,7 +235,7 @@ class List_Table extends WP_List_Table {
215
  }
216
  } elseif ( ! $snippet->shared_network || current_user_can( code_snippets()->get_network_cap_name() ) ) {
217
 
218
- // if the snippet is a shared network snippet, only display extra actions if the user has network permissions
219
  $simple_actions = array(
220
  'edit' => esc_html__( 'Edit', 'code-snippets' ),
221
  'clone' => esc_html__( 'Clone', 'code-snippets' ),
@@ -356,7 +376,8 @@ class List_Table extends WP_List_Table {
356
 
357
  /* Loop through the tags and create a link for each one */
358
  foreach ( $snippet->tags as $tag ) {
359
- $out[] = sprintf( '<a href="%s">%s</a>',
 
360
  esc_url( add_query_arg( 'tag', esc_attr( $tag ) ) ),
361
  esc_html( $tag )
362
  );
@@ -582,7 +603,8 @@ class List_Table extends WP_List_Table {
582
  echo '<div class="alignleft actions">';
583
  echo '<select name="tag">';
584
 
585
- printf( "<option %s value=''>%s</option>\n",
 
586
  selected( $query, '', false ),
587
  esc_html__( 'Show all tags', 'code-snippets' )
588
  );
@@ -683,6 +705,7 @@ class List_Table extends WP_List_Table {
683
  if ( ! in_array( $id, $active_shared_snippets, true ) ) {
684
  $active_shared_snippets[] = $id;
685
  update_option( 'active_shared_network_snippets', $active_shared_snippets );
 
686
  }
687
 
688
  return 'activated';
@@ -690,6 +713,7 @@ class List_Table extends WP_List_Table {
690
  case 'deactivate-shared':
691
  $active_shared_snippets = get_option( 'active_shared_network_snippets', array() );
692
  update_option( 'active_shared_network_snippets', array_diff( $active_shared_snippets, array( $id ) ) );
 
693
  return 'deactivated';
694
 
695
  case 'clone':
@@ -716,9 +740,6 @@ class List_Table extends WP_List_Table {
716
 
717
  /**
718
  * Processes actions requested by the user.
719
- *
720
- * @uses wp_redirect() to pass the results to the current page
721
- * @uses add_query_arg() to append the results to the current URI
722
  */
723
  public function process_requested_actions() {
724
 
@@ -750,7 +771,7 @@ class List_Table extends WP_List_Table {
750
  $result = $this->perform_action( $id, sanitize_key( $_GET['action'] ), $scope );
751
 
752
  if ( $result ) {
753
- wp_redirect( esc_url_raw( add_query_arg( 'result', $result ) ) );
754
  exit;
755
  }
756
  }
@@ -781,6 +802,7 @@ class List_Table extends WP_List_Table {
781
  }
782
 
783
  update_option( 'active_shared_network_snippets', $active_shared_snippets );
 
784
  }
785
 
786
  $result = 'activated-multi';
@@ -797,6 +819,7 @@ class List_Table extends WP_List_Table {
797
  $active_shared_snippets = ( '' === $active_shared_snippets ) ? array() : $active_shared_snippets;
798
  $active_shared_snippets = array_diff( $active_shared_snippets, array_map( 'intval', $_POST['shared_ids'] ) );
799
  update_option( 'active_shared_network_snippets', $active_shared_snippets );
 
800
  }
801
 
802
  $result = 'deactivated-multi';
@@ -826,7 +849,7 @@ class List_Table extends WP_List_Table {
826
  }
827
 
828
  if ( isset( $result ) ) {
829
- wp_redirect( esc_url_raw( add_query_arg( 'result', $result ) ) );
830
  exit;
831
  }
832
  }
@@ -884,26 +907,12 @@ class List_Table extends WP_List_Table {
884
  }
885
  } else {
886
  $active_shared_snippets = get_option( 'active_shared_network_snippets', array() );
887
- $active_shared_snippet_format = implode( ',', array_fill( 0, count( $ids ), '%d' ) );
888
-
889
- /* phpcs:disable WordPress.DB.DirectDatabaseQuery.NoCaching */
890
- $shared_snippets = $wpdb->get_results(
891
- $wpdb->prepare( "
892
- SELECT * FROM $db->ms_table
893
- WHERE id IN ($active_shared_snippet_format)",
894
- $ids
895
- ),
896
- ARRAY_A
897
- );
898
 
899
- foreach ( $shared_snippets as $index => $snippet ) {
900
- $snippet = new Snippet( $snippet );
901
- $snippet->network = true;
902
  $snippet->shared_network = true;
903
  $snippet->tags = array_merge( $snippet->tags, array( 'shared on network' ) );
904
  $snippet->active = in_array( $snippet->id, $active_shared_snippets, true );
905
-
906
- $shared_snippets[ $index ] = $snippet;
907
  }
908
 
909
  $snippets['all'] = array_merge( $snippets['all'], $shared_snippets );
@@ -926,7 +935,7 @@ class List_Table extends WP_List_Table {
926
  $location = empty( $_POST['tag'] ) ?
927
  remove_query_arg( 'tag' ) :
928
  add_query_arg( 'tag', sanitize_text_field( wp_unslash( $_POST['tag'] ) ) );
929
- wp_redirect( esc_url_raw( $location ) );
930
  exit;
931
  }
932
 
@@ -1045,9 +1054,9 @@ class List_Table extends WP_List_Table {
1045
  /* We register our pagination options and calculations */
1046
  $this->set_pagination_args(
1047
  array(
1048
- 'total_items' => $total_items, // Calculate the total number of items
1049
- 'per_page' => $per_page, // Determine how many items to show on a page
1050
- 'total_pages' => ceil( $total_items / $per_page ), // Calculate the total number of pages
1051
  )
1052
  );
1053
  }
@@ -1063,22 +1072,22 @@ class List_Table extends WP_List_Table {
1063
  */
1064
  private function get_sort_direction( $a_data, $b_data ) {
1065
 
1066
- // if the data is numeric, then calculate the ordering directly
1067
  if ( is_numeric( $a_data ) ) {
1068
  return $a_data - $b_data;
1069
  }
1070
 
1071
- // if only one of the data points is empty, then place it before the one which is not
1072
  if ( '' === $a_data xor '' === $b_data ) {
1073
  return '' === $a_data ? 1 : -1;
1074
  }
1075
 
1076
- // sort using the default string sort order if possible
1077
  if ( is_string( $a_data ) ) {
1078
  return strcasecmp( $a_data, $b_data );
1079
  }
1080
 
1081
- // otherwise, use basic comparison operators
1082
  return $a_data === $b_data ? 0 : ( $a_data < $b_data ? -1 : 1 );
1083
  }
1084
 
@@ -1129,7 +1138,7 @@ class List_Table extends WP_List_Table {
1129
  $result = $this->get_sort_direction( $a->id, $b->id );
1130
  }
1131
 
1132
- // apply the sort direction to the calculated order
1133
  return ( 'asc' === $this->order_dir ) ? $result : -$result;
1134
  }
1135
 
@@ -1223,7 +1232,9 @@ class List_Table extends WP_List_Table {
1223
  if ( preg_match( '/@line:(?P<line>\d+)/', $s, $matches ) ) {
1224
 
1225
  /* translators: 1: search query, 2: line number */
1226
- echo sprintf( esc_html__( ' for &ldquo;%1$s&rdquo; on line %2$d', 'code-snippets' ),
 
 
1227
  esc_html( trim( str_replace( $matches[0], '', $s ) ) ),
1228
  intval( $matches['line'] )
1229
  );
@@ -1243,7 +1254,8 @@ class List_Table extends WP_List_Table {
1243
  echo '</span>';
1244
 
1245
  /* translators: 1: link URL, 2: link text */
1246
- printf( '&nbsp;<a class="button clear-filters" href="%s">%s</a>',
 
1247
  esc_url( remove_query_arg( array( 's', 'tag' ) ) ),
1248
  esc_html__( 'Clear Filters', 'code-snippets' )
1249
  );
@@ -1279,7 +1291,7 @@ class List_Table extends WP_List_Table {
1279
 
1280
  /** Snippet @var Snippet $snippet */
1281
  foreach ( $snippets as $snippet ) {
1282
- // copy all data from the previous snippet aside from the ID and active status
1283
  $snippet->id = 0;
1284
  $snippet->active = false;
1285
 
93
  $_SERVER['REQUEST_URI'] = remove_query_arg( 'result' );
94
 
95
  /* Add filters to format the snippet description in the same way the post content is formatted */
96
+ $filters = [ 'wptexturize', 'convert_smilies', 'convert_chars', 'wpautop', 'shortcode_unautop', 'capital_P_dangit', [ $this, 'wp_kses_desc' ] ];
97
  foreach ( $filters as $filter ) {
98
  add_filter( 'code_snippets/list_table/column_description', $filter );
99
  }
108
  );
109
  }
110
 
111
+ /**
112
+ * Apply a more permissive version of wp_kses_post() to the snippet description.
113
+ *
114
+ * @param string $data Description content to filter.
115
+ *
116
+ * @return string Filtered description content with allowed HTML tags and attributes intact.
117
+ */
118
+ public function wp_kses_desc( $data ) {
119
+ $safe_style_filter = function ( $styles ) {
120
+ $styles[] = 'display';
121
+ return $styles;
122
+ };
123
+
124
+ add_filter( 'safe_style_css', $safe_style_filter );
125
+ $data = wp_kses_post( $data );
126
+ remove_filter( 'safe_style_css', $safe_style_filter );
127
+
128
+ return $data;
129
+ }
130
+
131
  /**
132
  * Set the 'id' column as hidden by default.
133
  *
175
  esc_html( $type )
176
  );
177
 
178
+ case 'date':
179
  return $item->modified ? $item->format_modified() : '&#8212;';
180
 
181
  default:
193
  */
194
  public function get_action_link( $action, $snippet ) {
195
 
196
+ // Redirect actions to the network dashboard for shared network snippets.
197
  $local_actions = array( 'activate', 'activate-shared', 'run-once', 'run-once-shared' );
198
  $network_redirect = $snippet->shared_network && ! $this->is_network && ! in_array( $action, $local_actions, true );
199
 
200
+ // Edit links go to a different menu.
201
  if ( 'edit' === $action ) {
202
  return code_snippets()->get_snippet_edit_url( $snippet->id, $network_redirect ? 'network' : 'self' );
203
  }
212
  add_query_arg( $query_args, code_snippets()->get_menu_url( 'manage', 'network' ) ) :
213
  add_query_arg( $query_args );
214
 
215
+ // Add a nonce to the URL for security purposes.
216
  return wp_nonce_url( $url, 'code_snippets_manage_snippet_' . $snippet->id );
217
  }
218
 
227
  $actions = array();
228
 
229
  if ( ! $this->is_network && $snippet->network && ! $snippet->shared_network ) {
230
+ // Display special links if on a subsite and dealing with a network-active snippet.
231
  if ( $snippet->active ) {
232
  $actions['network_active'] = esc_html__( 'Network Active', 'code-snippets' );
233
  } else {
235
  }
236
  } elseif ( ! $snippet->shared_network || current_user_can( code_snippets()->get_network_cap_name() ) ) {
237
 
238
+ // If the snippet is a shared network snippet, only display extra actions if the user has network permissions.
239
  $simple_actions = array(
240
  'edit' => esc_html__( 'Edit', 'code-snippets' ),
241
  'clone' => esc_html__( 'Clone', 'code-snippets' ),
376
 
377
  /* Loop through the tags and create a link for each one */
378
  foreach ( $snippet->tags as $tag ) {
379
+ $out[] = sprintf(
380
+ '<a href="%s">%s</a>',
381
  esc_url( add_query_arg( 'tag', esc_attr( $tag ) ) ),
382
  esc_html( $tag )
383
  );
603
  echo '<div class="alignleft actions">';
604
  echo '<select name="tag">';
605
 
606
+ printf(
607
+ "<option %s value=''>%s</option>\n",
608
  selected( $query, '', false ),
609
  esc_html__( 'Show all tags', 'code-snippets' )
610
  );
705
  if ( ! in_array( $id, $active_shared_snippets, true ) ) {
706
  $active_shared_snippets[] = $id;
707
  update_option( 'active_shared_network_snippets', $active_shared_snippets );
708
+ clean_active_snippets_cache( code_snippets()->db->ms_table );
709
  }
710
 
711
  return 'activated';
713
  case 'deactivate-shared':
714
  $active_shared_snippets = get_option( 'active_shared_network_snippets', array() );
715
  update_option( 'active_shared_network_snippets', array_diff( $active_shared_snippets, array( $id ) ) );
716
+ clean_active_snippets_cache( code_snippets()->db->ms_table );
717
  return 'deactivated';
718
 
719
  case 'clone':
740
 
741
  /**
742
  * Processes actions requested by the user.
 
 
 
743
  */
744
  public function process_requested_actions() {
745
 
771
  $result = $this->perform_action( $id, sanitize_key( $_GET['action'] ), $scope );
772
 
773
  if ( $result ) {
774
+ wp_safe_redirect( esc_url_raw( add_query_arg( 'result', $result ) ) );
775
  exit;
776
  }
777
  }
802
  }
803
 
804
  update_option( 'active_shared_network_snippets', $active_shared_snippets );
805
+ clean_active_snippets_cache( code_snippets()->db->ms_table );
806
  }
807
 
808
  $result = 'activated-multi';
819
  $active_shared_snippets = ( '' === $active_shared_snippets ) ? array() : $active_shared_snippets;
820
  $active_shared_snippets = array_diff( $active_shared_snippets, array_map( 'intval', $_POST['shared_ids'] ) );
821
  update_option( 'active_shared_network_snippets', $active_shared_snippets );
822
+ clean_active_snippets_cache( code_snippets()->db->ms_table );
823
  }
824
 
825
  $result = 'deactivated-multi';
849
  }
850
 
851
  if ( isset( $result ) ) {
852
+ wp_safe_redirect( esc_url_raw( add_query_arg( 'result', $result ) ) );
853
  exit;
854
  }
855
  }
907
  }
908
  } else {
909
  $active_shared_snippets = get_option( 'active_shared_network_snippets', array() );
910
+ $shared_snippets = get_snippets( $ids, true );
 
 
 
 
 
 
 
 
 
 
911
 
912
+ foreach ( $shared_snippets as $snippet ) {
 
 
913
  $snippet->shared_network = true;
914
  $snippet->tags = array_merge( $snippet->tags, array( 'shared on network' ) );
915
  $snippet->active = in_array( $snippet->id, $active_shared_snippets, true );
 
 
916
  }
917
 
918
  $snippets['all'] = array_merge( $snippets['all'], $shared_snippets );
935
  $location = empty( $_POST['tag'] ) ?
936
  remove_query_arg( 'tag' ) :
937
  add_query_arg( 'tag', sanitize_text_field( wp_unslash( $_POST['tag'] ) ) );
938
+ wp_safe_redirect( esc_url_raw( $location ) );
939
  exit;
940
  }
941
 
1054
  /* We register our pagination options and calculations */
1055
  $this->set_pagination_args(
1056
  array(
1057
+ 'total_items' => $total_items, // Calculate the total number of items.
1058
+ 'per_page' => $per_page, // Determine how many items to show on a page.
1059
+ 'total_pages' => ceil( $total_items / $per_page ), // Calculate the total number of pages.
1060
  )
1061
  );
1062
  }
1072
  */
1073
  private function get_sort_direction( $a_data, $b_data ) {
1074
 
1075
+ // If the data is numeric, then calculate the ordering directly.
1076
  if ( is_numeric( $a_data ) ) {
1077
  return $a_data - $b_data;
1078
  }
1079
 
1080
+ // If only one of the data points is empty, then place it before the one which is not.
1081
  if ( '' === $a_data xor '' === $b_data ) {
1082
  return '' === $a_data ? 1 : -1;
1083
  }
1084
 
1085
+ // Sort using the default string sort order if possible.
1086
  if ( is_string( $a_data ) ) {
1087
  return strcasecmp( $a_data, $b_data );
1088
  }
1089
 
1090
+ // Otherwise, use basic comparison operators.
1091
  return $a_data === $b_data ? 0 : ( $a_data < $b_data ? -1 : 1 );
1092
  }
1093
 
1138
  $result = $this->get_sort_direction( $a->id, $b->id );
1139
  }
1140
 
1141
+ // Apply the sort direction to the calculated order.
1142
  return ( 'asc' === $this->order_dir ) ? $result : -$result;
1143
  }
1144
 
1232
  if ( preg_match( '/@line:(?P<line>\d+)/', $s, $matches ) ) {
1233
 
1234
  /* translators: 1: search query, 2: line number */
1235
+ $text = __( ' for &ldquo;%1$s&rdquo; on line %2$d', 'code-snippets' );
1236
+ printf(
1237
+ esc_html( $text ),
1238
  esc_html( trim( str_replace( $matches[0], '', $s ) ) ),
1239
  intval( $matches['line'] )
1240
  );
1254
  echo '</span>';
1255
 
1256
  /* translators: 1: link URL, 2: link text */
1257
+ printf(
1258
+ '&nbsp;<a class="button clear-filters" href="%s">%s</a>',
1259
  esc_url( remove_query_arg( array( 's', 'tag' ) ) ),
1260
  esc_html__( 'Clear Filters', 'code-snippets' )
1261
  );
1291
 
1292
  /** Snippet @var Snippet $snippet */
1293
  foreach ( $snippets as $snippet ) {
1294
+ // Copy all data from the previous snippet aside from the ID and active status.
1295
  $snippet->id = 0;
1296
  $snippet->active = false;
1297
 
php/class-plugin.php CHANGED
@@ -68,6 +68,8 @@ class Plugin {
68
  $this->version = $version;
69
  $this->file = $file;
70
 
 
 
71
  add_action( 'init', array( $this, 'load_textdomain' ), 9 );
72
 
73
  add_filter( 'code_snippets/execute_snippets', array( $this, 'disable_snippet_execution' ), 5 );
@@ -266,10 +268,10 @@ class Plugin {
266
  $domain = 'code-snippets';
267
  $locale = apply_filters( 'plugin_locale', get_locale(), $domain );
268
 
269
- // wp-content/languages/code-snippets/code-snippets-[locale].mo
270
  load_textdomain( $domain, trailingslashit( WP_LANG_DIR ) . "$domain/$domain-$locale.mo" );
271
 
272
- // wp-content/plugins/code-snippets/languages/code-snippets-[locale].mo
273
  load_plugin_textdomain( $domain, false, dirname( plugin_basename( $this->file ) ) . '/languages' );
274
  }
275
 
68
  $this->version = $version;
69
  $this->file = $file;
70
 
71
+ wp_cache_add_global_groups( CACHE_GROUP );
72
+
73
  add_action( 'init', array( $this, 'load_textdomain' ), 9 );
74
 
75
  add_filter( 'code_snippets/execute_snippets', array( $this, 'disable_snippet_execution' ), 5 );
268
  $domain = 'code-snippets';
269
  $locale = apply_filters( 'plugin_locale', get_locale(), $domain );
270
 
271
+ // wp-content/languages/code-snippets/code-snippets-[locale].mo.
272
  load_textdomain( $domain, trailingslashit( WP_LANG_DIR ) . "$domain/$domain-$locale.mo" );
273
 
274
+ // wp-content/plugins/code-snippets/languages/code-snippets-[locale].mo.
275
  load_plugin_textdomain( $domain, false, dirname( plugin_basename( $this->file ) ) . '/languages' );
276
  }
277
 
php/class-upgrade.php CHANGED
@@ -63,7 +63,7 @@ class Upgrade {
63
  $updated = update_option( 'code_snippets_version', $this->current_version );
64
 
65
  if ( ! $updated ) {
66
- return; // bail if the data was not successfully saved to prevent this process from repeating
67
  }
68
 
69
  $sample_snippets = $this->get_sample_content();
@@ -77,7 +77,7 @@ class Upgrade {
77
  $menu_slug = code_snippets()->get_menu_slug();
78
  $option_name = "{$prefix}managetoplevel_page_{$menu_slug}columnshidden";
79
 
80
- // loop through each user ID and remove all matching user meta
81
  foreach ( get_users( array( 'fields' => 'ID' ) ) as $user_id ) {
82
  delete_metadata( 'user', $user_id, $option_name, '', true );
83
  }
@@ -101,6 +101,8 @@ class Upgrade {
101
  }
102
  }
103
  }
 
 
104
  }
105
 
106
  /**
@@ -135,14 +137,14 @@ class Upgrade {
135
  $user->remove_cap( $network_cap );
136
  }
137
  }
 
 
138
  }
139
 
140
  /**
141
  * Migrate data from the old integer method of storing scopes to the new string method
142
  *
143
  * @param string $table_name Name of database table.
144
- *
145
- * @phpcs:disable WordPress.DB.DirectDatabaseQuery.NoCaching
146
  */
147
  private function migrate_scope_data( $table_name ) {
148
  global $wpdb;
@@ -160,7 +162,7 @@ class Upgrade {
160
  $scope_name,
161
  $scope_number
162
  )
163
- );
164
  }
165
  }
166
 
@@ -173,30 +175,26 @@ class Upgrade {
173
  $tag = "\n\n" . esc_html__( 'This is a sample snippet. Feel free to use it, edit it, or remove it.', 'code-snippets' );
174
 
175
  $snippets_data = array(
176
-
177
- 'lowercase_filenames' => array(
178
  'name' => esc_html__( 'Make upload filenames lowercase', 'code-snippets' ),
179
  'code' => "add_filter( 'sanitize_file_name', 'mb_strtolower' );",
180
  'desc' => esc_html__( 'Makes sure that image and file uploads have lowercase filenames.', 'code-snippets' ) . $tag,
181
  'tags' => array( 'sample', 'media' ),
182
  ),
183
-
184
- 'disable_admin_bar' => array(
185
  'name' => esc_html__( 'Disable admin bar', 'code-snippets' ),
186
  'code' => "add_action( 'wp', function () {\n\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\tshow_admin_bar( false );\n\t}\n} );",
187
  'desc' => esc_html__( 'Turns off the WordPress admin bar for everyone except administrators.', 'code-snippets' ) . $tag,
188
  'tags' => array( 'sample', 'admin-bar' ),
189
  'scope' => 'front-end',
190
  ),
191
-
192
- 'allow_smilies' => array(
193
  'name' => esc_html__( 'Allow smilies', 'code-snippets' ),
194
  'code' => "add_filter( 'widget_text', 'convert_smilies' );\nadd_filter( 'the_title', 'convert_smilies' );\nadd_filter( 'wp_title', 'convert_smilies' );\nadd_filter( 'get_bloginfo', 'convert_smilies' );",
195
  'desc' => esc_html__( 'Allows smiley conversion in obscure places.', 'code-snippets' ) . $tag,
196
  'tags' => array( 'sample' ),
197
  ),
198
-
199
- 'current_year' => array(
200
  'name' => esc_html__( 'Current year', 'code-snippets' ),
201
  'code' => "<?php echo date( 'Y' ); ?>",
202
  'desc' => esc_html__( 'Shortcode for inserting the current year into a post or page..', 'code-snippets' ) . $tag,
63
  $updated = update_option( 'code_snippets_version', $this->current_version );
64
 
65
  if ( ! $updated ) {
66
+ return; // Bail if the data was not successfully saved to prevent this process from repeating.
67
  }
68
 
69
  $sample_snippets = $this->get_sample_content();
77
  $menu_slug = code_snippets()->get_menu_slug();
78
  $option_name = "{$prefix}managetoplevel_page_{$menu_slug}columnshidden";
79
 
80
+ // Loop through each user ID and remove all matching user meta.
81
  foreach ( get_users( array( 'fields' => 'ID' ) ) as $user_id ) {
82
  delete_metadata( 'user', $user_id, $option_name, '', true );
83
  }
101
  }
102
  }
103
  }
104
+
105
+ clean_snippets_cache( $table_name );
106
  }
107
 
108
  /**
137
  $user->remove_cap( $network_cap );
138
  }
139
  }
140
+
141
+ clean_snippets_cache( $table_name );
142
  }
143
 
144
  /**
145
  * Migrate data from the old integer method of storing scopes to the new string method
146
  *
147
  * @param string $table_name Name of database table.
 
 
148
  */
149
  private function migrate_scope_data( $table_name ) {
150
  global $wpdb;
162
  $scope_name,
163
  $scope_number
164
  )
165
+ ); // cache ok, will flush at end of process; db call ok.
166
  }
167
  }
168
 
175
  $tag = "\n\n" . esc_html__( 'This is a sample snippet. Feel free to use it, edit it, or remove it.', 'code-snippets' );
176
 
177
  $snippets_data = array(
178
+ array(
 
179
  'name' => esc_html__( 'Make upload filenames lowercase', 'code-snippets' ),
180
  'code' => "add_filter( 'sanitize_file_name', 'mb_strtolower' );",
181
  'desc' => esc_html__( 'Makes sure that image and file uploads have lowercase filenames.', 'code-snippets' ) . $tag,
182
  'tags' => array( 'sample', 'media' ),
183
  ),
184
+ array(
 
185
  'name' => esc_html__( 'Disable admin bar', 'code-snippets' ),
186
  'code' => "add_action( 'wp', function () {\n\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\tshow_admin_bar( false );\n\t}\n} );",
187
  'desc' => esc_html__( 'Turns off the WordPress admin bar for everyone except administrators.', 'code-snippets' ) . $tag,
188
  'tags' => array( 'sample', 'admin-bar' ),
189
  'scope' => 'front-end',
190
  ),
191
+ array(
 
192
  'name' => esc_html__( 'Allow smilies', 'code-snippets' ),
193
  'code' => "add_filter( 'widget_text', 'convert_smilies' );\nadd_filter( 'the_title', 'convert_smilies' );\nadd_filter( 'wp_title', 'convert_smilies' );\nadd_filter( 'get_bloginfo', 'convert_smilies' );",
194
  'desc' => esc_html__( 'Allows smiley conversion in obscure places.', 'code-snippets' ) . $tag,
195
  'tags' => array( 'sample' ),
196
  ),
197
+ array(
 
198
  'name' => esc_html__( 'Current year', 'code-snippets' ),
199
  'code' => "<?php echo date( 'Y' ); ?>",
200
  'desc' => esc_html__( 'Shortcode for inserting the current year into a post or page..', 'code-snippets' ) . $tag,
php/class-validator.php CHANGED
@@ -143,23 +143,23 @@ class Validator {
143
  continue;
144
  }
145
 
146
- // if this is a function or class exists check, then allow this function or class to be defined
147
  if ( T_STRING === $token[0] && 'function_exists' === $token[1] || 'class_exists' === $token[1] ) {
148
  $type = 'function_exists' === $token[1] ? T_FUNCTION : T_CLASS;
149
 
150
- // eat tokens until we find the function or class name
151
  while ( ! $this->end() && T_CONSTANT_ENCAPSED_STRING !== $token[0] ) {
152
  $token = $this->peek();
153
  $this->next();
154
  }
155
 
156
- // add the identifier to the list of exceptions
157
  $this->exceptions[ $type ] = isset( $this->exceptions[ $type ] ) ? $this->exceptions[ $type ] : array();
158
  $this->exceptions[ $type ][] = trim( $token[1], '\'"' );
159
  continue;
160
  }
161
 
162
- // if we have a double colon, followed by a class, then consume it before the next section
163
  if ( T_DOUBLE_COLON === $token[0] ) {
164
  $token = $this->peek();
165
  $this->next();
@@ -170,21 +170,21 @@ class Validator {
170
  }
171
  }
172
 
173
- // only look for class and function declaration tokens
174
  if ( T_CLASS !== $token[0] && T_FUNCTION !== $token[0] ) {
175
  continue;
176
  }
177
 
178
  $structure_type = $token[0];
179
 
180
- // continue eating tokens until we find the name of the class or function
181
  while ( ! $this->end() && T_STRING !== $token[0] &&
182
  ( T_FUNCTION !== $structure_type || '(' !== $token ) && ( T_CLASS !== $structure_type || '{' !== $token ) ) {
183
  $token = $this->peek();
184
  $this->next();
185
  }
186
 
187
- // if we've eaten all the tokens without discovering a name, then there must be a syntax error, so return appropriately
188
  if ( $this->end() ) {
189
  return array(
190
  'message' => __( 'Parse error: syntax error, unexpected end of snippet.', 'code-snippets' ),
@@ -192,10 +192,10 @@ class Validator {
192
  );
193
  }
194
 
195
- // if the function or class is anonymous, with no name, then no need to check
196
  if ( ! ( T_FUNCTION === $structure_type && '(' === $token ) && ! ( T_CLASS === $structure_type && '{' === $token ) ) {
197
 
198
- // check whether the name has already been defined
199
  if ( $this->check_duplicate_identifier( $structure_type, $token[1] ) ) {
200
  switch ( $structure_type ) {
201
  case T_FUNCTION:
@@ -222,18 +222,18 @@ class Validator {
222
  }
223
  }
224
 
225
- // if we have entered into a class, eat tokens until we find the closing brace
226
  if ( T_CLASS !== $structure_type ) {
227
  continue;
228
  }
229
 
230
- // find the opening brace for the class
231
  while ( ! $this->end() && '{' !== $token ) {
232
  $token = $this->peek();
233
  $this->next();
234
  }
235
 
236
- // continue traversing the class tokens until we have found the class closing brace
237
  $depth = 1;
238
  while ( ! $this->end() && $depth > 0 ) {
239
  $token = $this->peek();
@@ -247,7 +247,7 @@ class Validator {
247
  $this->next();
248
  }
249
 
250
- // if we did not make it out of the class, then there's a problem
251
  if ( $depth > 0 ) {
252
  return array(
253
  'message' => __( 'Parse error: syntax error, unexpected end of snippet', 'code-snippets' ),
143
  continue;
144
  }
145
 
146
+ // If this is a function or class exists check, then allow this function or class to be defined.
147
  if ( T_STRING === $token[0] && 'function_exists' === $token[1] || 'class_exists' === $token[1] ) {
148
  $type = 'function_exists' === $token[1] ? T_FUNCTION : T_CLASS;
149
 
150
+ // Eat tokens until we find the function or class name.
151
  while ( ! $this->end() && T_CONSTANT_ENCAPSED_STRING !== $token[0] ) {
152
  $token = $this->peek();
153
  $this->next();
154
  }
155
 
156
+ // Add the identifier to the list of exceptions.
157
  $this->exceptions[ $type ] = isset( $this->exceptions[ $type ] ) ? $this->exceptions[ $type ] : array();
158
  $this->exceptions[ $type ][] = trim( $token[1], '\'"' );
159
  continue;
160
  }
161
 
162
+ // If we have a double colon, followed by a class, then consume it before the next section.
163
  if ( T_DOUBLE_COLON === $token[0] ) {
164
  $token = $this->peek();
165
  $this->next();
170
  }
171
  }
172
 
173
+ // Only look for class and function declaration tokens.
174
  if ( T_CLASS !== $token[0] && T_FUNCTION !== $token[0] ) {
175
  continue;
176
  }
177
 
178
  $structure_type = $token[0];
179
 
180
+ // Continue eating tokens until we find the name of the class or function.
181
  while ( ! $this->end() && T_STRING !== $token[0] &&
182
  ( T_FUNCTION !== $structure_type || '(' !== $token ) && ( T_CLASS !== $structure_type || '{' !== $token ) ) {
183
  $token = $this->peek();
184
  $this->next();
185
  }
186
 
187
+ // If we've eaten all the tokens without discovering a name, then there must be a syntax error, so return appropriately.
188
  if ( $this->end() ) {
189
  return array(
190
  'message' => __( 'Parse error: syntax error, unexpected end of snippet.', 'code-snippets' ),
192
  );
193
  }
194
 
195
+ // If the function or class is anonymous, with no name, then no need to check.
196
  if ( ! ( T_FUNCTION === $structure_type && '(' === $token ) && ! ( T_CLASS === $structure_type && '{' === $token ) ) {
197
 
198
+ // Check whether the name has already been defined.
199
  if ( $this->check_duplicate_identifier( $structure_type, $token[1] ) ) {
200
  switch ( $structure_type ) {
201
  case T_FUNCTION:
222
  }
223
  }
224
 
225
+ // If we have entered into a class, eat tokens until we find the closing brace.
226
  if ( T_CLASS !== $structure_type ) {
227
  continue;
228
  }
229
 
230
+ // Find the opening brace for the class.
231
  while ( ! $this->end() && '{' !== $token ) {
232
  $token = $this->peek();
233
  $this->next();
234
  }
235
 
236
+ // Continue traversing the class tokens until we have found the class closing brace.
237
  $depth = 1;
238
  while ( ! $this->end() && $depth > 0 ) {
239
  $token = $this->peek();
247
  $this->next();
248
  }
249
 
250
+ // If we did not make it out of the class, then there's a problem.
251
  if ( $depth > 0 ) {
252
  return array(
253
  'message' => __( 'Parse error: syntax error, unexpected end of snippet', 'code-snippets' ),
php/editor.php CHANGED
@@ -42,20 +42,20 @@ function enqueue_code_editor( $type, $extra_atts = [] ) {
42
  'colorpicker' => [ 'mode' => 'edit' ],
43
  ];
44
 
45
- // add relevant saved setting values to the default attributes
46
  $plugin_settings = Settings\get_settings_values();
47
  $setting_fields = Settings\get_settings_fields();
48
 
49
  foreach ( $setting_fields['editor'] as $field_id => $field ) {
50
- // the 'codemirror' setting field specifies the name of the attribute
51
  $default_atts[ $field['codemirror'] ] = $plugin_settings['editor'][ $field_id ];
52
  }
53
 
54
- // merge the default attributes with the ones passed into the function
55
  $atts = wp_parse_args( $default_atts, $extra_atts );
56
  $atts = apply_filters( 'code_snippets_codemirror_atts', $atts );
57
 
58
- // ensure number values are not formatted as strings
59
  foreach ( [ 'indentUnit', 'tabSize' ] as $number_att ) {
60
  $atts[ $number_att ] = intval( $atts[ $number_att ] );
61
  }
@@ -75,7 +75,7 @@ function enqueue_code_editor( $type, $extra_atts = [] ) {
75
  true
76
  );
77
 
78
- // CodeMirror Theme
79
  $theme = get_setting( 'editor', 'theme' );
80
 
81
  if ( 'default' !== $theme ) {
42
  'colorpicker' => [ 'mode' => 'edit' ],
43
  ];
44
 
45
+ // Add relevant saved setting values to the default attributes.
46
  $plugin_settings = Settings\get_settings_values();
47
  $setting_fields = Settings\get_settings_fields();
48
 
49
  foreach ( $setting_fields['editor'] as $field_id => $field ) {
50
+ // The 'codemirror' setting field specifies the name of the attribute.
51
  $default_atts[ $field['codemirror'] ] = $plugin_settings['editor'][ $field_id ];
52
  }
53
 
54
+ // Merge the default attributes with the ones passed into the function.
55
  $atts = wp_parse_args( $default_atts, $extra_atts );
56
  $atts = apply_filters( 'code_snippets_codemirror_atts', $atts );
57
 
58
+ // Ensure number values are not formatted as strings.
59
  foreach ( [ 'indentUnit', 'tabSize' ] as $number_att ) {
60
  $atts[ $number_att ] = intval( $atts[ $number_att ] );
61
  }
75
  true
76
  );
77
 
78
+ // CodeMirror Theme.
79
  $theme = get_setting( 'editor', 'theme' );
80
 
81
  if ( 'default' !== $theme ) {
php/front-end/class-frontend.php CHANGED
@@ -80,12 +80,12 @@ class Frontend {
80
  */
81
  public function enqueue_highlighting( $posts ) {
82
 
83
- // exit early if there are no posts to check or if the highlighter has been disabled
84
  if ( empty( $posts ) || Settings\get_setting( 'general', 'disable_prism' ) ) {
85
  return $posts;
86
  }
87
 
88
- // loop through all the posts, checking for instances where the source tag is used
89
  foreach ( $posts as $post ) {
90
 
91
  if ( false === stripos( $post->post_content, '[' . self::SOURCE_SHORTCODE ) &&
@@ -93,7 +93,7 @@ class Frontend {
93
  continue;
94
  }
95
 
96
- // register the syntax highlighter assets and exit from the loop once a match is discovered
97
  $this->register_prism_assets();
98
  wp_enqueue_style( self::PRISM_HANDLE );
99
  wp_enqueue_script( self::PRISM_HANDLE );
@@ -167,12 +167,12 @@ class Frontend {
167
 
168
  $snippet = get_snippet( $id, (bool) $atts['network'] );
169
 
170
- // render the source code if this is not a shortcode snippet
171
  if ( 'content' !== $snippet->scope ) {
172
  return $snippet->id ? $this->render_snippet_source( $snippet ) : '';
173
  }
174
 
175
- // if the snippet is inactive, either display a message or render nothing.
176
  if ( ! $snippet->active ) {
177
  if ( ! $atts['debug'] ) {
178
  return '';
@@ -209,13 +209,13 @@ class Frontend {
209
  }
210
 
211
  if ( $atts['shortcodes'] ) {
212
- // remove this shortcode from the list to prevent recursion
213
  remove_shortcode( self::CONTENT_SHORTCODE );
214
 
215
- // evaluate shortcodes
216
  $content = do_shortcode( $atts['format'] ? shortcode_unautop( $content ) : $content );
217
 
218
- // add this shortcode back to the list
219
  add_shortcode( self::CONTENT_SHORTCODE, [ $this, 'render_content_shortcode' ] );
220
  }
221
 
80
  */
81
  public function enqueue_highlighting( $posts ) {
82
 
83
+ // Exit early if there are no posts to check or if the highlighter has been disabled.
84
  if ( empty( $posts ) || Settings\get_setting( 'general', 'disable_prism' ) ) {
85
  return $posts;
86
  }
87
 
88
+ // Loop through all the posts, checking for instances where the source tag is used.
89
  foreach ( $posts as $post ) {
90
 
91
  if ( false === stripos( $post->post_content, '[' . self::SOURCE_SHORTCODE ) &&
93
  continue;
94
  }
95
 
96
+ // Register the syntax highlighter assets and exit from the loop once a match is discovered.
97
  $this->register_prism_assets();
98
  wp_enqueue_style( self::PRISM_HANDLE );
99
  wp_enqueue_script( self::PRISM_HANDLE );
167
 
168
  $snippet = get_snippet( $id, (bool) $atts['network'] );
169
 
170
+ // Render the source code if this is not a shortcode snippet.
171
  if ( 'content' !== $snippet->scope ) {
172
  return $snippet->id ? $this->render_snippet_source( $snippet ) : '';
173
  }
174
 
175
+ // If the snippet is inactive, either display a message or render nothing.
176
  if ( ! $snippet->active ) {
177
  if ( ! $atts['debug'] ) {
178
  return '';
209
  }
210
 
211
  if ( $atts['shortcodes'] ) {
212
+ // Remove this shortcode from the list to prevent recursion.
213
  remove_shortcode( self::CONTENT_SHORTCODE );
214
 
215
+ // Evaluate shortcodes.
216
  $content = do_shortcode( $atts['format'] ? shortcode_unautop( $content ) : $content );
217
 
218
+ // Add this shortcode back to the list.
219
  add_shortcode( self::CONTENT_SHORTCODE, [ $this, 'render_content_shortcode' ] );
220
  }
221
 
php/load.php CHANGED
@@ -16,7 +16,7 @@ namespace Code_Snippets;
16
  *
17
  * @var string A PHP-standardized version number string.
18
  */
19
- const PLUGIN_VERSION = '3.0.1';
20
 
21
  /**
22
  * The full path to the main file of this plugin.
@@ -29,6 +29,13 @@ const PLUGIN_VERSION = '3.0.1';
29
  */
30
  const PLUGIN_FILE = CODE_SNIPPETS_FILE;
31
 
 
 
 
 
 
 
 
32
  /* Load dependencies with Composer */
33
  require_once dirname( __DIR__ ) . '/vendor/autoload.php';
34
 
16
  *
17
  * @var string A PHP-standardized version number string.
18
  */
19
+ const PLUGIN_VERSION = '3.1.0';
20
 
21
  /**
22
  * The full path to the main file of this plugin.
29
  */
30
  const PLUGIN_FILE = CODE_SNIPPETS_FILE;
31
 
32
+ /**
33
+ * Name of the group used for caching data.
34
+ *
35
+ * @var string
36
+ */
37
+ const CACHE_GROUP = 'code_snippets';
38
+
39
  /* Load dependencies with Composer */
40
  require_once dirname( __DIR__ ) . '/vendor/autoload.php';
41
 
php/settings/class-setting-field.php CHANGED
@@ -101,7 +101,7 @@ class Setting_Field {
101
  if ( method_exists( $this, $method_name ) ) {
102
  call_user_func( array( $this, $method_name ) );
103
  } else {
104
- // error message, not necessary to translate
105
  printf( 'Cannot render a %s field.', esc_html( $this->type ) );
106
  return;
107
  }
101
  if ( method_exists( $this, $method_name ) ) {
102
  call_user_func( array( $this, $method_name ) );
103
  } else {
104
+ // Error message, not necessary to translate.
105
  printf( 'Cannot render a %s field.', esc_html( $this->type ) );
106
  return;
107
  }
php/settings/editor-preview.php CHANGED
@@ -73,7 +73,7 @@ function get_editor_theme_list() {
73
 
74
  foreach ( get_editor_themes() as $theme ) {
75
 
76
- // skip mobile themes
77
  if ( '-mobile' === substr( $theme, -7 ) ) {
78
  continue;
79
  }
73
 
74
  foreach ( get_editor_themes() as $theme ) {
75
 
76
+ // Skip mobile themes.
77
  if ( '-mobile' === substr( $theme, -7 ) ) {
78
  continue;
79
  }
php/settings/settings.php CHANGED
@@ -10,6 +10,8 @@ namespace Code_Snippets\Settings;
10
 
11
  const NS = __NAMESPACE__ . '\\';
12
 
 
 
13
  /**
14
  * Add a new option for either the current site or the current network
15
  *
@@ -58,7 +60,6 @@ function update_self_option( $network, $option, $value ) {
58
  * @return bool
59
  */
60
  function are_settings_unified() {
61
-
62
  if ( ! is_multisite() ) {
63
  return false;
64
  }
@@ -76,8 +77,8 @@ function are_settings_unified() {
76
  */
77
  function get_settings_values() {
78
 
79
- /* Check if the settings have been cached */
80
- $settings = wp_cache_get( 'code_snippets_settings' );
81
  if ( $settings ) {
82
  return $settings;
83
  }
@@ -95,7 +96,7 @@ function get_settings_values() {
95
  }
96
  }
97
 
98
- wp_cache_set( 'code_snippets_settings', $settings );
99
 
100
  return $settings;
101
  }
@@ -128,7 +129,7 @@ function update_setting( $section, $field, $new_value ) {
128
 
129
  $settings[ $section ][ $field ] = $new_value;
130
 
131
- wp_cache_set( 'code_snippets_settings', $settings );
132
  return update_self_option( are_settings_unified(), 'code_snippets_settings', $settings );
133
  }
134
 
@@ -255,14 +256,14 @@ function sanitize_settings( array $input ) {
255
  $settings = get_settings_values();
256
  $updated = false;
257
 
258
- // don't directly loop through $input as it does not include as deselected checkboxes.
259
  foreach ( get_settings_fields() as $section_id => $fields ) {
260
  foreach ( $fields as $field_id => $field ) {
261
 
262
- // fetch the corresponding input value from the posted data.
263
  $input_value = isset( $input[ $section_id ][ $field_id ] ) ? $input[ $section_id ][ $field_id ] : null;
264
 
265
- // attempt to sanitize the setting value
266
  $sanitized_value = sanitize_setting_value( $field, $input_value );
267
 
268
  if ( ! is_null( $sanitized_value ) && $settings[ $section_id ][ $field_id ] !== $sanitized_value ) {
@@ -272,7 +273,9 @@ function sanitize_settings( array $input ) {
272
  }
273
  }
274
 
275
- /* Add an updated message */
 
 
276
  if ( $updated ) {
277
  add_settings_error(
278
  'code-snippets-settings-notices',
10
 
11
  const NS = __NAMESPACE__ . '\\';
12
 
13
+ const CACHE_KEY = 'code_snippets_settings';
14
+
15
  /**
16
  * Add a new option for either the current site or the current network
17
  *
60
  * @return bool
61
  */
62
  function are_settings_unified() {
 
63
  if ( ! is_multisite() ) {
64
  return false;
65
  }
77
  */
78
  function get_settings_values() {
79
 
80
+ // Check if the settings have been cached.
81
+ $settings = wp_cache_get( CACHE_KEY );
82
  if ( $settings ) {
83
  return $settings;
84
  }
96
  }
97
  }
98
 
99
+ wp_cache_set( CACHE_KEY, $settings );
100
 
101
  return $settings;
102
  }
129
 
130
  $settings[ $section ][ $field ] = $new_value;
131
 
132
+ wp_cache_set( CACHE_KEY, $settings );
133
  return update_self_option( are_settings_unified(), 'code_snippets_settings', $settings );
134
  }
135
 
256
  $settings = get_settings_values();
257
  $updated = false;
258
 
259
+ // Don't directly loop through $input as it does not include as deselected checkboxes.
260
  foreach ( get_settings_fields() as $section_id => $fields ) {
261
  foreach ( $fields as $field_id => $field ) {
262
 
263
+ // Fetch the corresponding input value from the posted data.
264
  $input_value = isset( $input[ $section_id ][ $field_id ] ) ? $input[ $section_id ][ $field_id ] : null;
265
 
266
+ // Attempt to sanitize the setting value.
267
  $sanitized_value = sanitize_setting_value( $field, $input_value );
268
 
269
  if ( ! is_null( $sanitized_value ) && $settings[ $section_id ][ $field_id ] !== $sanitized_value ) {
273
  }
274
  }
275
 
276
+ wp_cache_delete( CACHE_KEY );
277
+
278
+ // Add an updated message.
279
  if ( $updated ) {
280
  add_settings_error(
281
  'code-snippets-settings-notices',
php/snippet-ops.php CHANGED
@@ -8,120 +8,92 @@
8
  namespace Code_Snippets;
9
 
10
  /**
11
- * Retrieve a list of snippets from the database.
 
 
 
12
  *
13
- * @param array $ids The IDs of the snippets to fetch.
14
- * @param bool|null $multisite Retrieve multisite-wide snippets (true) or site-wide snippets (false).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  *
16
- * @param array $args {
17
- * Optional. Arguments to specify which sorts of snippets to retrieve.
18
  *
19
- * @type bool $active_only Whether to only fetch active snippets. Default false (will fetch both active and inactive snippets).
20
- * @type int $limit Limit the number of retrieved snippets. Default 0, which will not impose a limit on the results.
21
- * @type string $orderby Sort the retrieved snippets by a particular field. Example fields include 'id', 'priority', and 'name'.
22
- * @type string $order Designates ascending or descending order of snippets. Default 'DESC'. Accepts 'ASC', 'DESC'.
23
- * }
 
 
 
 
 
 
24
  *
25
- * @return array An array of Snippet objects.
 
26
  *
27
- * @uses $wpdb to query the database for snippets
28
- * @uses code_snippets()->db->get_table_name() to dynamically retrieve the snippet table name
29
  *
30
  * @since 2.0
31
  */
32
- function get_snippets( array $ids = array(), $multisite = null, array $args = array() ) {
33
  global $wpdb;
34
 
35
- /* If only one ID has been passed in, defer to the get_snippet() function */
36
  $ids_count = count( $ids );
37
  if ( 1 === $ids_count ) {
38
- return array( get_snippet( $ids[0] ) );
39
  }
40
 
41
- $searchable_columns = array( 'name', 'description', 'code', 'tags' );
42
-
43
- $args = wp_parse_args(
44
- $args,
45
- array(
46
- 'active_only' => false,
47
- 'limit' => 0,
48
- 'orderby' => '',
49
- 'order' => 'desc',
50
- 'search' => '',
51
- 'searchby' => $searchable_columns,
52
- )
53
- );
54
-
55
  $db = code_snippets()->db;
56
  $multisite = $db->validate_network_param( $multisite );
57
- $table = $db->get_table_name( $multisite );
58
-
59
- if ( 0 === $ids_count ) {
60
- $snippets = wp_cache_get( $multisite ? 'all_ms_snippets' : 'all_snippets', 'code_snippets' );
61
- if ( $snippets ) {
62
- return $snippets;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  }
64
  }
65
 
66
- $sql = "SELECT * FROM $table WHERE 1=1";
67
- $sql_params = array();
68
-
69
- /* Build a query for specific search terms */
70
- if ( ! empty( $args['search'] ) && ! empty( $args['searchby'] ) ) {
71
- $search = array();
72
- foreach ( $args['searchby'] as $column ) {
73
- if ( in_array( $column, $searchable_columns, true ) ) {
74
- $search[] = "$column LIKE %s";
75
- $sql_params[] = sprintf( '%%%s%%', $wpdb->esc_like( $args['search'] ) );
76
  }
77
- }
78
- $sql .= sprintf( ' AND ( %s )', implode( ' OR ', $search ) );
79
- }
80
-
81
- /* Build a query containing the specified IDs if there are any */
82
- if ( $ids_count > 1 ) {
83
- $sql .= sprintf( ' AND id IN (%s)', implode( ',', array_fill( 0, $ids_count, '%d' ) ) );
84
- $sql_params = array_merge( $sql_params, array_values( $ids ) );
85
- }
86
-
87
- /* Restrict the active status of retrieved snippets if requested */
88
- if ( $args['active_only'] ) {
89
- $sql .= ' AND active=1';
90
- }
91
-
92
- /* Apply custom ordering if requested */
93
- if ( $args['orderby'] ) {
94
- $order_dir = 'ASC' === strtoupper( $args['order'] ) ? 'ASC' : 'DESC';
95
- $sql .= " ORDER BY %s $order_dir";
96
- $sql_params[] = $args['orderby'];
97
- }
98
-
99
- /* Limit the number of retrieved snippets if requested */
100
- if ( intval( $args['limit'] ) > 0 ) {
101
- $sql .= ' LIMIT %d';
102
- $sql_params[] = intval( $args['limit'] );
103
- }
104
-
105
- /* Retrieve the results from the database */
106
- if ( ! empty( $sql_params ) ) {
107
- $sql = $wpdb->prepare( $sql, $sql_params );
108
- }
109
- $snippets = $wpdb->get_results( $sql, ARRAY_A );
110
-
111
- if ( $snippets ) {
112
- /* Convert snippets to snippet objects */
113
- foreach ( $snippets as $index => $snippet ) {
114
- $snippet['network'] = $multisite;
115
- $snippets[ $index ] = new Snippet( $snippet );
116
- }
117
- } else {
118
- $snippets = array();
119
- }
120
-
121
- $snippets = apply_filters( 'code_snippets/get_snippets', $snippets, $multisite );
122
-
123
- if ( 0 === $ids_count ) {
124
- wp_cache_set( $multisite ? 'all_ms_snippets' : 'all_snippets', $snippets, 'code_snippets' );
125
  }
126
 
127
  return $snippets;
@@ -129,31 +101,33 @@ function get_snippets( array $ids = array(), $multisite = null, array $args = ar
129
 
130
  /**
131
  * Gets all used tags from the database.
 
132
  *
133
  * @since 2.0
134
  */
135
  function get_all_snippet_tags() {
136
  global $wpdb;
 
 
137
 
138
- $tags = wp_cache_get( 'all_snippet_tags', 'code_snippets' );
139
  if ( $tags ) {
140
  return $tags;
141
  }
142
 
143
- /* Grab all tags from the database */
144
  $tags = array();
145
- $table = code_snippets()->db->get_table_name();
146
- $all_tags = $wpdb->get_col( sprintf( 'SELECT tags FROM %s', $table ) );
147
 
148
- /* Merge all tags into a single array */
149
  foreach ( $all_tags as $snippet_tags ) {
150
  $snippet_tags = code_snippets_build_tags_array( $snippet_tags );
151
  $tags = array_merge( $snippet_tags, $tags );
152
  }
153
 
154
- /* Remove duplicate tags */
155
  $tags = array_values( array_unique( $tags, SORT_REGULAR ) );
156
- wp_cache_set( 'all_snippet_tags', $tags, 'code_snippets' );
157
  return $tags;
158
  }
159
 
@@ -168,26 +142,26 @@ function get_all_snippet_tags() {
168
  */
169
  function code_snippets_build_tags_array( $tags ) {
170
 
171
- /* If there are no tags set, return an empty array */
172
  if ( empty( $tags ) ) {
173
  return array();
174
  }
175
 
176
- /* If the tags are set as a string, convert them into an array */
177
  if ( is_string( $tags ) ) {
178
  $tags = wp_strip_all_tags( $tags );
179
  $tags = str_replace( ', ', ',', $tags );
180
  $tags = explode( ',', $tags );
181
  }
182
 
183
- /* If we still don't have an array, just convert whatever we do have into one */
184
-
185
  return (array) $tags;
186
  }
187
 
188
  /**
189
  * Retrieve a single snippets from the database.
190
  * Will return empty snippet object if no snippet ID is specified.
 
191
  *
192
  * @param int $id The ID of the snippet to retrieve. 0 to build a new snippet.
193
  * @param boolean|null $multisite Retrieve a multisite-wide snippet (true) or site-wide snippet (false).
@@ -199,39 +173,37 @@ function get_snippet( $id = 0, $multisite = null ) {
199
  global $wpdb;
200
 
201
  $id = absint( $id );
202
- $multisite = code_snippets()->db->validate_network_param( $multisite );
203
- $table = code_snippets()->db->get_table_name( $multisite );
204
 
205
- $cache_key = ( $multisite ? 'ms_' : '' ) . 'snippet_' . $id;
206
- $snippet = wp_cache_get( $cache_key, 'code_snippets' );
207
-
208
- if ( $snippet ) {
209
- return $snippet;
210
- }
211
 
212
- if ( 0 !== $id ) {
 
213
 
214
- /* Retrieve the snippet from the database */
215
- $snippet = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $table WHERE id = %d", $id ) );
 
 
 
 
 
 
216
 
217
- /* Unescape the snippet data, ready for use */
 
218
  $snippet = new Snippet( $snippet );
219
-
220
- } else {
221
-
222
- /* Get an empty snippet object */
223
- $snippet = new Snippet();
224
  }
225
 
226
  $snippet->network = $multisite;
227
-
228
- $snippet = apply_filters( 'code_snippets/get_snippet', $snippet, $id, $multisite );
229
- wp_cache_set( $cache_key, $snippet, 'code_snippets' );
230
- return $snippet;
231
  }
232
 
233
  /**
234
- * Activates a snippet
 
235
  *
236
  * @param int $id ID of the snippet to activate.
237
  * @param bool|null $multisite Whether the snippets are multisite-wide (true) or site-wide (false).
@@ -242,32 +214,29 @@ function get_snippet( $id = 0, $multisite = null ) {
242
  function activate_snippet( $id, $multisite = null ) {
243
  global $wpdb;
244
  $db = code_snippets()->db;
245
- $table = $db->get_table_name( $multisite );
246
-
247
- // phpcs:disable WordPress.DB.DirectDatabaseQuery.NoCaching
248
- $wpdb->update(
249
- $table,
250
- array( 'active' => '1' ),
251
- array( 'id' => $id ),
252
- array( '%d' ),
253
- array( '%d' )
254
- );
255
 
256
- /* Retrieve the snippet code from the database for validation before activating */
257
- $row = $wpdb->get_row( $wpdb->prepare( "SELECT code FROM $table WHERE id = %d;", $id ) );
258
- if ( ! $row ) {
259
  return false;
260
  }
261
 
262
- $validator = new Validator( $row->code );
263
  if ( $validator->validate() ) {
264
  return false;
265
  }
266
 
267
- $wpdb->update( $table, array( 'active' => '1' ), array( 'id' => $id ), array( '%d' ), array( '%d' ) );
 
 
 
 
 
 
268
 
269
  /* Remove snippet from shared network snippet list if it was Network Activated */
270
- if ( $table === $db->ms_table ) {
271
  $shared_network_snippets = get_site_option( 'shared_network_snippets' );
272
  if ( $shared_network_snippets ) {
273
  $shared_network_snippets = array_diff( $shared_network_snippets, array( $id ) );
@@ -276,11 +245,13 @@ function activate_snippet( $id, $multisite = null ) {
276
  }
277
 
278
  do_action( 'code_snippets/activate_snippet', $id, $multisite );
 
279
  return true;
280
  }
281
 
282
  /**
283
  * Activates multiple snippets.
 
284
  *
285
  * @param array $ids The IDs of the snippets to activate.
286
  * @param bool|null $multisite Whether the snippets are multisite-wide (true) or site-wide (false).
@@ -292,57 +263,60 @@ function activate_snippet( $id, $multisite = null ) {
292
  function activate_snippets( array $ids, $multisite = null ) {
293
  global $wpdb;
294
  $db = code_snippets()->db;
295
- $table = $db->get_table_name( $multisite );
 
 
296
 
297
- /* Build SQL query containing all the provided snippet IDs */
298
- $ids_format = implode( ',', array_fill( 0, count( $ids ), '%d' ) );
299
- $rows = $wpdb->get_results( $wpdb->prepare( "SELECT id, code FROM $table WHERE id IN ($ids_format)", $ids ) );
300
-
301
- if ( ! $rows ) {
302
  return array();
303
  }
304
 
305
- /* Loop through each snippet code and validate individually */
306
  $valid_ids = array();
307
 
308
- foreach ( $rows as $row ) {
309
- $validator = new Validator( $row->code );
310
  $code_error = $validator->validate();
311
 
312
  if ( ! $code_error ) {
313
- $valid_ids[] = $row->id;
314
  }
315
  }
316
 
317
- /* If there are no valid snippets, then we're done */
318
  if ( ! $valid_ids ) {
319
  return $valid_ids;
320
  }
321
 
322
- /* Build SQL query containing all the valid snippet IDs and activate the valid snippets */
323
  $ids_format = implode( ',', array_fill( 0, count( $valid_ids ), '%d' ) );
324
- $wpdb->query( $wpdb->prepare( "UPDATE $table SET active = 1 WHERE id IN ($ids_format)", $valid_ids ) );
 
325
 
326
- /* Remove snippet from shared network snippet list if it was Network Activated */
327
- if ( $table === $db->ms_table ) {
328
  $shared_network_snippets = get_site_option( 'shared_network_snippets' );
 
329
  if ( $shared_network_snippets ) {
330
  $shared_network_snippets = array_diff( $shared_network_snippets, $valid_ids );
331
  update_site_option( 'shared_network_snippets', $shared_network_snippets );
 
332
  }
333
  }
334
 
335
  do_action( 'code_snippets/activate_snippets', $valid_ids, $multisite );
 
336
  return $valid_ids;
337
  }
338
 
339
  /**
340
- * Deactivate a snippet
 
341
  *
342
  * @param int $id ID of the snippet to deactivate.
343
  * @param bool|null $multisite Whether the snippets are multisite-wide (true) or site-wide (false).
344
  *
345
- * @uses $wpdb to set the snippets' active status
346
  * @since 2.0.0
347
  */
348
  function deactivate_snippet( $id, $multisite = null ) {
@@ -350,19 +324,16 @@ function deactivate_snippet( $id, $multisite = null ) {
350
  $db = code_snippets()->db;
351
  $table = $db->get_table_name( $multisite );
352
 
353
- /* Set the snippet to active */
354
-
355
- // phpcs:disable WordPress.DB.DirectDatabaseQuery.NoCaching
356
  $wpdb->update(
357
  $table,
358
  array( 'active' => '0' ),
359
  array( 'id' => $id ),
360
  array( '%d' ),
361
  array( '%d' )
362
- );
363
-
364
- /* Update the recently active list */
365
 
 
366
  $recently_active = array( $id => time() );
367
 
368
  if ( $table === $db->table ) {
@@ -371,7 +342,6 @@ function deactivate_snippet( $id, $multisite = null ) {
371
  'recently_activated_snippets',
372
  $recently_active + (array) get_option( 'recently_activated_snippets', array() )
373
  );
374
-
375
  } elseif ( $table === $db->ms_table ) {
376
 
377
  update_site_option(
@@ -381,10 +351,12 @@ function deactivate_snippet( $id, $multisite = null ) {
381
  }
382
 
383
  do_action( 'code_snippets/deactivate_snippet', $id, $multisite );
 
384
  }
385
 
386
  /**
387
- * Deletes a snippet from the database
 
388
  *
389
  * @param int $id ID of the snippet to delete.
390
  * @param bool|null $multisite Delete from network-wide (true) or site-wide (false) table.
@@ -393,37 +365,36 @@ function deactivate_snippet( $id, $multisite = null ) {
393
  */
394
  function delete_snippet( $id, $multisite = null ) {
395
  global $wpdb;
 
396
 
397
- // phpcs:disable WordPress.DB.DirectDatabaseQuery.NoCaching
398
  $wpdb->delete(
399
- code_snippets()->db->get_table_name( $multisite ),
400
  array( 'id' => $id ),
401
  array( '%d' )
402
- );
403
 
404
  do_action( 'code_snippets/delete_snippet', $id, $multisite );
 
405
  }
406
 
407
  /**
408
  * Saves a snippet to the database.
 
409
  *
410
  * @param Snippet $snippet The snippet to add/update to the database.
411
  *
412
  * @return int ID of the snippet
413
  *
414
  * @since 2.0.0
415
- *
416
- * phpcs:disable WordPress.DB.DirectDatabaseQuery.NoCaching
417
  */
418
  function save_snippet( Snippet $snippet ) {
419
  global $wpdb;
420
-
421
  $table = code_snippets()->db->get_table_name( $snippet->network );
422
 
423
- /* Update the last modification date and the creation date if necessary */
424
  $snippet->update_modified();
425
 
426
- /* Build array of data to insert */
427
  $data = array(
428
  'name' => $snippet->name,
429
  'description' => $snippet->desc,
@@ -435,40 +406,42 @@ function save_snippet( Snippet $snippet ) {
435
  'modified' => $snippet->modified,
436
  );
437
 
438
- /* Create a new snippet if the ID is not set */
439
  if ( 0 === $snippet->id ) {
440
- $wpdb->insert( $table, $data, '%s' );
441
  $snippet->id = $wpdb->insert_id;
442
 
443
  do_action( 'code_snippets/create_snippet', $snippet->id, $table );
444
  } else {
445
 
446
- /* Otherwise, update the snippet data */
447
- $wpdb->update( $table, $data, array( 'id' => $snippet->id ), null, array( '%d' ) );
448
 
449
  do_action( 'code_snippets/update_snippet', $snippet->id, $table );
450
  }
451
 
 
452
  return $snippet->id;
453
  }
454
 
455
  /**
456
- * Update a snippet entry given a list of fields
 
457
  *
458
  * @param int $snippet_id ID of the snippet to update.
459
  * @param array $fields An array of fields mapped to their values.
460
- * @param bool|null $network Delete from network-wide (true) or site-wide (false) table.
461
  */
462
  function update_snippet_fields( $snippet_id, $fields, $network = null ) {
463
  global $wpdb;
464
 
465
  $table = code_snippets()->db->get_table_name( $network );
466
 
467
- /* Build a new snippet object for the validation */
468
  $snippet = new Snippet();
469
  $snippet->id = $snippet_id;
470
 
471
- /* Validate fields through the snippet class and copy them into a clean array */
472
  $clean_fields = array();
473
 
474
  foreach ( $fields as $field => $value ) {
@@ -478,13 +451,16 @@ function update_snippet_fields( $snippet_id, $fields, $network = null ) {
478
  }
479
  }
480
 
481
- /* Update the snippet in the database */
482
- $wpdb->update( $table, $clean_fields, array( 'id' => $snippet->id ), null, array( '%d' ) );
 
483
  do_action( 'code_snippets/update_snippet', $snippet->id, $table );
 
484
  }
485
 
486
  /**
487
- * Execute a snippet
 
488
  *
489
  * Code must NOT be escaped, as it will be executed directly.
490
  *
@@ -517,42 +493,50 @@ function execute_snippet( $code, $id = 0, $catch_output = true ) {
517
  }
518
 
519
  /**
520
- * Run the active snippets
 
521
  *
522
- * @return bool true on success, false on failure
523
  *
524
  * @since 2.0.0
525
- *
526
- * phpcs:disable WordPress.DB.DirectDatabaseQuery.NoCaching
527
  */
528
  function execute_active_snippets() {
529
  global $wpdb;
530
 
531
- /* Bail early if safe mode is active */
532
  if ( defined( 'CODE_SNIPPETS_SAFE_MODE' ) && CODE_SNIPPETS_SAFE_MODE || ! apply_filters( 'code_snippets/execute_snippets', true ) ) {
533
  return false;
534
  }
535
 
536
  $db = code_snippets()->db;
537
  $scopes = array( 'global', 'single-use', is_admin() ? 'admin' : 'front-end' );
538
- /** Manually specify select list. @noinspection PhpRedundantOptionalArgumentInspection */
539
- $data = $db->fetch_active_snippets( $scopes, 'id, code, scope' );
540
 
541
  foreach ( $data as $table_name => $active_snippets ) {
542
 
543
- /* Loop through the returned snippets and execute the PHP code */
544
  foreach ( $active_snippets as $snippet ) {
545
  $snippet_id = intval( $snippet['id'] );
546
  $code = $snippet['code'];
547
 
548
- // if the snippet is a single-use snippet, deactivate it before execution to ensure that the process always happens
549
  if ( 'single-use' === $snippet['scope'] ) {
550
- if ( $table_name === $db->ms_table && isset( $active_shared_ids ) && in_array( $snippet_id, $active_shared_ids, true ) ) {
 
 
551
  unset( $active_shared_ids[ array_search( $snippet_id, $active_shared_ids, true ) ] );
552
  $active_shared_ids = array_values( $active_shared_ids );
553
  update_option( 'active_shared_network_snippets', $active_shared_ids );
 
554
  } else {
555
- $wpdb->update( $table_name, array( 'active' => '0' ), array( 'id' => $snippet_id ), array( '%d' ), array( '%d' ) );
 
 
 
 
 
 
 
556
  }
557
  }
558
 
8
  namespace Code_Snippets;
9
 
10
  /**
11
+ * Clean the cache where active snippets are stored.
12
+ *
13
+ * @param string $table_name Snippets table name.
14
+ * @param array|false $scopes List of scopes. Optional. If not provided, will flush the cache for all scopes.
15
  *
16
+ * @return void
17
+ */
18
+ function clean_active_snippets_cache( $table_name, $scopes = false ) {
19
+ $scope_groups = $scopes ? [ $scopes ] : [
20
+ [ 'head-content', 'footer-content' ],
21
+ [ 'global', 'single-use', 'front-end' ],
22
+ [ 'global', 'single-use', 'admin' ],
23
+ ];
24
+
25
+ foreach ( $scope_groups as $scopes ) {
26
+ wp_cache_delete( sprintf( 'active_snippets_%s_%s', sanitize_key( join( '_', $scopes ) ), $table_name ), CACHE_GROUP );
27
+ }
28
+ }
29
+
30
+ /**
31
+ * Flush all snippets caches for a given database table.
32
  *
33
+ * @param string $table_name Snippets table name.
 
34
  *
35
+ * @return void
36
+ */
37
+ function clean_snippets_cache( $table_name ) {
38
+ wp_cache_delete( "all_snippet_tags_$table_name", CACHE_GROUP );
39
+ wp_cache_delete( "all_snippets_$table_name", CACHE_GROUP );
40
+ clean_active_snippets_cache( $table_name );
41
+ }
42
+
43
+ /**
44
+ * Retrieve a list of snippets from the database.
45
+ * Read operation.
46
  *
47
+ * @param array $ids The IDs of the snippets to fetch.
48
+ * @param bool|null|string $multisite Retrieve multisite-wide snippets (true) or site-wide snippets (false).
49
  *
50
+ * @return array List of Snippet objects.
 
51
  *
52
  * @since 2.0
53
  */
54
+ function get_snippets( array $ids = array(), $multisite = null ) {
55
  global $wpdb;
56
 
57
+ // If only one ID has been passed in, defer to the get_snippet() function.
58
  $ids_count = count( $ids );
59
  if ( 1 === $ids_count ) {
60
+ return array( get_snippet( $ids[0], $multisite ) );
61
  }
62
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  $db = code_snippets()->db;
64
  $multisite = $db->validate_network_param( $multisite );
65
+ $table_name = $db->get_table_name( $multisite );
66
+ $snippets = wp_cache_get( "all_snippets_$table_name", CACHE_GROUP );
67
+
68
+ // Fetch all snippets from the database if none are cached.
69
+ if ( ! is_array( $snippets ) ) {
70
+ $results = $wpdb->get_results( "SELECT * FROM $table_name", ARRAY_A ); // db call ok.
71
+
72
+ $snippets = $results ?
73
+ array_map(
74
+ function ( $snippet ) use ( $multisite ) {
75
+ $snippet['network'] = $multisite;
76
+ return new Snippet( $snippet );
77
+ },
78
+ $results
79
+ ) :
80
+ array();
81
+
82
+ $snippets = apply_filters( 'code_snippets/get_snippets', $snippets, $multisite );
83
+
84
+ if ( 0 === $ids_count ) {
85
+ wp_cache_set( "all_snippets_$table_name", $snippets, CACHE_GROUP );
86
  }
87
  }
88
 
89
+ // If a list of IDs are provided, narrow down the snippets list.
90
+ if ( $ids_count > 0 ) {
91
+ return array_filter(
92
+ $snippets,
93
+ function ( Snippet $snippet ) use ( $ids ) {
94
+ return in_array( $snippet->id, $ids, true );
 
 
 
 
95
  }
96
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97
  }
98
 
99
  return $snippets;
101
 
102
  /**
103
  * Gets all used tags from the database.
104
+ * Read operation.
105
  *
106
  * @since 2.0
107
  */
108
  function get_all_snippet_tags() {
109
  global $wpdb;
110
+ $table_name = code_snippets()->db->get_table_name();
111
+ $cache_key = "all_snippet_tags_$table_name";
112
 
113
+ $tags = wp_cache_get( $cache_key, CACHE_GROUP );
114
  if ( $tags ) {
115
  return $tags;
116
  }
117
 
118
+ // Grab all tags from the database.
119
  $tags = array();
120
+ $all_tags = $wpdb->get_col( "SELECT tags FROM $table_name" ); // db call ok.
 
121
 
122
+ // Merge all tags into a single array.
123
  foreach ( $all_tags as $snippet_tags ) {
124
  $snippet_tags = code_snippets_build_tags_array( $snippet_tags );
125
  $tags = array_merge( $snippet_tags, $tags );
126
  }
127
 
128
+ // Remove duplicate tags.
129
  $tags = array_values( array_unique( $tags, SORT_REGULAR ) );
130
+ wp_cache_set( $cache_key, $tags, CACHE_GROUP );
131
  return $tags;
132
  }
133
 
142
  */
143
  function code_snippets_build_tags_array( $tags ) {
144
 
145
+ /* If there are no tags set, return an empty array. */
146
  if ( empty( $tags ) ) {
147
  return array();
148
  }
149
 
150
+ /* If the tags are set as a string, convert them into an array. */
151
  if ( is_string( $tags ) ) {
152
  $tags = wp_strip_all_tags( $tags );
153
  $tags = str_replace( ', ', ',', $tags );
154
  $tags = explode( ',', $tags );
155
  }
156
 
157
+ /* If we still don't have an array, just convert whatever we do have into one. */
 
158
  return (array) $tags;
159
  }
160
 
161
  /**
162
  * Retrieve a single snippets from the database.
163
  * Will return empty snippet object if no snippet ID is specified.
164
+ * Read operation.
165
  *
166
  * @param int $id The ID of the snippet to retrieve. 0 to build a new snippet.
167
  * @param boolean|null $multisite Retrieve a multisite-wide snippet (true) or site-wide snippet (false).
173
  global $wpdb;
174
 
175
  $id = absint( $id );
176
+ $multisite = DB::validate_network_param( $multisite );
177
+ $table_name = code_snippets()->db->get_table_name( $multisite );
178
 
179
+ if ( 0 === $id ) {
180
+ // If an invalid ID is provided, then return an empty snippet object.
181
+ $snippet = new Snippet();
 
 
 
182
 
183
+ } else {
184
+ $cached_snippets = wp_cache_get( "all_snippets_$table_name", CACHE_GROUP );
185
 
186
+ // Attempt to fetch snippet from the cached list, if it exists.
187
+ if ( is_array( $cached_snippets ) ) {
188
+ foreach ( $cached_snippets as $snippet ) {
189
+ if ( $snippet->id === $id ) {
190
+ return apply_filters( 'code_snippets/get_snippet', $snippet, $id, $multisite );
191
+ }
192
+ }
193
+ }
194
 
195
+ // Otherwise, retrieve the snippet from the database.
196
+ $snippet = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $table_name WHERE id = %d", $id ) ); // cache pass, db call ok.
197
  $snippet = new Snippet( $snippet );
 
 
 
 
 
198
  }
199
 
200
  $snippet->network = $multisite;
201
+ return apply_filters( 'code_snippets/get_snippet', $snippet, $id, $multisite );
 
 
 
202
  }
203
 
204
  /**
205
+ * Activates a snippet.
206
+ * Write operation.
207
  *
208
  * @param int $id ID of the snippet to activate.
209
  * @param bool|null $multisite Whether the snippets are multisite-wide (true) or site-wide (false).
214
  function activate_snippet( $id, $multisite = null ) {
215
  global $wpdb;
216
  $db = code_snippets()->db;
217
+ $table_name = $db->get_table_name( $multisite );
 
 
 
 
 
 
 
 
 
218
 
219
+ // Retrieve the snippet code from the database for validation before activating.
220
+ $snippet = get_snippet( $id );
221
+ if ( ! $snippet ) {
222
  return false;
223
  }
224
 
225
+ $validator = new Validator( $snippet->code );
226
  if ( $validator->validate() ) {
227
  return false;
228
  }
229
 
230
+ $wpdb->update(
231
+ $table_name,
232
+ array( 'active' => '1' ),
233
+ array( 'id' => $id ),
234
+ array( '%d' ),
235
+ array( '%d' )
236
+ ); // db call ok.
237
 
238
  /* Remove snippet from shared network snippet list if it was Network Activated */
239
+ if ( $table_name === $db->ms_table ) {
240
  $shared_network_snippets = get_site_option( 'shared_network_snippets' );
241
  if ( $shared_network_snippets ) {
242
  $shared_network_snippets = array_diff( $shared_network_snippets, array( $id ) );
245
  }
246
 
247
  do_action( 'code_snippets/activate_snippet', $id, $multisite );
248
+ clean_snippets_cache( $table_name );
249
  return true;
250
  }
251
 
252
  /**
253
  * Activates multiple snippets.
254
+ * Write operation.
255
  *
256
  * @param array $ids The IDs of the snippets to activate.
257
  * @param bool|null $multisite Whether the snippets are multisite-wide (true) or site-wide (false).
263
  function activate_snippets( array $ids, $multisite = null ) {
264
  global $wpdb;
265
  $db = code_snippets()->db;
266
+ $multisite = DB::validate_network_param( $multisite );
267
+ $table_name = $db->get_table_name( $multisite );
268
+ $snippets = get_snippets( $ids, $multisite );
269
 
270
+ if ( ! $snippets ) {
 
 
 
 
271
  return array();
272
  }
273
 
274
+ // Loop through each snippet code and validate individually.
275
  $valid_ids = array();
276
 
277
+ foreach ( $snippets as $snippet ) {
278
+ $validator = new Validator( $snippet->code );
279
  $code_error = $validator->validate();
280
 
281
  if ( ! $code_error ) {
282
+ $valid_ids[] = $snippet->id;
283
  }
284
  }
285
 
286
+ // If there are no valid snippets, then we're done.
287
  if ( ! $valid_ids ) {
288
  return $valid_ids;
289
  }
290
 
291
+ // Build a SQL query containing all IDs, as wpdb::update does not support OR conditionals.
292
  $ids_format = implode( ',', array_fill( 0, count( $valid_ids ), '%d' ) );
293
+ // phpcs:disable WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare
294
+ $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET active = 1 WHERE id IN ($ids_format)", $valid_ids ) ); // db call ok.
295
 
296
+ // Remove any snippets from shared network snippet list if they were Network Activated.
297
+ if ( $table_name === $db->ms_table ) {
298
  $shared_network_snippets = get_site_option( 'shared_network_snippets' );
299
+
300
  if ( $shared_network_snippets ) {
301
  $shared_network_snippets = array_diff( $shared_network_snippets, $valid_ids );
302
  update_site_option( 'shared_network_snippets', $shared_network_snippets );
303
+ clean_active_snippets_cache( $db->ms_table );
304
  }
305
  }
306
 
307
  do_action( 'code_snippets/activate_snippets', $valid_ids, $multisite );
308
+ clean_snippets_cache( $table_name );
309
  return $valid_ids;
310
  }
311
 
312
  /**
313
+ * Deactivate a snippet.
314
+ * Write operation.
315
  *
316
  * @param int $id ID of the snippet to deactivate.
317
  * @param bool|null $multisite Whether the snippets are multisite-wide (true) or site-wide (false).
318
  *
319
+ * @uses $wpdb to set the snippets' active status.
320
  * @since 2.0.0
321
  */
322
  function deactivate_snippet( $id, $multisite = null ) {
324
  $db = code_snippets()->db;
325
  $table = $db->get_table_name( $multisite );
326
 
327
+ // Set the snippet to active.
 
 
328
  $wpdb->update(
329
  $table,
330
  array( 'active' => '0' ),
331
  array( 'id' => $id ),
332
  array( '%d' ),
333
  array( '%d' )
334
+ ); // db call ok.
 
 
335
 
336
+ // Update the recently active list.
337
  $recently_active = array( $id => time() );
338
 
339
  if ( $table === $db->table ) {
342
  'recently_activated_snippets',
343
  $recently_active + (array) get_option( 'recently_activated_snippets', array() )
344
  );
 
345
  } elseif ( $table === $db->ms_table ) {
346
 
347
  update_site_option(
351
  }
352
 
353
  do_action( 'code_snippets/deactivate_snippet', $id, $multisite );
354
+ clean_snippets_cache( $table );
355
  }
356
 
357
  /**
358
+ * Deletes a snippet from the database.
359
+ * Write operation.
360
  *
361
  * @param int $id ID of the snippet to delete.
362
  * @param bool|null $multisite Delete from network-wide (true) or site-wide (false) table.
365
  */
366
  function delete_snippet( $id, $multisite = null ) {
367
  global $wpdb;
368
+ $table = code_snippets()->db->get_table_name( $multisite );
369
 
 
370
  $wpdb->delete(
371
+ $table,
372
  array( 'id' => $id ),
373
  array( '%d' )
374
+ ); // db call ok.
375
 
376
  do_action( 'code_snippets/delete_snippet', $id, $multisite );
377
+ clean_snippets_cache( $table );
378
  }
379
 
380
  /**
381
  * Saves a snippet to the database.
382
+ * Write operation.
383
  *
384
  * @param Snippet $snippet The snippet to add/update to the database.
385
  *
386
  * @return int ID of the snippet
387
  *
388
  * @since 2.0.0
 
 
389
  */
390
  function save_snippet( Snippet $snippet ) {
391
  global $wpdb;
 
392
  $table = code_snippets()->db->get_table_name( $snippet->network );
393
 
394
+ // Update the last modification date if necessary.
395
  $snippet->update_modified();
396
 
397
+ // Build array of data to insert.
398
  $data = array(
399
  'name' => $snippet->name,
400
  'description' => $snippet->desc,
406
  'modified' => $snippet->modified,
407
  );
408
 
409
+ // Create a new snippet if the ID is not set.
410
  if ( 0 === $snippet->id ) {
411
+ $wpdb->insert( $table, $data, '%s' ); // db call ok.
412
  $snippet->id = $wpdb->insert_id;
413
 
414
  do_action( 'code_snippets/create_snippet', $snippet->id, $table );
415
  } else {
416
 
417
+ // Otherwise, update the snippet data.
418
+ $wpdb->update( $table, $data, array( 'id' => $snippet->id ), null, array( '%d' ) ); // db call ok.
419
 
420
  do_action( 'code_snippets/update_snippet', $snippet->id, $table );
421
  }
422
 
423
+ clean_snippets_cache( $table );
424
  return $snippet->id;
425
  }
426
 
427
  /**
428
+ * Update a snippet entry given a list of fields.
429
+ * Write operation.
430
  *
431
  * @param int $snippet_id ID of the snippet to update.
432
  * @param array $fields An array of fields mapped to their values.
433
+ * @param bool|null $network Update in network-wide (true) or site-wide (false) table.
434
  */
435
  function update_snippet_fields( $snippet_id, $fields, $network = null ) {
436
  global $wpdb;
437
 
438
  $table = code_snippets()->db->get_table_name( $network );
439
 
440
+ // Build a new snippet object for the validation.
441
  $snippet = new Snippet();
442
  $snippet->id = $snippet_id;
443
 
444
+ // Validate fields through the snippet class and copy them into a clean array.
445
  $clean_fields = array();
446
 
447
  foreach ( $fields as $field => $value ) {
451
  }
452
  }
453
 
454
+ // Update the snippet in the database.
455
+ $wpdb->update( $table, $clean_fields, array( 'id' => $snippet->id ), null, array( '%d' ) ); // db call ok.
456
+
457
  do_action( 'code_snippets/update_snippet', $snippet->id, $table );
458
+ clean_snippets_cache( $table );
459
  }
460
 
461
  /**
462
+ * Execute a snippet.
463
+ * Execute operation.
464
  *
465
  * Code must NOT be escaped, as it will be executed directly.
466
  *
493
  }
494
 
495
  /**
496
+ * Run the active snippets.
497
+ * Read-write-execute operation.
498
  *
499
+ * @return bool true on success, false on failure.
500
  *
501
  * @since 2.0.0
 
 
502
  */
503
  function execute_active_snippets() {
504
  global $wpdb;
505
 
506
+ // Bail early if safe mode is active.
507
  if ( defined( 'CODE_SNIPPETS_SAFE_MODE' ) && CODE_SNIPPETS_SAFE_MODE || ! apply_filters( 'code_snippets/execute_snippets', true ) ) {
508
  return false;
509
  }
510
 
511
  $db = code_snippets()->db;
512
  $scopes = array( 'global', 'single-use', is_admin() ? 'admin' : 'front-end' );
513
+ $data = $db->fetch_active_snippets( $scopes );
 
514
 
515
  foreach ( $data as $table_name => $active_snippets ) {
516
 
517
+ // Loop through the returned snippets and execute the PHP code.
518
  foreach ( $active_snippets as $snippet ) {
519
  $snippet_id = intval( $snippet['id'] );
520
  $code = $snippet['code'];
521
 
522
+ // If the snippet is a single-use snippet, deactivate it before execution to ensure that the process always happens.
523
  if ( 'single-use' === $snippet['scope'] ) {
524
+ $active_shared_ids = get_option( 'active_shared_network_snippets', array() );
525
+
526
+ if ( $table_name === $db->ms_table && is_array( $active_shared_ids ) && in_array( $snippet_id, $active_shared_ids, true ) ) {
527
  unset( $active_shared_ids[ array_search( $snippet_id, $active_shared_ids, true ) ] );
528
  $active_shared_ids = array_values( $active_shared_ids );
529
  update_option( 'active_shared_network_snippets', $active_shared_ids );
530
+ clean_active_snippets_cache( $table_name );
531
  } else {
532
+ $wpdb->update(
533
+ $table_name,
534
+ array( 'active' => '0' ),
535
+ array( 'id' => $snippet_id ),
536
+ array( '%d' ),
537
+ array( '%d' )
538
+ ); // db call ok.
539
+ clean_snippets_cache( $table_name );
540
  }
541
  }
542
 
php/views/edit.php CHANGED
@@ -33,7 +33,8 @@ if ( ! $snippet->id ) {
33
 
34
  if ( $snippet->id ) {
35
  esc_html_e( 'Edit Snippet', 'code-snippets' );
36
- printf( ' <a href="%1$s" class="page-title-action add-new-h2">%2$s</a>',
 
37
  esc_url( add_query_arg( 'type', $snippet->type, code_snippets()->get_menu_url( 'add' ) ) ),
38
  esc_html_x( 'Add New', 'snippet', 'code-snippets' )
39
  );
@@ -81,7 +82,8 @@ if ( ! $snippet->id ) {
81
 
82
  <h2>
83
  <label for="snippet_code">
84
- <?php esc_html_e( 'Code', 'code-snippets' );
 
85
 
86
  if ( $snippet->id ) {
87
  printf( ' <span class="snippet-type-badge" data-type="%s">%s</span>', esc_attr( $snippet->type ), esc_html( $snippet->type ) );
33
 
34
  if ( $snippet->id ) {
35
  esc_html_e( 'Edit Snippet', 'code-snippets' );
36
+ printf(
37
+ ' <a href="%1$s" class="page-title-action add-new-h2">%2$s</a>',
38
  esc_url( add_query_arg( 'type', $snippet->type, code_snippets()->get_menu_url( 'add' ) ) ),
39
  esc_html_x( 'Add New', 'snippet', 'code-snippets' )
40
  );
82
 
83
  <h2>
84
  <label for="snippet_code">
85
+ <?php
86
+ esc_html_e( 'Code', 'code-snippets' );
87
 
88
  if ( $snippet->id ) {
89
  printf( ' <span class="snippet-type-badge" data-type="%s">%s</span>', esc_attr( $snippet->type ), esc_html( $snippet->type ) );
php/views/manage.php CHANGED
@@ -43,18 +43,21 @@ $current_type = isset( $types[ $current_type ] ) ? $current_type : 'all';
43
  if ( $type_name === $current_type ) {
44
  printf( '<a class="nav-tab nav-tab-active" data-type="%s">', esc_attr( $type_name ) );
45
  } else {
46
- printf( '<a class="nav-tab" href="%s" data-type="%s">',
 
47
  esc_url( add_query_arg( 'type', $type_name ) ),
48
  esc_attr( $type_name )
49
  );
50
  }
51
 
52
- echo esc_html( $label ), 'all' === $type_name ? '' : ' <span>' . esc_html( $type_name ) . '</span>', '</a>';
53
  }
54
 
55
  ?>
56
- <a class="button button-large nav-tab-button go-pro-button" href="https://codesnippets.pro" target="_blank">
57
- <?php echo wp_kses( __( 'Go <span>Pro</span>', 'code-snippets' ), [ 'span' => [] ] ); ?>
 
 
58
  </a>
59
  </h2>
60
 
43
  if ( $type_name === $current_type ) {
44
  printf( '<a class="nav-tab nav-tab-active" data-type="%s">', esc_attr( $type_name ) );
45
  } else {
46
+ printf(
47
+ '<a class="nav-tab" href="%s" data-type="%s">',
48
  esc_url( add_query_arg( 'type', $type_name ) ),
49
  esc_attr( $type_name )
50
  );
51
  }
52
 
53
+ echo esc_html( $label ), 'all' === $type_name ? '' : ' <span class="badge">' . esc_html( $type_name ) . '</span>', '</a>';
54
  }
55
 
56
  ?>
57
+ <a class="button button-large nav-tab-button go-pro-button" href="https://codesnippets.pro" target="_blank"
58
+ title="Find more about Pro (opens in external tab)">
59
+ <?php echo wp_kses( __( 'Go <span class="badge">Pro</span>', 'code-snippets' ), [ 'span' => [ 'class' => 'badge' ] ] ); ?>
60
+ <span class="dashicons dashicons-external"></span>
61
  </a>
62
  </h2>
63
 
php/views/partials/edit-scopes.php CHANGED
@@ -80,7 +80,8 @@ if ( ! $snippet->id || 'html' === $snippet->type ) {
80
  $shortcode_atts .= ' php=true';
81
  }
82
 
83
- printf( '<p>' . esc_html( $text ) . '</p>',
 
84
  '<code class="shortcode-tag">[code_snippet' . esc_html( $shortcode_atts ) . ']</code>'
85
  );
86
 
@@ -101,7 +102,10 @@ if ( ! $snippet->id || 'html' === $snippet->type ) {
101
  <?php esc_html_e( 'Evaluate additional shortcode tags', 'code-snippets' ); ?>
102
  </label>
103
  </p>
104
- <?php }
105
- } ?>
 
 
106
  </div>
107
- <?php }
 
80
  $shortcode_atts .= ' php=true';
81
  }
82
 
83
+ printf(
84
+ '<p>' . esc_html( $text ) . '</p>',
85
  '<code class="shortcode-tag">[code_snippet' . esc_html( $shortcode_atts ) . ']</code>'
86
  );
87
 
102
  <?php esc_html_e( 'Evaluate additional shortcode tags', 'code-snippets' ); ?>
103
  </label>
104
  </p>
105
+ <?php
106
+ }
107
+ }
108
+ ?>
109
  </div>
110
+ <?php
111
+ }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://codesnippets.pro
4
  Tags: snippets, functions, multisite, code, php, html, css, javascript
5
  License: MIT
6
  License URI: license.txt
7
- Stable tag: 3.0.1
8
  Tested up to: 6.0
9
 
10
  An easy, clean and simple way to run code snippets on your site.
@@ -116,6 +116,13 @@ The best way to do this is to fork the [repository on GitHub](https://github.com
116
 
117
  == Changelog ==
118
 
 
 
 
 
 
 
 
119
  = 3.0.1 (14 May 2022) =
120
  * Fixed: Incompatibility issue with earlier versions of PHP.
121
 
@@ -283,11 +290,14 @@ __New in Pro__
283
 
284
  == Upgrade Notice ==
285
 
 
 
 
286
  = 2.14.2 =
287
  New color picker and code validator improvements.
288
 
289
  = 2.14.0 =
290
- Security update, last modified dates, and other improvements
291
 
292
  = 2.13.1 =
293
- Fixes for single-use snippets and French translation
4
  Tags: snippets, functions, multisite, code, php, html, css, javascript
5
  License: MIT
6
  License URI: license.txt
7
+ Stable tag: 3.1.0
8
  Tested up to: 6.0
9
 
10
  An easy, clean and simple way to run code snippets on your site.
116
 
117
  == Changelog ==
118
 
119
+ = 3.1.0 (17 May 2022) =
120
+ * Fixed: Caching inconsistencies preventing snippets and settings from refreshing on sites with persistent object caching.
121
+ * Improved: Simplified database queries.
122
+ * Added: More comprehensive cache coverage, including for active snippets.
123
+ * Added: Icon to 'Go Pro' button indicating it opens an external tab.
124
+ * Improved: Allow display styles in snippet descriptions.
125
+
126
  = 3.0.1 (14 May 2022) =
127
  * Fixed: Incompatibility issue with earlier versions of PHP.
128
 
290
 
291
  == Upgrade Notice ==
292
 
293
+ = 3.1.0 =
294
+ Comprehensive persistent object caching support.
295
+
296
  = 2.14.2 =
297
  New color picker and code validator improvements.
298
 
299
  = 2.14.0 =
300
+ Security update, last modified dates, and other improvements.
301
 
302
  = 2.13.1 =
303
+ Fixes for single-use snippets and French translation.
uninstall.php CHANGED
@@ -8,7 +8,7 @@
8
 
9
  namespace Code_Snippets;
10
 
11
- /* Ensure this plugin is actually being uninstalled */
12
  if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
13
  return;
14
  }
@@ -34,13 +34,12 @@ function complete_uninstall_enabled() {
34
  /**
35
  * Clean up data created by this plugin for a single site
36
  *
37
- * @phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange
38
- * @phpcs:disable WordPress.DB.DirectDatabaseQuery.NoCaching
39
  */
40
  function uninstall_current_site() {
41
  global $wpdb;
42
 
43
- $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}snippets" );
44
 
45
  delete_option( 'code_snippets_version' );
46
  delete_option( 'recently_activated_snippets' );
@@ -50,29 +49,25 @@ function uninstall_current_site() {
50
  /**
51
  * Clean up data created by this plugin on multisite.
52
  *
53
- * @phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange
54
- * @phpcs:disable WordPress.DB.DirectDatabaseQuery.NoCaching
55
  */
56
  function uninstall_multisite() {
57
  global $wpdb;
58
 
59
- /* Loop through sites */
60
- $blog_ids = $wpdb->get_col( "SELECT blog_id FROM {$wpdb->blogs}" );
61
 
62
- if ( $blog_ids ) {
63
-
64
- foreach ( $blog_ids as $site_id ) {
65
- switch_to_blog( $site_id );
66
- uninstall_current_site();
67
- }
68
-
69
- restore_current_blog();
70
  }
71
 
72
- /* Remove multisite snippets database table */
73
- $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}ms_snippets" );
 
 
74
 
75
- /* Remove saved options */
76
  delete_site_option( 'code_snippets_version' );
77
  delete_site_option( 'recently_activated_snippets' );
78
  }
8
 
9
  namespace Code_Snippets;
10
 
11
+ // Ensure this plugin is actually being uninstalled.
12
  if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
13
  return;
14
  }
34
  /**
35
  * Clean up data created by this plugin for a single site
36
  *
37
+ * phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange
 
38
  */
39
  function uninstall_current_site() {
40
  global $wpdb;
41
 
42
+ $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}snippets" ); // cache ok, db call ok.
43
 
44
  delete_option( 'code_snippets_version' );
45
  delete_option( 'recently_activated_snippets' );
49
  /**
50
  * Clean up data created by this plugin on multisite.
51
  *
52
+ * phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange
 
53
  */
54
  function uninstall_multisite() {
55
  global $wpdb;
56
 
57
+ // Loop through sites.
58
+ $blog_ids = get_sites( [ 'fields' => 'ids' ] );
59
 
60
+ foreach ( $blog_ids as $site_id ) {
61
+ switch_to_blog( $site_id );
62
+ uninstall_current_site();
 
 
 
 
 
63
  }
64
 
65
+ restore_current_blog();
66
+
67
+ // Remove network snippets table.
68
+ $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}ms_snippets" ); // cache ok, db call ok.
69
 
70
+ // Remove saved options.
71
  delete_site_option( 'code_snippets_version' );
72
  delete_site_option( 'recently_activated_snippets' );
73
  }
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit649e9e177c689de3ab9aa02e8f413fcd::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitb475852799142ba9b09480fd5fe99bc2::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit649e9e177c689de3ab9aa02e8f413fcd
6
  {
7
  private static $loader;
8
 
@@ -24,15 +24,15 @@ class ComposerAutoloaderInit649e9e177c689de3ab9aa02e8f413fcd
24
 
25
  require __DIR__ . '/platform_check.php';
26
 
27
- spl_autoload_register(array('ComposerAutoloaderInit649e9e177c689de3ab9aa02e8f413fcd', 'loadClassLoader'), true, true);
28
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
29
- spl_autoload_unregister(array('ComposerAutoloaderInit649e9e177c689de3ab9aa02e8f413fcd', 'loadClassLoader'));
30
 
31
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
32
  if ($useStaticLoader) {
33
  require __DIR__ . '/autoload_static.php';
34
 
35
- call_user_func(\Composer\Autoload\ComposerStaticInit649e9e177c689de3ab9aa02e8f413fcd::getInitializer($loader));
36
  } else {
37
  $map = require __DIR__ . '/autoload_namespaces.php';
38
  foreach ($map as $namespace => $path) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInitb475852799142ba9b09480fd5fe99bc2
6
  {
7
  private static $loader;
8
 
24
 
25
  require __DIR__ . '/platform_check.php';
26
 
27
+ spl_autoload_register(array('ComposerAutoloaderInitb475852799142ba9b09480fd5fe99bc2', 'loadClassLoader'), true, true);
28
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
29
+ spl_autoload_unregister(array('ComposerAutoloaderInitb475852799142ba9b09480fd5fe99bc2', 'loadClassLoader'));
30
 
31
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
32
  if ($useStaticLoader) {
33
  require __DIR__ . '/autoload_static.php';
34
 
35
+ call_user_func(\Composer\Autoload\ComposerStaticInitb475852799142ba9b09480fd5fe99bc2::getInitializer($loader));
36
  } else {
37
  $map = require __DIR__ . '/autoload_namespaces.php';
38
  foreach ($map as $namespace => $path) {
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit649e9e177c689de3ab9aa02e8f413fcd
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'C' =>
@@ -46,9 +46,9 @@ class ComposerStaticInit649e9e177c689de3ab9aa02e8f413fcd
46
  public static function getInitializer(ClassLoader $loader)
47
  {
48
  return \Closure::bind(function () use ($loader) {
49
- $loader->prefixLengthsPsr4 = ComposerStaticInit649e9e177c689de3ab9aa02e8f413fcd::$prefixLengthsPsr4;
50
- $loader->prefixDirsPsr4 = ComposerStaticInit649e9e177c689de3ab9aa02e8f413fcd::$prefixDirsPsr4;
51
- $loader->classMap = ComposerStaticInit649e9e177c689de3ab9aa02e8f413fcd::$classMap;
52
 
53
  }, null, ClassLoader::class);
54
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInitb475852799142ba9b09480fd5fe99bc2
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'C' =>
46
  public static function getInitializer(ClassLoader $loader)
47
  {
48
  return \Closure::bind(function () use ($loader) {
49
+ $loader->prefixLengthsPsr4 = ComposerStaticInitb475852799142ba9b09480fd5fe99bc2::$prefixLengthsPsr4;
50
+ $loader->prefixDirsPsr4 = ComposerStaticInitb475852799142ba9b09480fd5fe99bc2::$prefixDirsPsr4;
51
+ $loader->classMap = ComposerStaticInitb475852799142ba9b09480fd5fe99bc2::$classMap;
52
 
53
  }, null, ClassLoader::class);
54
  }
vendor/composer/installed.php CHANGED
@@ -5,7 +5,7 @@
5
  'type' => 'wordpress-plugin',
6
  'install_path' => __DIR__ . '/../../',
7
  'aliases' => array(),
8
- 'reference' => 'ce96c6b2d0dc32bd04dbc899a7cb9278d89f78c0',
9
  'name' => 'sheabunge/code-snippets',
10
  'dev' => false,
11
  ),
@@ -37,7 +37,7 @@
37
  'type' => 'wordpress-plugin',
38
  'install_path' => __DIR__ . '/../../',
39
  'aliases' => array(),
40
- 'reference' => 'ce96c6b2d0dc32bd04dbc899a7cb9278d89f78c0',
41
  'dev_requirement' => false,
42
  ),
43
  ),
5
  'type' => 'wordpress-plugin',
6
  'install_path' => __DIR__ . '/../../',
7
  'aliases' => array(),
8
+ 'reference' => '8808252dc54b5200c8a283297b71ed23e9b5bd39',
9
  'name' => 'sheabunge/code-snippets',
10
  'dev' => false,
11
  ),
37
  'type' => 'wordpress-plugin',
38
  'install_path' => __DIR__ . '/../../',
39
  'aliases' => array(),
40
+ 'reference' => '8808252dc54b5200c8a283297b71ed23e9b5bd39',
41
  'dev_requirement' => false,
42
  ),
43
  ),