Converter for Media – Optimize images | Convert WebP & AVIF - Version 4.3.1

Version Description

(2022-04-05) = * [Fixed] Generating rewrite rules for via .htaccess loading mode

Download this release

Release Info

Developer mateuszgbiorczyk
Plugin Icon 128x128 Converter for Media – Optimize images | Convert WebP & AVIF
Version 4.3.1
Comparing to
See all releases

Code changes from version 4.3.0 to 4.3.1

assets/build/css/styles.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";@keyframes dotsLoading{0%,to{content:"..."}25%{content:" .."}50%{content:". ."}75%{content:".. "}}@font-face{font-family:webpc-icomoon;font-style:normal;font-weight:400;src:url(../../fonts/icons/icomoon.eot?ver=18738673);src:url(../../fonts/icons/icomoon.woff?ver=18738673) format("woff"),url(../../fonts/icons/icomoon.eot?ver=18738673#iefix) format("embedded-opentype"),url(../../fonts/icons/icomoon.ttf?ver=18738673) format("truetype"),url(../../fonts/icons/icomoon.svg?ver=18738673#icomoon) format("svg")}.icon-logo:before{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\e900"!important;font-family:webpc-icomoon!important;font-style:normal;font-variant:normal;font-weight:400;text-transform:none}.webpPage{color:#101517;margin:0;overflow:hidden;padding:0 20px 0 0}.webpPage *,.webpPage :after,.webpPage :before{box-sizing:border-box;margin:0;padding:0}.webpPage [hidden]{display:none!important}.webpPage .webpPage__headline{font-size:24px;line-height:1.2083333333;margin:0;padding:15px 0 23px}.webpPage__alert{background-color:#00a32a;color:#fff;font-size:14px;line-height:1.5714285714;margin-bottom:30px;padding:15px 20px}.webpPage__columns{margin:0 -30px;overflow:hidden}.webpPage__column{float:left;padding:0 30px}.webpPage__column--large{width:66.666%}.webpPage__column--small{width:33.333%}.webpPage__widget{background-color:#fff}.webpPage__widget+.webpPage__widget{margin-top:60px}.webpPage__widgetTitle{background-color:#2271b1;color:#fff;font-size:16px;font-weight:400;line-height:1.5;padding:14px 30px}.webpPage__widgetTitle--second{background-color:#a7aaad}.webpPage__widgetTitle--error{background-color:#d63638}.webpPage__widgetRow{padding-bottom:10px}.webpPage__widgetRow:last-child{padding-bottom:0}.webpPage__widgetRow .webpButton{margin:10px 0}.webpPage__widgetColumns{display:flex;flex-wrap:wrap;margin:0 -10px}.webpPage__widgetColumn{padding:0 10px;width:50%}.webpPage__widgetColumn:first-child:last-child{flex:1}.webpPage__widgetColumnNotice{background-color:#2271b1;margin:10px 0;padding:10px 20px}.webpPage__widgetColumnNotice p{color:#fff;font-size:1.2rem}.webpPage__widgetColumnNotice p+p{margin-top:0}.webpPage__widgetColumnNotice p a{color:inherit;font-weight:500;letter-spacing:1px;text-decoration:none;text-transform:uppercase}.webpPage__quality{border:1px solid #c3c4c7;display:flex;flex-wrap:wrap;margin:10px 0}.webpPage__qualityItem{border-left:1px solid #c3c4c7;flex:1;margin-left:-1px;text-align:center}.webpPage__qualityItemInput{display:none!important}.webpPage__qualityItemLabel{display:block;font-size:14px;line-height:1.5714285714;padding:14px 20px;position:relative;transition:color .3s,background-color .3s}.webpPage__qualityItemInput:checked+.webpPage__qualityItemLabel{background-color:#00a32a;color:#fff;margin:-1px;padding:15px 21px}.webpPage__qualityItemInput[disabled]+.webpPage__qualityItemLabel{opacity:0;pointer-events:none}#wp-admin-bar-webpc-menu .ab-icon:before{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\e900"!important;font-family:webpc-icomoon!important;font-style:normal;font-variant:normal;font-weight:400;text-transform:none}.notice[data-notice=webp-converter]{margin-top:20px;padding:0}.webpButton{background-color:#fff;border:1px solid transparent;box-shadow:none!important;box-sizing:border-box;cursor:pointer;display:inline-block;font-size:14px;font-weight:500;line-height:1.5714285714;min-width:180px;opacity:1!important;outline:none!important;padding:9px 30px;position:relative;text-align:center;text-decoration:none!important;transition:color .3s!important;z-index:10}p>.webpButton{margin:6px 0}.webpButton:before{float:left;font-family:dashicons;font-size:20px;line-height:1.1;margin-right:10px}.webpButton:after{content:"";height:100%;left:0;position:absolute;top:0;transition:width .3s;width:0;z-index:-1}.webpButton:hover:after{width:100%}.webpButton[disabled]{opacity:.5!important;pointer-events:none}.webpButton--blue:hover,.webpButton--gray:hover,.webpButton--green:hover,.webpButton--red:hover{color:#fff!important}.webpButton--blue{border-color:#2271b1;color:#2271b1!important}.webpButton--blue.webpButton--bg,.webpButton--blue:after{background-color:#2271b1}.webpButton--blue.webpButton--bg:after{background-color:#135e96}.webpButton--green{border-color:#00a32a;color:#00a32a!important}.webpButton--green.webpButton--bg,.webpButton--green:after{background-color:#00a32a}.webpButton--green.webpButton--bg:after{background-color:#008a20}.webpButton--red{border-color:#d63638;color:#d63638!important}.webpButton--red.webpButton--bg,.webpButton--red:after{background-color:#d63638}.webpButton--red.webpButton--bg:after{background-color:#b32d2e}.webpButton--gray{border-color:#c3c4c7;color:#c3c4c7!important}.webpButton--gray.webpButton--bg,.webpButton--gray:after{background-color:#c3c4c7}.webpButton--gray.webpButton--bg:after{background-color:#a7aaad}.webpButton--bg{color:#fff!important;font-weight:400}.webpContent{padding:20px 30px}.webpContent p{font-size:14px;line-height:1.5714285714;max-width:800px}.webpContent p.center{text-align:center}.webpContent--wide p{max-width:100%}.webpContent a{box-shadow:none;color:#2271b1;outline:none;text-decoration:underline;transition:opacity .3s}.webpContent a:hover{opacity:.5}.webpContent h1,.webpContent h2,.webpContent h3,.webpContent h4,.webpContent h5,.webpContent h6{font-size:16px;font-weight:500;line-height:1.5}.webpContent h1,.webpContent h2,.webpContent h3,.webpContent h4,.webpContent h5,.webpContent h6,.webpContent p{margin:10px 0 0;padding:4px 0}.webpContent h1:first-child,.webpContent h2:first-child,.webpContent h3:first-child,.webpContent h4:first-child,.webpContent h5:first-child,.webpContent h6:first-child,.webpContent p:first-child,.webpContent p>p{margin-top:0}.webpInput+p{background-color:#f0f0f1;margin:0 0 10px;max-width:none;padding:14px 20px}.webpContent h1+p,.webpContent h2+p,.webpContent h3+p,.webpContent h4+p,.webpContent h5+p,.webpContent h6+p{font-size:12px;line-height:1.75;margin-top:0}.webpContent--notice h1+p,.webpContent--notice h2+p,.webpContent--notice h3+p,.webpContent--notice h4+p,.webpContent--notice h5+p,.webpContent--notice h6+p{font-size:14px;line-height:1.5714285714}.webpContent__buttons{margin-top:-10px;overflow:hidden;padding:10px 0}.webpContent__button{float:left;margin:20px 20px 0 0}.webpContent__button:last-child{margin-right:0}.webpField{display:flex;padding:10px 0}.webpField+.webpField{margin-top:-12px}.webpField__input{display:none!important}.webpField__input+label{display:inline-block;position:relative}.webpField__input[disabled]+label{pointer-events:none}.webpField__input[disabled]+label:after,.webpField__input[disabled]+label:before{opacity:.25}.webpField__input--checkbox+label,.webpField__input--radio+label{height:22px;width:22px}.webpField__input--checkbox+label:after,.webpField__input--checkbox+label:before,.webpField__input--radio+label:after,.webpField__input--radio+label:before{align-items:center;content:"";display:flex;height:22px;justify-content:center;left:0;position:absolute;top:0;width:22px}.webpField__input--checkbox+label:before,.webpField__input--radio+label:before{border:1px solid #c3c4c7}.webpField__input--checkbox+label:after,.webpField__input--radio+label:after{position:absolute;transform:scale(0);transition:transform .3s}.webpField__input--checkbox:checked+label:after,.webpField__input--radio:checked+label:after{transform:scale(1)}.webpField__input--checkbox+label:after{color:#00a32a;content:"\f147";font-family:dashicons;font-size:20px;line-height:1}.webpField__input--radio+label:before{border-radius:50%}.webpField__input--radio+label:after{background-color:#00a32a;border-radius:50%;content:"";height:6px;left:8px;top:8px;width:6px}.webpField__input--toggle+label{height:22px;width:44px}.webpField__input--toggle+label:after,.webpField__input--toggle+label:before{content:"";position:absolute}.webpField__input--toggle+label:before{background-color:#dcdcde;border:1px solid #c3c4c7;border-radius:11px;height:22px;left:0;top:0;transition:background-color .3s;width:44px}.webpField__input--toggle+label:after{background-color:#fff;border-radius:50%;height:16px;left:3px;position:absolute;top:3px;transition:transform .3s;width:16px}.webpField__input--toggle:checked+label:before{background-color:#00a32a}.webpField__input--toggle:checked+label:after{transform:translateX(22px)}.webpField__label{display:block;flex:1;font-size:14px;line-height:1.5714285714;margin-left:20px;max-width:650px;position:relative}.webpInput{align-items:center;display:flex;padding:10px 0}.webpInput__field{border:1px solid #c3c4c7!important;border-radius:0!important;box-shadow:none!important;flex:1;font-size:14px!important;line-height:1.5714285714!important;padding:9px 15px!important}.webpInput__field[readonly]{background-color:#f0f0f1}.webpInput__button{margin:0 0 0 10px!important}.webpLoader__status{padding:20px 0 10px;position:relative}.webpLoader__bar--hidden{display:none}.webpLoader__barProgress{font-size:0;height:21px;line-height:0;position:relative}.webpLoader__barProgress:before{background-color:#00a32a;content:"";height:100%;left:0;position:absolute;top:0;transition:width .3s;width:0}.webpLoader__barProgress--error:before{background-color:#d63638}.webpLoader__barProgress[data-percent="0"]:before{width:0}.webpLoader__barProgress[data-percent="1"]:before{width:1%}.webpLoader__barProgress[data-percent="2"]:before{width:2%}.webpLoader__barProgress[data-percent="3"]:before{width:3%}.webpLoader__barProgress[data-percent="4"]:before{width:4%}.webpLoader__barProgress[data-percent="5"]:before{width:5%}.webpLoader__barProgress[data-percent="6"]:before{width:6%}.webpLoader__barProgress[data-percent="7"]:before{width:7%}.webpLoader__barProgress[data-percent="8"]:before{width:8%}.webpLoader__barProgress[data-percent="9"]:before{width:9%}.webpLoader__barProgress[data-percent="10"]:before{width:10%}.webpLoader__barProgress[data-percent="11"]:before{width:11%}.webpLoader__barProgress[data-percent="12"]:before{width:12%}.webpLoader__barProgress[data-percent="13"]:before{width:13%}.webpLoader__barProgress[data-percent="14"]:before{width:14%}.webpLoader__barProgress[data-percent="15"]:before{width:15%}.webpLoader__barProgress[data-percent="16"]:before{width:16%}.webpLoader__barProgress[data-percent="17"]:before{width:17%}.webpLoader__barProgress[data-percent="18"]:before{width:18%}.webpLoader__barProgress[data-percent="19"]:before{width:19%}.webpLoader__barProgress[data-percent="20"]:before{width:20%}.webpLoader__barProgress[data-percent="21"]:before{width:21%}.webpLoader__barProgress[data-percent="22"]:before{width:22%}.webpLoader__barProgress[data-percent="23"]:before{width:23%}.webpLoader__barProgress[data-percent="24"]:before{width:24%}.webpLoader__barProgress[data-percent="25"]:before{width:25%}.webpLoader__barProgress[data-percent="26"]:before{width:26%}.webpLoader__barProgress[data-percent="27"]:before{width:27%}.webpLoader__barProgress[data-percent="28"]:before{width:28%}.webpLoader__barProgress[data-percent="29"]:before{width:29%}.webpLoader__barProgress[data-percent="30"]:before{width:30%}.webpLoader__barProgress[data-percent="31"]:before{width:31%}.webpLoader__barProgress[data-percent="32"]:before{width:32%}.webpLoader__barProgress[data-percent="33"]:before{width:33%}.webpLoader__barProgress[data-percent="34"]:before{width:34%}.webpLoader__barProgress[data-percent="35"]:before{width:35%}.webpLoader__barProgress[data-percent="36"]:before{width:36%}.webpLoader__barProgress[data-percent="37"]:before{width:37%}.webpLoader__barProgress[data-percent="38"]:before{width:38%}.webpLoader__barProgress[data-percent="39"]:before{width:39%}.webpLoader__barProgress[data-percent="40"]:before{width:40%}.webpLoader__barProgress[data-percent="41"]:before{width:41%}.webpLoader__barProgress[data-percent="42"]:before{width:42%}.webpLoader__barProgress[data-percent="43"]:before{width:43%}.webpLoader__barProgress[data-percent="44"]:before{width:44%}.webpLoader__barProgress[data-percent="45"]:before{width:45%}.webpLoader__barProgress[data-percent="46"]:before{width:46%}.webpLoader__barProgress[data-percent="47"]:before{width:47%}.webpLoader__barProgress[data-percent="48"]:before{width:48%}.webpLoader__barProgress[data-percent="49"]:before{width:49%}.webpLoader__barProgress[data-percent="50"]:before{width:50%}.webpLoader__barProgress[data-percent="51"]:before{width:51%}.webpLoader__barProgress[data-percent="52"]:before{width:52%}.webpLoader__barProgress[data-percent="53"]:before{width:53%}.webpLoader__barProgress[data-percent="54"]:before{width:54%}.webpLoader__barProgress[data-percent="55"]:before{width:55%}.webpLoader__barProgress[data-percent="56"]:before{width:56%}.webpLoader__barProgress[data-percent="57"]:before{width:57%}.webpLoader__barProgress[data-percent="58"]:before{width:58%}.webpLoader__barProgress[data-percent="59"]:before{width:59%}.webpLoader__barProgress[data-percent="60"]:before{width:60%}.webpLoader__barProgress[data-percent="61"]:before{width:61%}.webpLoader__barProgress[data-percent="62"]:before{width:62%}.webpLoader__barProgress[data-percent="63"]:before{width:63%}.webpLoader__barProgress[data-percent="64"]:before{width:64%}.webpLoader__barProgress[data-percent="65"]:before{width:65%}.webpLoader__barProgress[data-percent="66"]:before{width:66%}.webpLoader__barProgress[data-percent="67"]:before{width:67%}.webpLoader__barProgress[data-percent="68"]:before{width:68%}.webpLoader__barProgress[data-percent="69"]:before{width:69%}.webpLoader__barProgress[data-percent="70"]:before{width:70%}.webpLoader__barProgress[data-percent="71"]:before{width:71%}.webpLoader__barProgress[data-percent="72"]:before{width:72%}.webpLoader__barProgress[data-percent="73"]:before{width:73%}.webpLoader__barProgress[data-percent="74"]:before{width:74%}.webpLoader__barProgress[data-percent="75"]:before{width:75%}.webpLoader__barProgress[data-percent="76"]:before{width:76%}.webpLoader__barProgress[data-percent="77"]:before{width:77%}.webpLoader__barProgress[data-percent="78"]:before{width:78%}.webpLoader__barProgress[data-percent="79"]:before{width:79%}.webpLoader__barProgress[data-percent="80"]:before{width:80%}.webpLoader__barProgress[data-percent="81"]:before{width:81%}.webpLoader__barProgress[data-percent="82"]:before{width:82%}.webpLoader__barProgress[data-percent="83"]:before{width:83%}.webpLoader__barProgress[data-percent="84"]:before{width:84%}.webpLoader__barProgress[data-percent="85"]:before{width:85%}.webpLoader__barProgress[data-percent="86"]:before{width:86%}.webpLoader__barProgress[data-percent="87"]:before{width:87%}.webpLoader__barProgress[data-percent="88"]:before{width:88%}.webpLoader__barProgress[data-percent="89"]:before{width:89%}.webpLoader__barProgress[data-percent="90"]:before{width:90%}.webpLoader__barProgress[data-percent="91"]:before{width:91%}.webpLoader__barProgress[data-percent="92"]:before{width:92%}.webpLoader__barProgress[data-percent="93"]:before{width:93%}.webpLoader__barProgress[data-percent="94"]:before{width:94%}.webpLoader__barProgress[data-percent="95"]:before{width:95%}.webpLoader__barProgress[data-percent="96"]:before{width:96%}.webpLoader__barProgress[data-percent="97"]:before{width:97%}.webpLoader__barProgress[data-percent="98"]:before{width:98%}.webpLoader__barProgress[data-percent="99"]:before{width:99%}.webpLoader__barProgress[data-percent="100"]:before{width:100%}.webpLoader__barCount{background-color:#00a32a;color:#fff;display:inline-block;font-family:monospace;font-size:12px;line-height:1.75;padding:0 5px;position:relative}.webpLoader__barProgress--error .webpLoader__barCount{background-color:#d63638}.webpLoader__barCount:after{animation:dotsLoading 1s linear infinite;content:"...";margin-left:5px}.webpLoader__barProgress--error .webpLoader__barCount:after,.webpLoader__barProgress[data-percent="100"] .webpLoader__barCount:after{display:none}.webpLoader__barProgress[data-percent="0"] .webpLoader__barCount:before{content:"0%"}.webpLoader__barProgress[data-percent="1"] .webpLoader__barCount:before{content:"1%"}.webpLoader__barProgress[data-percent="2"] .webpLoader__barCount:before{content:"2%"}.webpLoader__barProgress[data-percent="3"] .webpLoader__barCount:before{content:"3%"}.webpLoader__barProgress[data-percent="4"] .webpLoader__barCount:before{content:"4%"}.webpLoader__barProgress[data-percent="5"] .webpLoader__barCount:before{content:"5%"}.webpLoader__barProgress[data-percent="6"] .webpLoader__barCount:before{content:"6%"}.webpLoader__barProgress[data-percent="7"] .webpLoader__barCount:before{content:"7%"}.webpLoader__barProgress[data-percent="8"] .webpLoader__barCount:before{content:"8%"}.webpLoader__barProgress[data-percent="9"] .webpLoader__barCount:before{content:"9%"}.webpLoader__barProgress[data-percent="10"] .webpLoader__barCount:before{content:"10%"}.webpLoader__barProgress[data-percent="11"] .webpLoader__barCount:before{content:"11%"}.webpLoader__barProgress[data-percent="12"] .webpLoader__barCount:before{content:"12%"}.webpLoader__barProgress[data-percent="13"] .webpLoader__barCount:before{content:"13%"}.webpLoader__barProgress[data-percent="14"] .webpLoader__barCount:before{content:"14%"}.webpLoader__barProgress[data-percent="15"] .webpLoader__barCount:before{content:"15%"}.webpLoader__barProgress[data-percent="16"] .webpLoader__barCount:before{content:"16%"}.webpLoader__barProgress[data-percent="17"] .webpLoader__barCount:before{content:"17%"}.webpLoader__barProgress[data-percent="18"] .webpLoader__barCount:before{content:"18%"}.webpLoader__barProgress[data-percent="19"] .webpLoader__barCount:before{content:"19%"}.webpLoader__barProgress[data-percent="20"] .webpLoader__barCount:before{content:"20%"}.webpLoader__barProgress[data-percent="21"] .webpLoader__barCount:before{content:"21%"}.webpLoader__barProgress[data-percent="22"] .webpLoader__barCount:before{content:"22%"}.webpLoader__barProgress[data-percent="23"] .webpLoader__barCount:before{content:"23%"}.webpLoader__barProgress[data-percent="24"] .webpLoader__barCount:before{content:"24%"}.webpLoader__barProgress[data-percent="25"] .webpLoader__barCount:before{content:"25%"}.webpLoader__barProgress[data-percent="26"] .webpLoader__barCount:before{content:"26%"}.webpLoader__barProgress[data-percent="27"] .webpLoader__barCount:before{content:"27%"}.webpLoader__barProgress[data-percent="28"] .webpLoader__barCount:before{content:"28%"}.webpLoader__barProgress[data-percent="29"] .webpLoader__barCount:before{content:"29%"}.webpLoader__barProgress[data-percent="30"] .webpLoader__barCount:before{content:"30%"}.webpLoader__barProgress[data-percent="31"] .webpLoader__barCount:before{content:"31%"}.webpLoader__barProgress[data-percent="32"] .webpLoader__barCount:before{content:"32%"}.webpLoader__barProgress[data-percent="33"] .webpLoader__barCount:before{content:"33%"}.webpLoader__barProgress[data-percent="34"] .webpLoader__barCount:before{content:"34%"}.webpLoader__barProgress[data-percent="35"] .webpLoader__barCount:before{content:"35%"}.webpLoader__barProgress[data-percent="36"] .webpLoader__barCount:before{content:"36%"}.webpLoader__barProgress[data-percent="37"] .webpLoader__barCount:before{content:"37%"}.webpLoader__barProgress[data-percent="38"] .webpLoader__barCount:before{content:"38%"}.webpLoader__barProgress[data-percent="39"] .webpLoader__barCount:before{content:"39%"}.webpLoader__barProgress[data-percent="40"] .webpLoader__barCount:before{content:"40%"}.webpLoader__barProgress[data-percent="41"] .webpLoader__barCount:before{content:"41%"}.webpLoader__barProgress[data-percent="42"] .webpLoader__barCount:before{content:"42%"}.webpLoader__barProgress[data-percent="43"] .webpLoader__barCount:before{content:"43%"}.webpLoader__barProgress[data-percent="44"] .webpLoader__barCount:before{content:"44%"}.webpLoader__barProgress[data-percent="45"] .webpLoader__barCount:before{content:"45%"}.webpLoader__barProgress[data-percent="46"] .webpLoader__barCount:before{content:"46%"}.webpLoader__barProgress[data-percent="47"] .webpLoader__barCount:before{content:"47%"}.webpLoader__barProgress[data-percent="48"] .webpLoader__barCount:before{content:"48%"}.webpLoader__barProgress[data-percent="49"] .webpLoader__barCount:before{content:"49%"}.webpLoader__barProgress[data-percent="50"] .webpLoader__barCount:before{content:"50%"}.webpLoader__barProgress[data-percent="51"] .webpLoader__barCount:before{content:"51%"}.webpLoader__barProgress[data-percent="52"] .webpLoader__barCount:before{content:"52%"}.webpLoader__barProgress[data-percent="53"] .webpLoader__barCount:before{content:"53%"}.webpLoader__barProgress[data-percent="54"] .webpLoader__barCount:before{content:"54%"}.webpLoader__barProgress[data-percent="55"] .webpLoader__barCount:before{content:"55%"}.webpLoader__barProgress[data-percent="56"] .webpLoader__barCount:before{content:"56%"}.webpLoader__barProgress[data-percent="57"] .webpLoader__barCount:before{content:"57%"}.webpLoader__barProgress[data-percent="58"] .webpLoader__barCount:before{content:"58%"}.webpLoader__barProgress[data-percent="59"] .webpLoader__barCount:before{content:"59%"}.webpLoader__barProgress[data-percent="60"] .webpLoader__barCount:before{content:"60%"}.webpLoader__barProgress[data-percent="61"] .webpLoader__barCount:before{content:"61%"}.webpLoader__barProgress[data-percent="62"] .webpLoader__barCount:before{content:"62%"}.webpLoader__barProgress[data-percent="63"] .webpLoader__barCount:before{content:"63%"}.webpLoader__barProgress[data-percent="64"] .webpLoader__barCount:before{content:"64%"}.webpLoader__barProgress[data-percent="65"] .webpLoader__barCount:before{content:"65%"}.webpLoader__barProgress[data-percent="66"] .webpLoader__barCount:before{content:"66%"}.webpLoader__barProgress[data-percent="67"] .webpLoader__barCount:before{content:"67%"}.webpLoader__barProgress[data-percent="68"] .webpLoader__barCount:before{content:"68%"}.webpLoader__barProgress[data-percent="69"] .webpLoader__barCount:before{content:"69%"}.webpLoader__barProgress[data-percent="70"] .webpLoader__barCount:before{content:"70%"}.webpLoader__barProgress[data-percent="71"] .webpLoader__barCount:before{content:"71%"}.webpLoader__barProgress[data-percent="72"] .webpLoader__barCount:before{content:"72%"}.webpLoader__barProgress[data-percent="73"] .webpLoader__barCount:before{content:"73%"}.webpLoader__barProgress[data-percent="74"] .webpLoader__barCount:before{content:"74%"}.webpLoader__barProgress[data-percent="75"] .webpLoader__barCount:before{content:"75%"}.webpLoader__barProgress[data-percent="76"] .webpLoader__barCount:before{content:"76%"}.webpLoader__barProgress[data-percent="77"] .webpLoader__barCount:before{content:"77%"}.webpLoader__barProgress[data-percent="78"] .webpLoader__barCount:before{content:"78%"}.webpLoader__barProgress[data-percent="79"] .webpLoader__barCount:before{content:"79%"}.webpLoader__barProgress[data-percent="80"] .webpLoader__barCount:before{content:"80%"}.webpLoader__barProgress[data-percent="81"] .webpLoader__barCount:before{content:"81%"}.webpLoader__barProgress[data-percent="82"] .webpLoader__barCount:before{content:"82%"}.webpLoader__barProgress[data-percent="83"] .webpLoader__barCount:before{content:"83%"}.webpLoader__barProgress[data-percent="84"] .webpLoader__barCount:before{content:"84%"}.webpLoader__barProgress[data-percent="85"] .webpLoader__barCount:before{content:"85%"}.webpLoader__barProgress[data-percent="86"] .webpLoader__barCount:before{content:"86%"}.webpLoader__barProgress[data-percent="87"] .webpLoader__barCount:before{content:"87%"}.webpLoader__barProgress[data-percent="88"] .webpLoader__barCount:before{content:"88%"}.webpLoader__barProgress[data-percent="89"] .webpLoader__barCount:before{content:"89%"}.webpLoader__barProgress[data-percent="90"] .webpLoader__barCount:before{content:"90%"}.webpLoader__barProgress[data-percent="91"] .webpLoader__barCount:before{content:"91%"}.webpLoader__barProgress[data-percent="92"] .webpLoader__barCount:before{content:"92%"}.webpLoader__barProgress[data-percent="93"] .webpLoader__barCount:before{content:"93%"}.webpLoader__barProgress[data-percent="94"] .webpLoader__barCount:before{content:"94%"}.webpLoader__barProgress[data-percent="95"] .webpLoader__barCount:before{content:"95%"}.webpLoader__barProgress[data-percent="96"] .webpLoader__barCount:before{content:"96%"}.webpLoader__barProgress[data-percent="97"] .webpLoader__barCount:before{content:"97%"}.webpLoader__barProgress[data-percent="98"] .webpLoader__barCount:before{content:"98%"}.webpLoader__barProgress[data-percent="99"] .webpLoader__barCount:before{content:"99%"}.webpLoader__barProgress[data-percent="100"] .webpLoader__barCount:before{content:"100%"}.webpLoader__size{font-size:14px;line-height:1.5714285714;margin-bottom:-10px;padding:4px 0}.webpLoader__sizeProgress{font-weight:500}.webpLoader__success{margin-top:20px;padding:4px 0 4px 20px;position:relative}.webpLoader__success:before{background-color:#00a32a;content:"";height:100%;left:0;position:absolute;top:0;width:2px}.webpLoader__successContent{color:#00a32a;font-size:14px;font-weight:500;line-height:1.5714285714}.webpLoader__successContent a{color:inherit}.webpLoader__errors{border-left:2px solid #c3c4c7;margin-top:20px}.webpLoader__errorsTitle{background-color:#c3c4c7;color:#fff;display:inline-block;font-size:14px;line-height:1.5714285714;padding:4px 22px}.webpLoader__errorsContent{padding:10px 0 10px 20px}.webpLoader__errorsContent>p{font-size:12px;line-height:1.75;margin:0;max-width:100%}.webpLoader__errorsContent>p.webpLoader__errorsContentError{color:#d63638;font-size:14px;font-weight:500;line-height:1.5714285714}.webpLoader__errorsContent pre{font-size:12px;line-height:1.75;white-space:normal}.webpLoader__button--disabled{opacity:.25!important;pointer-events:none}.webpPopup{margin-top:20px}.webpPopup__inner{background-color:#fff;border:1px solid #c3c4c7;display:flex;flex-wrap:wrap}.webpPopup__image{background-image:url(../../img/author.png);background-position:50%;background-repeat:no-repeat;background-size:cover;width:152px}.webpPopup__content{border-left:1px solid #c3c4c7;flex:1;padding:10px 20px}.webpServerInfo{color:#222;text-align:center}.webpServerInfo pre{font-family:monospace;margin:0}.webpServerInfo h1,.webpServerInfo h2{display:none}.webpServerInfo p{max-width:100%}.webpServerInfo table{border:0;border-collapse:collapse;margin:10px auto;width:100%}.webpServerInfo td,.webpServerInfo th{border:1px solid #666;font-family:monospace;font-size:12px;line-height:1.75;padding:4px 5px;text-align:center;vertical-align:baseline}.webpServerInfo .p{text-align:left}.webpServerInfo .e{background-color:#ccf;font-weight:700;width:300px}.webpServerInfo .h{background-color:#99c;font-weight:700}.webpServerInfo .v{word-wrap:break-word;background-color:#ddd;max-width:300px;overflow-x:auto}.webpServerInfo .v i{color:#999}.webpServerInfo img{border:0;float:right}@media screen and (max-width:1024px){.webpPage__column--large{width:100%}.webpPage__column--small{margin-top:40px;width:100%}.webpPage__widget+.webpPage__widget{margin-top:40px}.webpPage__widgetColumns{display:block}.webpPage__widgetColumn{width:100%}}@media screen and (max-width:782px){.webpPage{padding-right:0}.webpPage__quality{display:block}.webpPage__qualityItem{border-left:0}.webpPage__qualityItem+.webpPage__qualityItem{border-top:1px solid #c3c4c7}.webpInput{display:block}.webpInput__field{width:100%}.webpInput__button{margin:10px 0 0!important}.webpPopup__inner{border:1px solid #c3c4c7;display:block}.webpPopup__image{height:152px;margin:20px auto 0}.webpPopup__content{border-left:0}}
1
+ @charset "UTF-8";@keyframes dotsLoading{0%,to{content:"..."}25%{content:" .."}50%{content:". ."}75%{content:".. "}}@font-face{font-family:webpc-icomoon;font-style:normal;font-weight:400;src:url(../../fonts/icons/icomoon.eot?ver=18333923);src:url(../../fonts/icons/icomoon.woff?ver=18333923) format("woff"),url(../../fonts/icons/icomoon.eot?ver=18333923#iefix) format("embedded-opentype"),url(../../fonts/icons/icomoon.ttf?ver=18333923) format("truetype"),url(../../fonts/icons/icomoon.svg?ver=18333923#icomoon) format("svg")}.icon-logo:before{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\e900"!important;font-family:webpc-icomoon!important;font-style:normal;font-variant:normal;font-weight:400;text-transform:none}.webpPage{color:#101517;margin:0;overflow:hidden;padding:0 20px 0 0}.webpPage *,.webpPage :after,.webpPage :before{box-sizing:border-box;margin:0;padding:0}.webpPage [hidden]{display:none!important}.webpPage .webpPage__headline{font-size:24px;line-height:1.2083333333;margin:0;padding:15px 0 23px}.webpPage__alert{background-color:#00a32a;color:#fff;font-size:14px;line-height:1.5714285714;margin-bottom:30px;padding:15px 20px}.webpPage__columns{margin:0 -30px;overflow:hidden}.webpPage__column{float:left;padding:0 30px}.webpPage__column--large{width:66.666%}.webpPage__column--small{width:33.333%}.webpPage__widget{background-color:#fff}.webpPage__widget+.webpPage__widget{margin-top:60px}.webpPage__widgetTitle{background-color:#2271b1;color:#fff;font-size:16px;font-weight:400;line-height:1.5;padding:14px 30px}.webpPage__widgetTitle--second{background-color:#a7aaad}.webpPage__widgetTitle--error{background-color:#d63638}.webpPage__widgetRow{padding-bottom:10px}.webpPage__widgetRow:last-child{padding-bottom:0}.webpPage__widgetRow .webpButton{margin:10px 0}.webpPage__widgetColumns{display:flex;flex-wrap:wrap;margin:0 -10px}.webpPage__widgetColumn{padding:0 10px;width:50%}.webpPage__widgetColumn:first-child:last-child{flex:1}.webpPage__widgetColumnNotice{background-color:#2271b1;margin:10px 0;padding:10px 20px}.webpPage__widgetColumnNotice p{color:#fff;font-size:1.2rem}.webpPage__widgetColumnNotice p+p{margin-top:0}.webpPage__widgetColumnNotice p a{color:inherit;font-weight:500;letter-spacing:1px;text-decoration:none;text-transform:uppercase}.webpPage__quality{border:1px solid #c3c4c7;display:flex;flex-wrap:wrap;margin:10px 0}.webpPage__qualityItem{border-left:1px solid #c3c4c7;flex:1;margin-left:-1px;text-align:center}.webpPage__qualityItemInput{display:none!important}.webpPage__qualityItemLabel{display:block;font-size:14px;line-height:1.5714285714;padding:14px 20px;position:relative;transition:color .3s,background-color .3s}.webpPage__qualityItemInput:checked+.webpPage__qualityItemLabel{background-color:#00a32a;color:#fff;margin:-1px;padding:15px 21px}.webpPage__qualityItemInput[disabled]+.webpPage__qualityItemLabel{opacity:0;pointer-events:none}#wp-admin-bar-webpc-menu .ab-icon:before{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\e900"!important;font-family:webpc-icomoon!important;font-style:normal;font-variant:normal;font-weight:400;text-transform:none}.notice[data-notice=webp-converter]{margin-top:20px;padding:0}.webpButton{background-color:#fff;border:1px solid transparent;box-shadow:none!important;box-sizing:border-box;cursor:pointer;display:inline-block;font-size:14px;font-weight:500;line-height:1.5714285714;min-width:180px;opacity:1!important;outline:none!important;padding:9px 30px;position:relative;text-align:center;text-decoration:none!important;transition:color .3s!important;z-index:10}p>.webpButton{margin:6px 0}.webpButton:before{float:left;font-family:dashicons;font-size:20px;line-height:1.1;margin-right:10px}.webpButton:after{content:"";height:100%;left:0;position:absolute;top:0;transition:width .3s;width:0;z-index:-1}.webpButton:hover:after{width:100%}.webpButton[disabled]{opacity:.5!important;pointer-events:none}.webpButton--blue:hover,.webpButton--gray:hover,.webpButton--green:hover,.webpButton--red:hover{color:#fff!important}.webpButton--blue{border-color:#2271b1;color:#2271b1!important}.webpButton--blue.webpButton--bg,.webpButton--blue:after{background-color:#2271b1}.webpButton--blue.webpButton--bg:after{background-color:#135e96}.webpButton--green{border-color:#00a32a;color:#00a32a!important}.webpButton--green.webpButton--bg,.webpButton--green:after{background-color:#00a32a}.webpButton--green.webpButton--bg:after{background-color:#008a20}.webpButton--red{border-color:#d63638;color:#d63638!important}.webpButton--red.webpButton--bg,.webpButton--red:after{background-color:#d63638}.webpButton--red.webpButton--bg:after{background-color:#b32d2e}.webpButton--gray{border-color:#c3c4c7;color:#c3c4c7!important}.webpButton--gray.webpButton--bg,.webpButton--gray:after{background-color:#c3c4c7}.webpButton--gray.webpButton--bg:after{background-color:#a7aaad}.webpButton--bg{color:#fff!important;font-weight:400}.webpContent{padding:20px 30px}.webpContent p{font-size:14px;line-height:1.5714285714;max-width:800px}.webpContent p.center{text-align:center}.webpContent--wide p{max-width:100%}.webpContent a{box-shadow:none;color:#2271b1;outline:none;text-decoration:underline;transition:opacity .3s}.webpContent a:hover{opacity:.5}.webpContent h1,.webpContent h2,.webpContent h3,.webpContent h4,.webpContent h5,.webpContent h6{font-size:16px;font-weight:500;line-height:1.5}.webpContent h1,.webpContent h2,.webpContent h3,.webpContent h4,.webpContent h5,.webpContent h6,.webpContent p{margin:10px 0 0;padding:4px 0}.webpContent h1:first-child,.webpContent h2:first-child,.webpContent h3:first-child,.webpContent h4:first-child,.webpContent h5:first-child,.webpContent h6:first-child,.webpContent p:first-child,.webpContent p>p{margin-top:0}.webpInput+p{background-color:#f0f0f1;margin:0 0 10px;max-width:none;padding:14px 20px}.webpContent h1+p,.webpContent h2+p,.webpContent h3+p,.webpContent h4+p,.webpContent h5+p,.webpContent h6+p{font-size:12px;line-height:1.75;margin-top:0}.webpContent--notice h1+p,.webpContent--notice h2+p,.webpContent--notice h3+p,.webpContent--notice h4+p,.webpContent--notice h5+p,.webpContent--notice h6+p{font-size:14px;line-height:1.5714285714}.webpContent__buttons{margin-top:-10px;overflow:hidden;padding:10px 0}.webpContent__button{float:left;margin:20px 20px 0 0}.webpContent__button:last-child{margin-right:0}.webpField{display:flex;padding:10px 0}.webpField+.webpField{margin-top:-12px}.webpField__input{display:none!important}.webpField__input+label{display:inline-block;position:relative}.webpField__input[disabled]+label{pointer-events:none}.webpField__input[disabled]+label:after,.webpField__input[disabled]+label:before{opacity:.25}.webpField__input--checkbox+label,.webpField__input--radio+label{height:22px;width:22px}.webpField__input--checkbox+label:after,.webpField__input--checkbox+label:before,.webpField__input--radio+label:after,.webpField__input--radio+label:before{align-items:center;content:"";display:flex;height:22px;justify-content:center;left:0;position:absolute;top:0;width:22px}.webpField__input--checkbox+label:before,.webpField__input--radio+label:before{border:1px solid #c3c4c7}.webpField__input--checkbox+label:after,.webpField__input--radio+label:after{position:absolute;transform:scale(0);transition:transform .3s}.webpField__input--checkbox:checked+label:after,.webpField__input--radio:checked+label:after{transform:scale(1)}.webpField__input--checkbox+label:after{color:#00a32a;content:"\f147";font-family:dashicons;font-size:20px;line-height:1}.webpField__input--radio+label:before{border-radius:50%}.webpField__input--radio+label:after{background-color:#00a32a;border-radius:50%;content:"";height:6px;left:8px;top:8px;width:6px}.webpField__input--toggle+label{height:22px;width:44px}.webpField__input--toggle+label:after,.webpField__input--toggle+label:before{content:"";position:absolute}.webpField__input--toggle+label:before{background-color:#dcdcde;border:1px solid #c3c4c7;border-radius:11px;height:22px;left:0;top:0;transition:background-color .3s;width:44px}.webpField__input--toggle+label:after{background-color:#fff;border-radius:50%;height:16px;left:3px;position:absolute;top:3px;transition:transform .3s;width:16px}.webpField__input--toggle:checked+label:before{background-color:#00a32a}.webpField__input--toggle:checked+label:after{transform:translateX(22px)}.webpField__label{display:block;flex:1;font-size:14px;line-height:1.5714285714;margin-left:20px;max-width:650px;position:relative}.webpInput{align-items:center;display:flex;padding:10px 0}.webpInput__field{border:1px solid #c3c4c7!important;border-radius:0!important;box-shadow:none!important;flex:1;font-size:14px!important;line-height:1.5714285714!important;padding:9px 15px!important}.webpInput__field[readonly]{background-color:#f0f0f1}.webpInput__button{margin:0 0 0 10px!important}.webpLoader__status{padding:20px 0 10px;position:relative}.webpLoader__bar--hidden{display:none}.webpLoader__barProgress{font-size:0;height:21px;line-height:0;position:relative}.webpLoader__barProgress:before{background-color:#00a32a;content:"";height:100%;left:0;position:absolute;top:0;transition:width .3s;width:0}.webpLoader__barProgress--error:before{background-color:#d63638}.webpLoader__barProgress[data-percent="0"]:before{width:0}.webpLoader__barProgress[data-percent="1"]:before{width:1%}.webpLoader__barProgress[data-percent="2"]:before{width:2%}.webpLoader__barProgress[data-percent="3"]:before{width:3%}.webpLoader__barProgress[data-percent="4"]:before{width:4%}.webpLoader__barProgress[data-percent="5"]:before{width:5%}.webpLoader__barProgress[data-percent="6"]:before{width:6%}.webpLoader__barProgress[data-percent="7"]:before{width:7%}.webpLoader__barProgress[data-percent="8"]:before{width:8%}.webpLoader__barProgress[data-percent="9"]:before{width:9%}.webpLoader__barProgress[data-percent="10"]:before{width:10%}.webpLoader__barProgress[data-percent="11"]:before{width:11%}.webpLoader__barProgress[data-percent="12"]:before{width:12%}.webpLoader__barProgress[data-percent="13"]:before{width:13%}.webpLoader__barProgress[data-percent="14"]:before{width:14%}.webpLoader__barProgress[data-percent="15"]:before{width:15%}.webpLoader__barProgress[data-percent="16"]:before{width:16%}.webpLoader__barProgress[data-percent="17"]:before{width:17%}.webpLoader__barProgress[data-percent="18"]:before{width:18%}.webpLoader__barProgress[data-percent="19"]:before{width:19%}.webpLoader__barProgress[data-percent="20"]:before{width:20%}.webpLoader__barProgress[data-percent="21"]:before{width:21%}.webpLoader__barProgress[data-percent="22"]:before{width:22%}.webpLoader__barProgress[data-percent="23"]:before{width:23%}.webpLoader__barProgress[data-percent="24"]:before{width:24%}.webpLoader__barProgress[data-percent="25"]:before{width:25%}.webpLoader__barProgress[data-percent="26"]:before{width:26%}.webpLoader__barProgress[data-percent="27"]:before{width:27%}.webpLoader__barProgress[data-percent="28"]:before{width:28%}.webpLoader__barProgress[data-percent="29"]:before{width:29%}.webpLoader__barProgress[data-percent="30"]:before{width:30%}.webpLoader__barProgress[data-percent="31"]:before{width:31%}.webpLoader__barProgress[data-percent="32"]:before{width:32%}.webpLoader__barProgress[data-percent="33"]:before{width:33%}.webpLoader__barProgress[data-percent="34"]:before{width:34%}.webpLoader__barProgress[data-percent="35"]:before{width:35%}.webpLoader__barProgress[data-percent="36"]:before{width:36%}.webpLoader__barProgress[data-percent="37"]:before{width:37%}.webpLoader__barProgress[data-percent="38"]:before{width:38%}.webpLoader__barProgress[data-percent="39"]:before{width:39%}.webpLoader__barProgress[data-percent="40"]:before{width:40%}.webpLoader__barProgress[data-percent="41"]:before{width:41%}.webpLoader__barProgress[data-percent="42"]:before{width:42%}.webpLoader__barProgress[data-percent="43"]:before{width:43%}.webpLoader__barProgress[data-percent="44"]:before{width:44%}.webpLoader__barProgress[data-percent="45"]:before{width:45%}.webpLoader__barProgress[data-percent="46"]:before{width:46%}.webpLoader__barProgress[data-percent="47"]:before{width:47%}.webpLoader__barProgress[data-percent="48"]:before{width:48%}.webpLoader__barProgress[data-percent="49"]:before{width:49%}.webpLoader__barProgress[data-percent="50"]:before{width:50%}.webpLoader__barProgress[data-percent="51"]:before{width:51%}.webpLoader__barProgress[data-percent="52"]:before{width:52%}.webpLoader__barProgress[data-percent="53"]:before{width:53%}.webpLoader__barProgress[data-percent="54"]:before{width:54%}.webpLoader__barProgress[data-percent="55"]:before{width:55%}.webpLoader__barProgress[data-percent="56"]:before{width:56%}.webpLoader__barProgress[data-percent="57"]:before{width:57%}.webpLoader__barProgress[data-percent="58"]:before{width:58%}.webpLoader__barProgress[data-percent="59"]:before{width:59%}.webpLoader__barProgress[data-percent="60"]:before{width:60%}.webpLoader__barProgress[data-percent="61"]:before{width:61%}.webpLoader__barProgress[data-percent="62"]:before{width:62%}.webpLoader__barProgress[data-percent="63"]:before{width:63%}.webpLoader__barProgress[data-percent="64"]:before{width:64%}.webpLoader__barProgress[data-percent="65"]:before{width:65%}.webpLoader__barProgress[data-percent="66"]:before{width:66%}.webpLoader__barProgress[data-percent="67"]:before{width:67%}.webpLoader__barProgress[data-percent="68"]:before{width:68%}.webpLoader__barProgress[data-percent="69"]:before{width:69%}.webpLoader__barProgress[data-percent="70"]:before{width:70%}.webpLoader__barProgress[data-percent="71"]:before{width:71%}.webpLoader__barProgress[data-percent="72"]:before{width:72%}.webpLoader__barProgress[data-percent="73"]:before{width:73%}.webpLoader__barProgress[data-percent="74"]:before{width:74%}.webpLoader__barProgress[data-percent="75"]:before{width:75%}.webpLoader__barProgress[data-percent="76"]:before{width:76%}.webpLoader__barProgress[data-percent="77"]:before{width:77%}.webpLoader__barProgress[data-percent="78"]:before{width:78%}.webpLoader__barProgress[data-percent="79"]:before{width:79%}.webpLoader__barProgress[data-percent="80"]:before{width:80%}.webpLoader__barProgress[data-percent="81"]:before{width:81%}.webpLoader__barProgress[data-percent="82"]:before{width:82%}.webpLoader__barProgress[data-percent="83"]:before{width:83%}.webpLoader__barProgress[data-percent="84"]:before{width:84%}.webpLoader__barProgress[data-percent="85"]:before{width:85%}.webpLoader__barProgress[data-percent="86"]:before{width:86%}.webpLoader__barProgress[data-percent="87"]:before{width:87%}.webpLoader__barProgress[data-percent="88"]:before{width:88%}.webpLoader__barProgress[data-percent="89"]:before{width:89%}.webpLoader__barProgress[data-percent="90"]:before{width:90%}.webpLoader__barProgress[data-percent="91"]:before{width:91%}.webpLoader__barProgress[data-percent="92"]:before{width:92%}.webpLoader__barProgress[data-percent="93"]:before{width:93%}.webpLoader__barProgress[data-percent="94"]:before{width:94%}.webpLoader__barProgress[data-percent="95"]:before{width:95%}.webpLoader__barProgress[data-percent="96"]:before{width:96%}.webpLoader__barProgress[data-percent="97"]:before{width:97%}.webpLoader__barProgress[data-percent="98"]:before{width:98%}.webpLoader__barProgress[data-percent="99"]:before{width:99%}.webpLoader__barProgress[data-percent="100"]:before{width:100%}.webpLoader__barCount{background-color:#00a32a;color:#fff;display:inline-block;font-family:monospace;font-size:12px;line-height:1.75;padding:0 5px;position:relative}.webpLoader__barProgress--error .webpLoader__barCount{background-color:#d63638}.webpLoader__barCount:after{animation:dotsLoading 1s linear infinite;content:"...";margin-left:5px}.webpLoader__barProgress--error .webpLoader__barCount:after,.webpLoader__barProgress[data-percent="100"] .webpLoader__barCount:after{display:none}.webpLoader__barProgress[data-percent="0"] .webpLoader__barCount:before{content:"0%"}.webpLoader__barProgress[data-percent="1"] .webpLoader__barCount:before{content:"1%"}.webpLoader__barProgress[data-percent="2"] .webpLoader__barCount:before{content:"2%"}.webpLoader__barProgress[data-percent="3"] .webpLoader__barCount:before{content:"3%"}.webpLoader__barProgress[data-percent="4"] .webpLoader__barCount:before{content:"4%"}.webpLoader__barProgress[data-percent="5"] .webpLoader__barCount:before{content:"5%"}.webpLoader__barProgress[data-percent="6"] .webpLoader__barCount:before{content:"6%"}.webpLoader__barProgress[data-percent="7"] .webpLoader__barCount:before{content:"7%"}.webpLoader__barProgress[data-percent="8"] .webpLoader__barCount:before{content:"8%"}.webpLoader__barProgress[data-percent="9"] .webpLoader__barCount:before{content:"9%"}.webpLoader__barProgress[data-percent="10"] .webpLoader__barCount:before{content:"10%"}.webpLoader__barProgress[data-percent="11"] .webpLoader__barCount:before{content:"11%"}.webpLoader__barProgress[data-percent="12"] .webpLoader__barCount:before{content:"12%"}.webpLoader__barProgress[data-percent="13"] .webpLoader__barCount:before{content:"13%"}.webpLoader__barProgress[data-percent="14"] .webpLoader__barCount:before{content:"14%"}.webpLoader__barProgress[data-percent="15"] .webpLoader__barCount:before{content:"15%"}.webpLoader__barProgress[data-percent="16"] .webpLoader__barCount:before{content:"16%"}.webpLoader__barProgress[data-percent="17"] .webpLoader__barCount:before{content:"17%"}.webpLoader__barProgress[data-percent="18"] .webpLoader__barCount:before{content:"18%"}.webpLoader__barProgress[data-percent="19"] .webpLoader__barCount:before{content:"19%"}.webpLoader__barProgress[data-percent="20"] .webpLoader__barCount:before{content:"20%"}.webpLoader__barProgress[data-percent="21"] .webpLoader__barCount:before{content:"21%"}.webpLoader__barProgress[data-percent="22"] .webpLoader__barCount:before{content:"22%"}.webpLoader__barProgress[data-percent="23"] .webpLoader__barCount:before{content:"23%"}.webpLoader__barProgress[data-percent="24"] .webpLoader__barCount:before{content:"24%"}.webpLoader__barProgress[data-percent="25"] .webpLoader__barCount:before{content:"25%"}.webpLoader__barProgress[data-percent="26"] .webpLoader__barCount:before{content:"26%"}.webpLoader__barProgress[data-percent="27"] .webpLoader__barCount:before{content:"27%"}.webpLoader__barProgress[data-percent="28"] .webpLoader__barCount:before{content:"28%"}.webpLoader__barProgress[data-percent="29"] .webpLoader__barCount:before{content:"29%"}.webpLoader__barProgress[data-percent="30"] .webpLoader__barCount:before{content:"30%"}.webpLoader__barProgress[data-percent="31"] .webpLoader__barCount:before{content:"31%"}.webpLoader__barProgress[data-percent="32"] .webpLoader__barCount:before{content:"32%"}.webpLoader__barProgress[data-percent="33"] .webpLoader__barCount:before{content:"33%"}.webpLoader__barProgress[data-percent="34"] .webpLoader__barCount:before{content:"34%"}.webpLoader__barProgress[data-percent="35"] .webpLoader__barCount:before{content:"35%"}.webpLoader__barProgress[data-percent="36"] .webpLoader__barCount:before{content:"36%"}.webpLoader__barProgress[data-percent="37"] .webpLoader__barCount:before{content:"37%"}.webpLoader__barProgress[data-percent="38"] .webpLoader__barCount:before{content:"38%"}.webpLoader__barProgress[data-percent="39"] .webpLoader__barCount:before{content:"39%"}.webpLoader__barProgress[data-percent="40"] .webpLoader__barCount:before{content:"40%"}.webpLoader__barProgress[data-percent="41"] .webpLoader__barCount:before{content:"41%"}.webpLoader__barProgress[data-percent="42"] .webpLoader__barCount:before{content:"42%"}.webpLoader__barProgress[data-percent="43"] .webpLoader__barCount:before{content:"43%"}.webpLoader__barProgress[data-percent="44"] .webpLoader__barCount:before{content:"44%"}.webpLoader__barProgress[data-percent="45"] .webpLoader__barCount:before{content:"45%"}.webpLoader__barProgress[data-percent="46"] .webpLoader__barCount:before{content:"46%"}.webpLoader__barProgress[data-percent="47"] .webpLoader__barCount:before{content:"47%"}.webpLoader__barProgress[data-percent="48"] .webpLoader__barCount:before{content:"48%"}.webpLoader__barProgress[data-percent="49"] .webpLoader__barCount:before{content:"49%"}.webpLoader__barProgress[data-percent="50"] .webpLoader__barCount:before{content:"50%"}.webpLoader__barProgress[data-percent="51"] .webpLoader__barCount:before{content:"51%"}.webpLoader__barProgress[data-percent="52"] .webpLoader__barCount:before{content:"52%"}.webpLoader__barProgress[data-percent="53"] .webpLoader__barCount:before{content:"53%"}.webpLoader__barProgress[data-percent="54"] .webpLoader__barCount:before{content:"54%"}.webpLoader__barProgress[data-percent="55"] .webpLoader__barCount:before{content:"55%"}.webpLoader__barProgress[data-percent="56"] .webpLoader__barCount:before{content:"56%"}.webpLoader__barProgress[data-percent="57"] .webpLoader__barCount:before{content:"57%"}.webpLoader__barProgress[data-percent="58"] .webpLoader__barCount:before{content:"58%"}.webpLoader__barProgress[data-percent="59"] .webpLoader__barCount:before{content:"59%"}.webpLoader__barProgress[data-percent="60"] .webpLoader__barCount:before{content:"60%"}.webpLoader__barProgress[data-percent="61"] .webpLoader__barCount:before{content:"61%"}.webpLoader__barProgress[data-percent="62"] .webpLoader__barCount:before{content:"62%"}.webpLoader__barProgress[data-percent="63"] .webpLoader__barCount:before{content:"63%"}.webpLoader__barProgress[data-percent="64"] .webpLoader__barCount:before{content:"64%"}.webpLoader__barProgress[data-percent="65"] .webpLoader__barCount:before{content:"65%"}.webpLoader__barProgress[data-percent="66"] .webpLoader__barCount:before{content:"66%"}.webpLoader__barProgress[data-percent="67"] .webpLoader__barCount:before{content:"67%"}.webpLoader__barProgress[data-percent="68"] .webpLoader__barCount:before{content:"68%"}.webpLoader__barProgress[data-percent="69"] .webpLoader__barCount:before{content:"69%"}.webpLoader__barProgress[data-percent="70"] .webpLoader__barCount:before{content:"70%"}.webpLoader__barProgress[data-percent="71"] .webpLoader__barCount:before{content:"71%"}.webpLoader__barProgress[data-percent="72"] .webpLoader__barCount:before{content:"72%"}.webpLoader__barProgress[data-percent="73"] .webpLoader__barCount:before{content:"73%"}.webpLoader__barProgress[data-percent="74"] .webpLoader__barCount:before{content:"74%"}.webpLoader__barProgress[data-percent="75"] .webpLoader__barCount:before{content:"75%"}.webpLoader__barProgress[data-percent="76"] .webpLoader__barCount:before{content:"76%"}.webpLoader__barProgress[data-percent="77"] .webpLoader__barCount:before{content:"77%"}.webpLoader__barProgress[data-percent="78"] .webpLoader__barCount:before{content:"78%"}.webpLoader__barProgress[data-percent="79"] .webpLoader__barCount:before{content:"79%"}.webpLoader__barProgress[data-percent="80"] .webpLoader__barCount:before{content:"80%"}.webpLoader__barProgress[data-percent="81"] .webpLoader__barCount:before{content:"81%"}.webpLoader__barProgress[data-percent="82"] .webpLoader__barCount:before{content:"82%"}.webpLoader__barProgress[data-percent="83"] .webpLoader__barCount:before{content:"83%"}.webpLoader__barProgress[data-percent="84"] .webpLoader__barCount:before{content:"84%"}.webpLoader__barProgress[data-percent="85"] .webpLoader__barCount:before{content:"85%"}.webpLoader__barProgress[data-percent="86"] .webpLoader__barCount:before{content:"86%"}.webpLoader__barProgress[data-percent="87"] .webpLoader__barCount:before{content:"87%"}.webpLoader__barProgress[data-percent="88"] .webpLoader__barCount:before{content:"88%"}.webpLoader__barProgress[data-percent="89"] .webpLoader__barCount:before{content:"89%"}.webpLoader__barProgress[data-percent="90"] .webpLoader__barCount:before{content:"90%"}.webpLoader__barProgress[data-percent="91"] .webpLoader__barCount:before{content:"91%"}.webpLoader__barProgress[data-percent="92"] .webpLoader__barCount:before{content:"92%"}.webpLoader__barProgress[data-percent="93"] .webpLoader__barCount:before{content:"93%"}.webpLoader__barProgress[data-percent="94"] .webpLoader__barCount:before{content:"94%"}.webpLoader__barProgress[data-percent="95"] .webpLoader__barCount:before{content:"95%"}.webpLoader__barProgress[data-percent="96"] .webpLoader__barCount:before{content:"96%"}.webpLoader__barProgress[data-percent="97"] .webpLoader__barCount:before{content:"97%"}.webpLoader__barProgress[data-percent="98"] .webpLoader__barCount:before{content:"98%"}.webpLoader__barProgress[data-percent="99"] .webpLoader__barCount:before{content:"99%"}.webpLoader__barProgress[data-percent="100"] .webpLoader__barCount:before{content:"100%"}.webpLoader__size{font-size:14px;line-height:1.5714285714;margin-bottom:-10px;padding:4px 0}.webpLoader__sizeProgress{font-weight:500}.webpLoader__success{margin-top:20px;padding:4px 0 4px 20px;position:relative}.webpLoader__success:before{background-color:#00a32a;content:"";height:100%;left:0;position:absolute;top:0;width:2px}.webpLoader__successContent{color:#00a32a;font-size:14px;font-weight:500;line-height:1.5714285714}.webpLoader__successContent a{color:inherit}.webpLoader__errors{border-left:2px solid #c3c4c7;margin-top:20px}.webpLoader__errorsTitle{background-color:#c3c4c7;color:#fff;display:inline-block;font-size:14px;line-height:1.5714285714;padding:4px 22px}.webpLoader__errorsContent{padding:10px 0 10px 20px}.webpLoader__errorsContent>p{font-size:12px;line-height:1.75;margin:0;max-width:100%}.webpLoader__errorsContent>p.webpLoader__errorsContentError{color:#d63638;font-size:14px;font-weight:500;line-height:1.5714285714}.webpLoader__errorsContent pre{font-size:12px;line-height:1.75;white-space:normal}.webpLoader__button--disabled{opacity:.25!important;pointer-events:none}.webpPopup{margin-top:20px}.webpPopup__inner{background-color:#fff;border:1px solid #c3c4c7;display:flex;flex-wrap:wrap}.webpPopup__image{background-image:url(../../img/author.png);background-position:50%;background-repeat:no-repeat;background-size:cover;width:152px}.webpPopup__content{border-left:1px solid #c3c4c7;flex:1;padding:10px 20px}.webpServerInfo{color:#222;text-align:center}.webpServerInfo pre{font-family:monospace;margin:0}.webpServerInfo h1,.webpServerInfo h2{display:none}.webpServerInfo p{max-width:100%}.webpServerInfo table{border:0;border-collapse:collapse;margin:10px auto;width:100%}.webpServerInfo td,.webpServerInfo th{border:1px solid #666;font-family:monospace;font-size:12px;line-height:1.75;padding:4px 5px;text-align:center;vertical-align:baseline}.webpServerInfo .p{text-align:left}.webpServerInfo .e{background-color:#ccf;font-weight:700;width:300px}.webpServerInfo .h{background-color:#99c;font-weight:700}.webpServerInfo .v{word-wrap:break-word;background-color:#ddd;max-width:300px;overflow-x:auto}.webpServerInfo .v i{color:#999}.webpServerInfo img{border:0;float:right}@media screen and (max-width:1024px){.webpPage__column--large{width:100%}.webpPage__column--small{margin-top:40px;width:100%}.webpPage__widget+.webpPage__widget{margin-top:40px}.webpPage__widgetColumns{display:block}.webpPage__widgetColumn{width:100%}}@media screen and (max-width:782px){.webpPage{padding-right:0}.webpPage__quality{display:block}.webpPage__qualityItem{border-left:0}.webpPage__qualityItem+.webpPage__qualityItem{border-top:1px solid #c3c4c7}.webpInput{display:block}.webpInput__field{width:100%}.webpInput__button{margin:10px 0 0!important}.webpPopup__inner{border:1px solid #c3c4c7;display:block}.webpPopup__image{height:152px;margin:20px auto 0}.webpPopup__content{border-left:0}}
changelog.txt CHANGED
@@ -1,8 +1,11 @@
1
  == Changelog ==
2
 
 
 
 
3
  = 4.3.0 (2022-04-01) =
4
  * `[Fixed]` Authorization of access to REST API
5
- * `[Changed]` Plugin operation description in plugin settings
6
  * `[Added]` Command "wp webp-converter calculate" for WP-CLI
7
  * `[Added]` Command "wp webp-converter regenerate" for WP-CLI
8
  * `[Added]` Converting .webp files to AVIF format
1
  == Changelog ==
2
 
3
+ = 4.3.1 (2022-04-05) =
4
+ * `[Fixed]` Generating rewrite rules for via .htaccess loading mode
5
+
6
  = 4.3.0 (2022-04-01) =
7
  * `[Fixed]` Authorization of access to REST API
8
+ * `[Changed]` Description of plugin operation in plugin settings
9
  * `[Added]` Command "wp webp-converter calculate" for WP-CLI
10
  * `[Added]` Command "wp webp-converter regenerate" for WP-CLI
11
  * `[Added]` Converting .webp files to AVIF format
readme.txt CHANGED
@@ -156,7 +156,7 @@ Directory path with converted WebP files *(relative to the root directory)*:
156
 
157
  Prefix in URL of `/wp-content/` directory or equivalent *(used in .htaccess)*:
158
 
159
- `add_filter( 'webpc_uploads_prefix', function( $prefix ) {
160
  return '/';
161
  } );`
162
 
@@ -190,7 +190,7 @@ add_filter( 'webpc_dir_name', function( $path, $directory ) {
190
  }
191
  return 'app/uploads-webpc';
192
  }, 10, 2 );`
193
- `add_filter( 'webpc_uploads_prefix', function( $prefix ) {
194
  return '/';
195
  } );`
196
 
@@ -387,9 +387,12 @@ After making changes, remember to restart the machine: `systemctl restart nginx`
387
 
388
  == Changelog ==
389
 
 
 
 
390
  = 4.3.0 (2022-04-01) =
391
  * `[Fixed]` Authorization of access to REST API
392
- * `[Changed]` Plugin operation description in plugin settings
393
  * `[Added]` Command "wp webp-converter calculate" for WP-CLI
394
  * `[Added]` Command "wp webp-converter regenerate" for WP-CLI
395
  * `[Added]` Converting .webp files to AVIF format
156
 
157
  Prefix in URL of `/wp-content/` directory or equivalent *(used in .htaccess)*:
158
 
159
+ `add_filter( 'webpc_htaccess_rewrite_path', function( $prefix ) {
160
  return '/';
161
  } );`
162
 
190
  }
191
  return 'app/uploads-webpc';
192
  }, 10, 2 );`
193
+ `add_filter( 'webpc_htaccess_rewrite_path', function( $prefix ) {
194
  return '/';
195
  } );`
196
 
387
 
388
  == Changelog ==
389
 
390
+ = 4.3.1 (2022-04-05) =
391
+ * `[Fixed]` Generating rewrite rules for via .htaccess loading mode
392
+
393
  = 4.3.0 (2022-04-01) =
394
  * `[Fixed]` Authorization of access to REST API
395
+ * `[Changed]` Description of plugin operation in plugin settings
396
  * `[Added]` Command "wp webp-converter calculate" for WP-CLI
397
  * `[Added]` Command "wp webp-converter regenerate" for WP-CLI
398
  * `[Added]` Converting .webp files to AVIF format
src/Conversion/Directory/DirectoryAbstract.php CHANGED
@@ -2,20 +2,13 @@
2
 
3
  namespace WebpConverter\Conversion\Directory;
4
 
 
 
5
  /**
6
  * Abstract class for class that supports data about directory.
7
  */
8
  abstract class DirectoryAbstract implements DirectoryInterface {
9
 
10
- /**
11
- * @var PathsGenerator
12
- */
13
- protected $paths_generator;
14
-
15
- public function __construct( PathsGenerator $paths_generator ) {
16
- $this->paths_generator = $paths_generator;
17
- }
18
-
19
  /**
20
  * {@inheritdoc}
21
  */
@@ -42,7 +35,7 @@ abstract class DirectoryAbstract implements DirectoryInterface {
42
  */
43
  public function get_server_path(): string {
44
  $directory_name = apply_filters( 'webpc_dir_name', $this->get_relative_path(), $this->get_type() );
45
- return sprintf( '%1$s/%2$s', $this->paths_generator->get_wordpress_root_path(), $directory_name );
46
  }
47
 
48
  /**
2
 
3
  namespace WebpConverter\Conversion\Directory;
4
 
5
+ use WebpConverter\Service\PathsGenerator;
6
+
7
  /**
8
  * Abstract class for class that supports data about directory.
9
  */
10
  abstract class DirectoryAbstract implements DirectoryInterface {
11
 
 
 
 
 
 
 
 
 
 
12
  /**
13
  * {@inheritdoc}
14
  */
35
  */
36
  public function get_server_path(): string {
37
  $directory_name = apply_filters( 'webpc_dir_name', $this->get_relative_path(), $this->get_type() );
38
+ return sprintf( '%1$s/%2$s', PathsGenerator::get_wordpress_root_path(), $directory_name );
39
  }
40
 
41
  /**
src/Conversion/Directory/DirectoryFactory.php CHANGED
@@ -10,11 +10,6 @@ use WebpConverter\Plugin\Uninstall\WebpFiles;
10
  */
11
  class DirectoryFactory implements HookableInterface {
12
 
13
- /**
14
- * @var PathsGenerator
15
- */
16
- private $paths_generator;
17
-
18
  /**
19
  * Object of directories integration.
20
  *
@@ -22,14 +17,12 @@ class DirectoryFactory implements HookableInterface {
22
  */
23
  private $directories_integration;
24
 
25
- public function __construct( PathsGenerator $paths_generator = null ) {
26
- $this->paths_generator = $paths_generator ?: new PathsGenerator();
27
-
28
- $this->set_integration( new GalleryDirectory( $this->paths_generator ) );
29
- $this->set_integration( new PluginsDirectory( $this->paths_generator ) );
30
- $this->set_integration( new ThemesDirectory( $this->paths_generator ) );
31
- $this->set_integration( new UploadsDirectory( $this->paths_generator ) );
32
- $this->set_integration( new UploadsWebpcDirectory( $this->paths_generator ) );
33
  }
34
 
35
  /**
@@ -41,7 +34,7 @@ class DirectoryFactory implements HookableInterface {
41
  */
42
  private function set_integration( DirectoryInterface $directory ) {
43
  if ( $this->directories_integration === null ) {
44
- $this->directories_integration = new DirectoryIntegration( $this->paths_generator );
45
  }
46
  $this->directories_integration->add_directory( $directory );
47
  }
10
  */
11
  class DirectoryFactory implements HookableInterface {
12
 
 
 
 
 
 
13
  /**
14
  * Object of directories integration.
15
  *
17
  */
18
  private $directories_integration;
19
 
20
+ public function __construct() {
21
+ $this->set_integration( new GalleryDirectory() );
22
+ $this->set_integration( new PluginsDirectory() );
23
+ $this->set_integration( new ThemesDirectory() );
24
+ $this->set_integration( new UploadsDirectory() );
25
+ $this->set_integration( new UploadsWebpcDirectory() );
 
 
26
  }
27
 
28
  /**
34
  */
35
  private function set_integration( DirectoryInterface $directory ) {
36
  if ( $this->directories_integration === null ) {
37
+ $this->directories_integration = new DirectoryIntegration();
38
  }
39
  $this->directories_integration->add_directory( $directory );
40
  }
src/Conversion/Directory/DirectoryIntegration.php CHANGED
@@ -4,17 +4,13 @@ namespace WebpConverter\Conversion\Directory;
4
 
5
  use WebpConverter\Conversion\OutputPath;
6
  use WebpConverter\HookableInterface;
 
7
 
8
  /**
9
  * Returns various types of paths for directories.
10
  */
11
  class DirectoryIntegration implements HookableInterface {
12
 
13
- /**
14
- * @var PathsGenerator
15
- */
16
- private $paths_generator;
17
-
18
  /**
19
  * Objects of supported directories.
20
  *
@@ -22,10 +18,6 @@ class DirectoryIntegration implements HookableInterface {
22
  */
23
  private $directories = [];
24
 
25
- public function __construct( PathsGenerator $paths_generator ) {
26
- $this->paths_generator = $paths_generator;
27
- }
28
-
29
  /**
30
  * {@inheritdoc}
31
  */
@@ -33,7 +25,6 @@ class DirectoryIntegration implements HookableInterface {
33
  add_filter( 'webpc_dir_name', [ $this, 'get_dir_as_name' ], 0, 2 );
34
  add_filter( 'webpc_dir_path', [ $this, 'get_dir_as_path' ], 0, 2 );
35
  add_filter( 'webpc_dir_url', [ $this, 'get_dir_as_url' ], 0, 2 );
36
- add_filter( 'webpc_uploads_prefix', [ $this, 'get_prefix_path' ], 0 );
37
  }
38
 
39
  /**
@@ -115,7 +106,7 @@ class DirectoryIntegration implements HookableInterface {
115
  }
116
  }
117
 
118
- return sprintf( '%1$s/%2$s', $this->paths_generator->get_wordpress_root_path(), $directory_name );
119
  }
120
 
121
  /**
@@ -140,25 +131,4 @@ class DirectoryIntegration implements HookableInterface {
140
  $source_url = apply_filters( 'webpc_site_url', get_site_url() );
141
  return sprintf( '%1$s/%2$s', $source_url, $directory_name );
142
  }
143
-
144
- /**
145
- * Returns prefix for wp-content directory for rules in .htaccess file.
146
- *
147
- * @return string Prefix for wp-content directory.
148
- * @internal
149
- */
150
- public function get_prefix_path(): string {
151
- $document_root = rtrim(
152
- preg_replace( '/(\/|\\\\)/', DIRECTORY_SEPARATOR, realpath( $_SERVER['DOCUMENT_ROOT'] ) ?: '' ) ?: '', // phpcs:ignore WordPress.Security.ValidatedSanitizedInput
153
- '\/'
154
- );
155
- $root_directory = rtrim(
156
- $this->paths_generator->get_wordpress_root_path(),
157
- '\/'
158
- );
159
- $diff_dir = trim( str_replace( $document_root, '', $root_directory ), '\/' );
160
- $diff_path = sprintf( '/%s/', $diff_dir );
161
-
162
- return str_replace( '//', '/', $diff_path );
163
- }
164
  }
4
 
5
  use WebpConverter\Conversion\OutputPath;
6
  use WebpConverter\HookableInterface;
7
+ use WebpConverter\Service\PathsGenerator;
8
 
9
  /**
10
  * Returns various types of paths for directories.
11
  */
12
  class DirectoryIntegration implements HookableInterface {
13
 
 
 
 
 
 
14
  /**
15
  * Objects of supported directories.
16
  *
18
  */
19
  private $directories = [];
20
 
 
 
 
 
21
  /**
22
  * {@inheritdoc}
23
  */
25
  add_filter( 'webpc_dir_name', [ $this, 'get_dir_as_name' ], 0, 2 );
26
  add_filter( 'webpc_dir_path', [ $this, 'get_dir_as_path' ], 0, 2 );
27
  add_filter( 'webpc_dir_url', [ $this, 'get_dir_as_url' ], 0, 2 );
 
28
  }
29
 
30
  /**
106
  }
107
  }
108
 
109
+ return sprintf( '%1$s/%2$s', PathsGenerator::get_wordpress_root_path(), $directory_name );
110
  }
111
 
112
  /**
131
  $source_url = apply_filters( 'webpc_site_url', get_site_url() );
132
  return sprintf( '%1$s/%2$s', $source_url, $directory_name );
133
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
  }
src/Error/Detector/PathsErrorsDetector.php CHANGED
@@ -2,26 +2,17 @@
2
 
3
  namespace WebpConverter\Error\Detector;
4
 
5
- use WebpConverter\Conversion\Directory\PathsGenerator;
6
  use WebpConverter\Error\Notice\PathHtaccessNotWritableNotice;
7
  use WebpConverter\Error\Notice\PathUploadsUnavailableNotice;
8
  use WebpConverter\Error\Notice\PathWebpDuplicatedNotice;
9
  use WebpConverter\Error\Notice\PathWebpNotWritableNotice;
 
10
 
11
  /**
12
  * Checks for configuration errors about incorrect paths of directories.
13
  */
14
  class PathsErrorsDetector implements ErrorDetector {
15
 
16
- /**
17
- * @var PathsGenerator
18
- */
19
- private $paths_generator;
20
-
21
- public function __construct( PathsGenerator $paths_generator = null ) {
22
- $this->paths_generator = $paths_generator ?: new PathsGenerator();
23
- }
24
-
25
  /**
26
  * {@inheritdoc}
27
  */
@@ -46,7 +37,7 @@ class PathsErrorsDetector implements ErrorDetector {
46
  */
47
  private function if_uploads_path_exists(): bool {
48
  $path = apply_filters( 'webpc_dir_path', '', 'uploads' );
49
- return ( is_dir( $path ) && ( $path !== $this->paths_generator->get_wordpress_root_path() ) );
50
  }
51
 
52
  /**
2
 
3
  namespace WebpConverter\Error\Detector;
4
 
 
5
  use WebpConverter\Error\Notice\PathHtaccessNotWritableNotice;
6
  use WebpConverter\Error\Notice\PathUploadsUnavailableNotice;
7
  use WebpConverter\Error\Notice\PathWebpDuplicatedNotice;
8
  use WebpConverter\Error\Notice\PathWebpNotWritableNotice;
9
+ use WebpConverter\Service\PathsGenerator;
10
 
11
  /**
12
  * Checks for configuration errors about incorrect paths of directories.
13
  */
14
  class PathsErrorsDetector implements ErrorDetector {
15
 
 
 
 
 
 
 
 
 
 
16
  /**
17
  * {@inheritdoc}
18
  */
37
  */
38
  private function if_uploads_path_exists(): bool {
39
  $path = apply_filters( 'webpc_dir_path', '', 'uploads' );
40
+ return ( is_dir( $path ) && ( $path !== PathsGenerator::get_wordpress_root_path() ) );
41
  }
42
 
43
  /**
src/Error/Detector/RewritesErrorsDetector.php CHANGED
@@ -91,7 +91,7 @@ class RewritesErrorsDetector implements ErrorDetector {
91
  return new RewritesNotExecutedNotice();
92
  }
93
 
94
- return new RewritesNotWorkingNotice();
95
  case PassthruLoader::LOADER_TYPE:
96
  if ( $this->if_redirects_are_works() === true ) {
97
  break;
91
  return new RewritesNotExecutedNotice();
92
  }
93
 
94
+ return new RewritesNotWorkingNotice( $this->plugin_data );
95
  case PassthruLoader::LOADER_TYPE:
96
  if ( $this->if_redirects_are_works() === true ) {
97
  break;
src/Error/Notice/RewritesNotWorkingNotice.php CHANGED
@@ -2,6 +2,9 @@
2
 
3
  namespace WebpConverter\Error\Notice;
4
 
 
 
 
5
  /**
6
  * {@inheritdoc}
7
  */
@@ -9,6 +12,15 @@ class RewritesNotWorkingNotice implements ErrorNotice {
9
 
10
  const ERROR_KEY = 'rewrites_not_working';
11
 
 
 
 
 
 
 
 
 
 
12
  /**
13
  * {@inheritdoc}
14
  */
@@ -20,14 +32,28 @@ class RewritesNotWorkingNotice implements ErrorNotice {
20
  * {@inheritdoc}
21
  */
22
  public function get_message(): array {
23
- return [
 
 
24
  sprintf(
25
  /* translators: %1$s: open strong tag, %2$s: close strong tag */
26
  __( 'Redirects on your server are not working. Check the correct configuration for you in %1$sthe plugin FAQ%2$s. If you have checked the configuration, it means that your server does not support redirects from the .htaccess file or your server configuration is not compatible with this plugin.', 'webp-converter-for-media' ),
27
  '<a href="https://wordpress.org/plugins/webp-converter-for-media/#faq" target="_blank">',
28
  '</a>'
29
  ),
30
- __( 'In this case, please contact your server administrator.', 'webp-converter-for-media' ),
31
  ];
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  }
33
  }
2
 
3
  namespace WebpConverter\Error\Notice;
4
 
5
+ use WebpConverter\PluginData;
6
+ use WebpConverter\Settings\Option\ExtraFeaturesOption;
7
+
8
  /**
9
  * {@inheritdoc}
10
  */
12
 
13
  const ERROR_KEY = 'rewrites_not_working';
14
 
15
+ /**
16
+ * @var PluginData
17
+ */
18
+ private $plugin_data;
19
+
20
+ public function __construct( PluginData $plugin_data ) {
21
+ $this->plugin_data = $plugin_data;
22
+ }
23
+
24
  /**
25
  * {@inheritdoc}
26
  */
32
  * {@inheritdoc}
33
  */
34
  public function get_message(): array {
35
+ $plugin_settings = $this->plugin_data->get_plugin_settings();
36
+
37
+ $message = [
38
  sprintf(
39
  /* translators: %1$s: open strong tag, %2$s: close strong tag */
40
  __( 'Redirects on your server are not working. Check the correct configuration for you in %1$sthe plugin FAQ%2$s. If you have checked the configuration, it means that your server does not support redirects from the .htaccess file or your server configuration is not compatible with this plugin.', 'webp-converter-for-media' ),
41
  '<a href="https://wordpress.org/plugins/webp-converter-for-media/#faq" target="_blank">',
42
  '</a>'
43
  ),
 
44
  ];
45
+ if ( ! in_array( ExtraFeaturesOption::OPTION_VALUE_FORCE_DOCUMENT_ROOT, $plugin_settings[ ExtraFeaturesOption::OPTION_NAME ] ) ) {
46
+ $message[] = sprintf(
47
+ /* translators: %1$s: option label, %2$s: open anchor tag, %2$s: close anchor tag */
48
+ __( 'Try to activate the "%1$s" option in the plugin settings. This should solve your problem. In case of any problems, please %2$scontact us%3$s.', 'webp-converter-for-media' ),
49
+ '<strong>' . __( 'Use absolute path (ABSPATH) instead of %{DOCUMENT_ROOT} for rewrites in .htaccess file', 'webp-converter-for-media' ) . '</strong>',
50
+ '<a href="https://wordpress.org/support/plugin/webp-converter-for-media/" target="_blank">',
51
+ '</a>'
52
+ );
53
+ } else {
54
+ $message[] = __( 'In this case, please contact your server administrator.', 'webp-converter-for-media' );
55
+ }
56
+
57
+ return $message;
58
  }
59
  }
src/Loader/HtaccessLoader.php CHANGED
@@ -2,6 +2,7 @@
2
 
3
  namespace WebpConverter\Loader;
4
 
 
5
  use WebpConverter\Settings\Option\ExtraFeaturesOption;
6
  use WebpConverter\Settings\Option\LoaderTypeOption;
7
  use WebpConverter\Settings\Option\SupportedExtensionsOption;
@@ -89,7 +90,7 @@ class HtaccessLoader extends LoaderAbstract {
89
  $path_parts = explode( '/', apply_filters( 'webpc_dir_name', '', 'uploads' ) );
90
  $content = $this->add_comments_to_rules(
91
  [
92
- $this->get_mod_rewrite_rules( $settings, false, end( $path_parts ) ),
93
  ]
94
  );
95
 
@@ -126,28 +127,34 @@ class HtaccessLoader extends LoaderAbstract {
126
  /**
127
  * Generates rules for rewriting source images to output images.
128
  *
129
- * @param mixed[] $settings Plugin settings.
130
- * @param bool $add_slash_prefix Slash as prefix before RewriteRule.
131
- * @param string|null $output_path Location of .htaccess file.
132
  *
133
  * @return string Rules for .htaccess file.
134
  */
135
- private function get_mod_rewrite_rules( array $settings, bool $add_slash_prefix = false, string $output_path = null ): string {
136
  $content = '';
137
  if ( ! $settings[ SupportedExtensionsOption::OPTION_NAME ] ) {
138
  return $content;
139
  }
140
 
141
- $root_document = preg_replace( '/(\/|\\\\)/', '/', rtrim( $_SERVER['DOCUMENT_ROOT'], '\/' ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput
142
- $root_wordpress = preg_replace( '/(\/|\\\\)/', '/', rtrim( ABSPATH, '\/' ) );
 
143
 
144
- $document_root = ( $root_document !== $root_wordpress ) ? $root_wordpress : '%{DOCUMENT_ROOT}';
145
- $prefix_path = apply_filters( 'webpc_uploads_prefix', '/' );
146
- $prefix_rule = apply_filters( 'webpc_htaccess_prefix_rule', $prefix_path );
147
- $prefix_slash = ( $add_slash_prefix ) ? '/' : '';
148
- $path = apply_filters( 'webpc_dir_name', '', 'webp' );
149
- if ( $output_path !== null ) {
150
- $path .= '/' . $output_path;
 
 
 
 
 
 
151
  }
152
 
153
  foreach ( $this->get_mime_types() as $format => $mime_type ) {
@@ -155,16 +162,16 @@ class HtaccessLoader extends LoaderAbstract {
155
  $content .= ' RewriteEngine On' . PHP_EOL;
156
  foreach ( $settings[ SupportedExtensionsOption::OPTION_NAME ] as $ext ) {
157
  $content .= " RewriteCond %{HTTP_ACCEPT} ${mime_type}" . PHP_EOL;
158
- $content .= " RewriteCond ${document_root}${prefix_path}${path}/$1.${ext}.${format} -f" . PHP_EOL;
159
  if ( ! in_array( ExtraFeaturesOption::OPTION_VALUE_REFERER_DISABLED, $settings[ ExtraFeaturesOption::OPTION_NAME ] ) ) {
160
  $content .= " RewriteCond %{HTTP_HOST}@@%{HTTP_REFERER} ^([^@]*)@@https?://\\1/.*" . PHP_EOL;
161
  }
162
- $content .= " RewriteRule ${prefix_slash}(.+)\.${ext}$ ${prefix_rule}${path}/$1.${ext}.${format} [NC,T=${mime_type},L]" . PHP_EOL;
163
  }
164
  $content .= '</IfModule>' . PHP_EOL;
165
  }
166
 
167
- return apply_filters( 'webpc_htaccess_mod_rewrite', trim( $content ), $path );
168
  }
169
 
170
  /**
2
 
3
  namespace WebpConverter\Loader;
4
 
5
+ use WebpConverter\Service\PathsGenerator;
6
  use WebpConverter\Settings\Option\ExtraFeaturesOption;
7
  use WebpConverter\Settings\Option\LoaderTypeOption;
8
  use WebpConverter\Settings\Option\SupportedExtensionsOption;
90
  $path_parts = explode( '/', apply_filters( 'webpc_dir_name', '', 'uploads' ) );
91
  $content = $this->add_comments_to_rules(
92
  [
93
+ $this->get_mod_rewrite_rules( $settings, end( $path_parts ) ),
94
  ]
95
  );
96
 
127
  /**
128
  * Generates rules for rewriting source images to output images.
129
  *
130
+ * @param mixed[] $settings Plugin settings.
131
+ * @param string|null $output_path_suffix Location of .htaccess file.
 
132
  *
133
  * @return string Rules for .htaccess file.
134
  */
135
+ private function get_mod_rewrite_rules( array $settings, string $output_path_suffix = null ): string {
136
  $content = '';
137
  if ( ! $settings[ SupportedExtensionsOption::OPTION_NAME ] ) {
138
  return $content;
139
  }
140
 
141
+ $root_document = preg_replace( '/(\/|\\\\)/', '/', rtrim( realpath( $_SERVER['DOCUMENT_ROOT'] ) ?: '', '\/' ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput
142
+ $root_wordpress = preg_replace( '/(\/|\\\\)/', '/', rtrim( PathsGenerator::get_wordpress_root_path(), '\/' ) );
143
+ $is_force_document = ( in_array( ExtraFeaturesOption::OPTION_VALUE_FORCE_DOCUMENT_ROOT, $settings[ ExtraFeaturesOption::OPTION_NAME ] ) );
144
 
145
+ $root_path = trim( str_replace( $root_document ?: '', '', $root_wordpress ?: '' ), '\/' );
146
+ $root_suffix = apply_filters(
147
+ 'webpc_htaccess_rewrite_path',
148
+ apply_filters( 'webpc_uploads_prefix', str_replace( '//', '/', sprintf( '/%s/', $root_path ) ) )
149
+ );
150
+ $document_root = apply_filters(
151
+ 'webpc_htaccess_rewrite_root',
152
+ ( $is_force_document ) ? ( $root_wordpress . '/' ) : ( '%{DOCUMENT_ROOT}' . $root_suffix )
153
+ );
154
+
155
+ $output_path = apply_filters( 'webpc_dir_name', '', 'webp' );
156
+ if ( $output_path_suffix !== null ) {
157
+ $output_path .= '/' . $output_path_suffix;
158
  }
159
 
160
  foreach ( $this->get_mime_types() as $format => $mime_type ) {
162
  $content .= ' RewriteEngine On' . PHP_EOL;
163
  foreach ( $settings[ SupportedExtensionsOption::OPTION_NAME ] as $ext ) {
164
  $content .= " RewriteCond %{HTTP_ACCEPT} ${mime_type}" . PHP_EOL;
165
+ $content .= " RewriteCond ${document_root}${output_path}/$1.${ext}.${format} -f" . PHP_EOL;
166
  if ( ! in_array( ExtraFeaturesOption::OPTION_VALUE_REFERER_DISABLED, $settings[ ExtraFeaturesOption::OPTION_NAME ] ) ) {
167
  $content .= " RewriteCond %{HTTP_HOST}@@%{HTTP_REFERER} ^([^@]*)@@https?://\\1/.*" . PHP_EOL;
168
  }
169
+ $content .= " RewriteRule (.+)\.${ext}$ ${root_suffix}${output_path}/$1.${ext}.${format} [NC,T=${mime_type},L]" . PHP_EOL;
170
  }
171
  $content .= '</IfModule>' . PHP_EOL;
172
  }
173
 
174
+ return apply_filters( 'webpc_htaccess_mod_rewrite', trim( $content ), $output_path );
175
  }
176
 
177
  /**
src/{Conversion/Directory → Service}/PathsGenerator.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- namespace WebpConverter\Conversion\Directory;
4
 
5
  /**
6
  * Manages generation of server paths.
@@ -10,7 +10,7 @@ class PathsGenerator {
10
  /**
11
  * Returns path to root directory of WordPress installation.
12
  */
13
- public function get_wordpress_root_path(): string {
14
  return apply_filters(
15
  'webpc_site_root',
16
  preg_replace( '/(\/|\\\\)/', DIRECTORY_SEPARATOR, dirname( wp_upload_dir()['basedir'], 2 ) )
1
  <?php
2
 
3
+ namespace WebpConverter\Service;
4
 
5
  /**
6
  * Manages generation of server paths.
10
  /**
11
  * Returns path to root directory of WordPress installation.
12
  */
13
+ public static function get_wordpress_root_path(): string {
14
  return apply_filters(
15
  'webpc_site_root',
16
  preg_replace( '/(\/|\\\\)/', DIRECTORY_SEPARATOR, dirname( wp_upload_dir()['basedir'], 2 ) )
src/Settings/Option/ExtraFeaturesOption.php CHANGED
@@ -10,13 +10,14 @@ use WebpConverter\Loader\PassthruLoader;
10
  */
11
  class ExtraFeaturesOption extends OptionAbstract {
12
 
13
- const OPTION_NAME = 'features';
14
- const OPTION_VALUE_ONLY_SMALLER = 'only_smaller';
15
- const OPTION_VALUE_MOD_EXPIRES = 'mod_expires';
16
- const OPTION_VALUE_KEEP_METADATA = 'keep_metadata';
17
- const OPTION_VALUE_CRON_ENABLED = 'cron_enabled';
18
- const OPTION_VALUE_REFERER_DISABLED = 'referer_disabled';
19
- const OPTION_VALUE_DEBUG_ENABLED = 'debug_enabled';
 
20
 
21
  /**
22
  * {@inheritdoc}
@@ -60,30 +61,35 @@ class ExtraFeaturesOption extends OptionAbstract {
60
  */
61
  public function get_values( array $settings ): array {
62
  return [
63
- self::OPTION_VALUE_ONLY_SMALLER => __(
64
  'Automatic removal of files in output formats larger than original',
65
  'webp-converter-for-media'
66
  ),
67
- self::OPTION_VALUE_MOD_EXPIRES => __(
68
  'Browser Caching for files in output formats (saving images in browser cache memory)',
69
  'webp-converter-for-media'
70
  ),
71
- self::OPTION_VALUE_KEEP_METADATA => __(
72
  'Keep images metadata stored in EXIF or XMP formats (unavailable for GD conversion method)',
73
  'webp-converter-for-media'
74
  ),
75
- self::OPTION_VALUE_CRON_ENABLED => __(
76
  'Enable cron to automatically convert images from outside Media Library (images from Media Library are converted immediately after upload)',
77
  'webp-converter-for-media'
78
  ),
79
- self::OPTION_VALUE_REFERER_DISABLED => __(
80
  'Force redirections to output formats for all domains (by default, images in output formats are loaded only in domain of your website - when image is displayed via URL on another domain that original file is loaded)',
81
  'webp-converter-for-media'
82
  ),
83
- self::OPTION_VALUE_DEBUG_ENABLED => __(
84
  'Log errors while converting to debug.log file (when debugging in WordPress is active)',
85
  'webp-converter-for-media'
86
  ),
 
 
 
 
 
87
  ];
88
  }
89
 
@@ -100,6 +106,9 @@ class ExtraFeaturesOption extends OptionAbstract {
100
  if ( ( $settings[ LoaderTypeOption::OPTION_NAME ] ?? '' ) === PassthruLoader::LOADER_TYPE ) {
101
  $values[] = self::OPTION_VALUE_REFERER_DISABLED;
102
  }
 
 
 
103
  return $values;
104
  }
105
 
@@ -123,8 +132,11 @@ class ExtraFeaturesOption extends OptionAbstract {
123
  * @return string[]
124
  */
125
  public function get_value_for_debug( array $settings ): array {
126
- return [
127
- self::OPTION_VALUE_REFERER_DISABLED,
128
- ];
 
 
 
129
  }
130
  }
10
  */
11
  class ExtraFeaturesOption extends OptionAbstract {
12
 
13
+ const OPTION_NAME = 'features';
14
+ const OPTION_VALUE_ONLY_SMALLER = 'only_smaller';
15
+ const OPTION_VALUE_MOD_EXPIRES = 'mod_expires';
16
+ const OPTION_VALUE_KEEP_METADATA = 'keep_metadata';
17
+ const OPTION_VALUE_CRON_ENABLED = 'cron_enabled';
18
+ const OPTION_VALUE_REFERER_DISABLED = 'referer_disabled';
19
+ const OPTION_VALUE_DEBUG_ENABLED = 'debug_enabled';
20
+ const OPTION_VALUE_FORCE_DOCUMENT_ROOT = 'force_document_root';
21
 
22
  /**
23
  * {@inheritdoc}
61
  */
62
  public function get_values( array $settings ): array {
63
  return [
64
+ self::OPTION_VALUE_ONLY_SMALLER => __(
65
  'Automatic removal of files in output formats larger than original',
66
  'webp-converter-for-media'
67
  ),
68
+ self::OPTION_VALUE_MOD_EXPIRES => __(
69
  'Browser Caching for files in output formats (saving images in browser cache memory)',
70
  'webp-converter-for-media'
71
  ),
72
+ self::OPTION_VALUE_KEEP_METADATA => __(
73
  'Keep images metadata stored in EXIF or XMP formats (unavailable for GD conversion method)',
74
  'webp-converter-for-media'
75
  ),
76
+ self::OPTION_VALUE_CRON_ENABLED => __(
77
  'Enable cron to automatically convert images from outside Media Library (images from Media Library are converted immediately after upload)',
78
  'webp-converter-for-media'
79
  ),
80
+ self::OPTION_VALUE_REFERER_DISABLED => __(
81
  'Force redirections to output formats for all domains (by default, images in output formats are loaded only in domain of your website - when image is displayed via URL on another domain that original file is loaded)',
82
  'webp-converter-for-media'
83
  ),
84
+ self::OPTION_VALUE_DEBUG_ENABLED => __(
85
  'Log errors while converting to debug.log file (when debugging in WordPress is active)',
86
  'webp-converter-for-media'
87
  ),
88
+ self::OPTION_VALUE_FORCE_DOCUMENT_ROOT => sprintf(
89
+ '%1$s (%2$s)',
90
+ __( 'Use absolute path (ABSPATH) instead of %{DOCUMENT_ROOT} for rewrites in .htaccess file', 'webp-converter-for-media' ),
91
+ __( 'try when there is server configuration error with code rewrites_not_working', 'webp-converter-for-media' )
92
+ ),
93
  ];
94
  }
95
 
106
  if ( ( $settings[ LoaderTypeOption::OPTION_NAME ] ?? '' ) === PassthruLoader::LOADER_TYPE ) {
107
  $values[] = self::OPTION_VALUE_REFERER_DISABLED;
108
  }
109
+ if ( ( $settings[ LoaderTypeOption::OPTION_NAME ] ?? '' ) === PassthruLoader::LOADER_TYPE ) {
110
+ $values[] = self::OPTION_VALUE_FORCE_DOCUMENT_ROOT;
111
+ }
112
  return $values;
113
  }
114
 
132
  * @return string[]
133
  */
134
  public function get_value_for_debug( array $settings ): array {
135
+ return array_merge(
136
+ $settings[ self::OPTION_NAME ] ?? [],
137
+ [
138
+ self::OPTION_VALUE_REFERER_DISABLED,
139
+ ]
140
+ );
141
  }
142
  }
src/Settings/Page/DebugPage.php CHANGED
@@ -3,7 +3,6 @@
3
 
4
  namespace WebpConverter\Settings\Page;
5
 
6
- use WebpConverter\Conversion\Directory\PathsGenerator;
7
  use WebpConverter\Error\Detector\RewritesErrorsDetector;
8
  use WebpConverter\Loader\LoaderAbstract;
9
  use WebpConverter\PluginData;
@@ -31,19 +30,12 @@ class DebugPage extends PageAbstract {
31
  */
32
  private $file_loader;
33
 
34
- /**
35
- * @var PathsGenerator
36
- */
37
- private $paths_generator;
38
-
39
  public function __construct(
40
  PluginInfo $plugin_info, PluginData $plugin_data,
41
- FileLoader $file_loader = null,
42
- PathsGenerator $paths_generator = null
43
  ) {
44
- $this->plugin_info = $plugin_info;
45
- $this->file_loader = $file_loader ?: new FileLoader( $plugin_info, $plugin_data );
46
- $this->paths_generator = $paths_generator ?: new PathsGenerator();
47
  }
48
 
49
  /**
@@ -68,7 +60,6 @@ class DebugPage extends PageAbstract {
68
  [
69
  'settings_url' => PageIntegration::get_settings_page_url(),
70
  'settings_debug_url' => PageIntegration::get_settings_page_url( 'server' ),
71
- 'site_root_path' => $this->paths_generator->get_wordpress_root_path(),
72
  'size_png_path' => $this->file_loader->get_file_size_by_path(
73
  $uploads_path . RewritesErrorsDetector::PATH_OUTPUT_FILE_PNG
74
  ),
3
 
4
  namespace WebpConverter\Settings\Page;
5
 
 
6
  use WebpConverter\Error\Detector\RewritesErrorsDetector;
7
  use WebpConverter\Loader\LoaderAbstract;
8
  use WebpConverter\PluginData;
30
  */
31
  private $file_loader;
32
 
 
 
 
 
 
33
  public function __construct(
34
  PluginInfo $plugin_info, PluginData $plugin_data,
35
+ FileLoader $file_loader = null
 
36
  ) {
37
+ $this->plugin_info = $plugin_info;
38
+ $this->file_loader = $file_loader ?: new FileLoader( $plugin_info, $plugin_data );
 
39
  }
40
 
41
  /**
60
  [
61
  'settings_url' => PageIntegration::get_settings_page_url(),
62
  'settings_debug_url' => PageIntegration::get_settings_page_url( 'server' ),
 
63
  'size_png_path' => $this->file_loader->get_file_size_by_path(
64
  $uploads_path . RewritesErrorsDetector::PATH_OUTPUT_FILE_PNG
65
  ),
templates/components/server/filters.php CHANGED
@@ -2,7 +2,6 @@
2
  /**
3
  * Information about using filters displayed in server configuration widget.
4
  *
5
- * @var string $site_root_path Root path of WordPress installation.
6
  * @package WebP Converter for Media
7
  */
8
 
@@ -13,7 +12,7 @@
13
  <tr>
14
  <td class="e">webpc_site_root</td>
15
  <td class="v">
16
- <?php echo esc_html( apply_filters( 'webpc_site_root', $site_root_path ) ); ?>
17
  </td>
18
  </tr>
19
  <tr>
@@ -47,15 +46,21 @@
47
  </td>
48
  </tr>
49
  <tr>
50
- <td class="e">webpc_uploads_prefix</td>
 
 
 
 
 
 
51
  <td class="v">
52
- <?php echo esc_html( apply_filters( 'webpc_uploads_prefix', '/' ) ); ?>
53
  </td>
54
  </tr>
55
  <tr>
56
- <td class="e">webpc_htaccess_prefix_rule</td>
57
  <td class="v">
58
- <?php echo esc_html( apply_filters( 'webpc_htaccess_prefix_rule', apply_filters( 'webpc_uploads_prefix', '/' ) ) ); ?>
59
  </td>
60
  </tr>
61
  </tbody>
2
  /**
3
  * Information about using filters displayed in server configuration widget.
4
  *
 
5
  * @package WebP Converter for Media
6
  */
7
 
12
  <tr>
13
  <td class="e">webpc_site_root</td>
14
  <td class="v">
15
+ <?php echo esc_html( apply_filters( 'webpc_site_root', '-' ) ); ?>
16
  </td>
17
  </tr>
18
  <tr>
46
  </td>
47
  </tr>
48
  <tr>
49
+ <td class="e">webpc_htaccess_rewrite_root</td>
50
+ <td class="v">
51
+ <?php echo esc_html( apply_filters( 'webpc_htaccess_rewrite_root', '-' ) ); ?>
52
+ </td>
53
+ </tr>
54
+ <tr>
55
+ <td class="e">webpc_htaccess_rewrite_path</td>
56
  <td class="v">
57
+ <?php echo esc_html( apply_filters( 'webpc_htaccess_rewrite_path', '-' ) ); ?>
58
  </td>
59
  </tr>
60
  <tr>
61
+ <td class="e">webpc_uploads_prefix</td>
62
  <td class="v">
63
+ <?php echo esc_html( apply_filters( 'webpc_uploads_prefix', '-' ) ); ?>
64
  </td>
65
  </tr>
66
  </tbody>
templates/components/server/wordpress.php CHANGED
@@ -21,6 +21,12 @@
21
  <?php echo esc_html( $_SERVER['DOCUMENT_ROOT'] ?? '-' ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput ?>
22
  </td>
23
  </tr>
 
 
 
 
 
 
24
  <tr>
25
  <td class="e">wp_upload_dir <em>(basedir)</em></td>
26
  <td class="v">
21
  <?php echo esc_html( $_SERVER['DOCUMENT_ROOT'] ?? '-' ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput ?>
22
  </td>
23
  </tr>
24
+ <tr>
25
+ <td class="e">DOCUMENT_ROOT <em>(realpath)</em></td>
26
+ <td class="v">
27
+ <?php echo esc_html( realpath( $_SERVER['DOCUMENT_ROOT'] ?? '-' ) ?: '' ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput ?>
28
+ </td>
29
+ </tr>
30
  <tr>
31
  <td class="e">wp_upload_dir <em>(basedir)</em></td>
32
  <td class="v">
templates/components/widgets/server.php CHANGED
@@ -3,7 +3,6 @@
3
  * Widget displayed server configuration on plugin settings page.
4
  *
5
  * @var string $settings_url URL of plugin settings page.
6
- * @var string $site_root_path Root path of WordPress installation.
7
  * @var string $size_png_path Size of file.
8
  * @var string $size_png2_path Size of file.
9
  * @var string $size_png_url Size of file.
3
  * Widget displayed server configuration on plugin settings page.
4
  *
5
  * @var string $settings_url URL of plugin settings page.
 
6
  * @var string $size_png_path Size of file.
7
  * @var string $size_png2_path Size of file.
8
  * @var string $size_png_url Size of file.
templates/views/settings-debug.php CHANGED
@@ -3,7 +3,6 @@
3
  * Debug tab of plugin settings page.
4
  *
5
  * @var string $settings_url URL of plugin settings page (default view).
6
- * @var string $site_root_path Root path of WordPress installation.
7
  * @var string $size_png_path Size of file.
8
  * @var string $size_png2_path Size of file.
9
  * @var string $size_png_url Size of file.
3
  * Debug tab of plugin settings page.
4
  *
5
  * @var string $settings_url URL of plugin settings page (default view).
 
6
  * @var string $size_png_path Size of file.
7
  * @var string $size_png2_path Size of file.
8
  * @var string $size_png_url Size of file.
vendor/composer/autoload_classmap.php CHANGED
@@ -35,7 +35,6 @@ return array(
35
  'WebpConverter\\Conversion\\Directory\\DirectoryIntegration' => $baseDir . '/src/Conversion/Directory/DirectoryIntegration.php',
36
  'WebpConverter\\Conversion\\Directory\\DirectoryInterface' => $baseDir . '/src/Conversion/Directory/DirectoryInterface.php',
37
  'WebpConverter\\Conversion\\Directory\\GalleryDirectory' => $baseDir . '/src/Conversion/Directory/GalleryDirectory.php',
38
- 'WebpConverter\\Conversion\\Directory\\PathsGenerator' => $baseDir . '/src/Conversion/Directory/PathsGenerator.php',
39
  'WebpConverter\\Conversion\\Directory\\PluginsDirectory' => $baseDir . '/src/Conversion/Directory/PluginsDirectory.php',
40
  'WebpConverter\\Conversion\\Directory\\ThemesDirectory' => $baseDir . '/src/Conversion/Directory/ThemesDirectory.php',
41
  'WebpConverter\\Conversion\\Directory\\UploadsDirectory' => $baseDir . '/src/Conversion/Directory/UploadsDirectory.php',
@@ -152,6 +151,7 @@ return array(
152
  'WebpConverter\\Service\\FileLoader' => $baseDir . '/src/Service/FileLoader.php',
153
  'WebpConverter\\Service\\NonceManager' => $baseDir . '/src/Service/NonceManager.php',
154
  'WebpConverter\\Service\\OptionsAccessManager' => $baseDir . '/src/Service/OptionsAccessManager.php',
 
155
  'WebpConverter\\Service\\ServerConfigurator' => $baseDir . '/src/Service/ServerConfigurator.php',
156
  'WebpConverter\\Service\\StatsManager' => $baseDir . '/src/Service/StatsManager.php',
157
  'WebpConverter\\Service\\TokenValidator' => $baseDir . '/src/Service/TokenValidator.php',
35
  'WebpConverter\\Conversion\\Directory\\DirectoryIntegration' => $baseDir . '/src/Conversion/Directory/DirectoryIntegration.php',
36
  'WebpConverter\\Conversion\\Directory\\DirectoryInterface' => $baseDir . '/src/Conversion/Directory/DirectoryInterface.php',
37
  'WebpConverter\\Conversion\\Directory\\GalleryDirectory' => $baseDir . '/src/Conversion/Directory/GalleryDirectory.php',
 
38
  'WebpConverter\\Conversion\\Directory\\PluginsDirectory' => $baseDir . '/src/Conversion/Directory/PluginsDirectory.php',
39
  'WebpConverter\\Conversion\\Directory\\ThemesDirectory' => $baseDir . '/src/Conversion/Directory/ThemesDirectory.php',
40
  'WebpConverter\\Conversion\\Directory\\UploadsDirectory' => $baseDir . '/src/Conversion/Directory/UploadsDirectory.php',
151
  'WebpConverter\\Service\\FileLoader' => $baseDir . '/src/Service/FileLoader.php',
152
  'WebpConverter\\Service\\NonceManager' => $baseDir . '/src/Service/NonceManager.php',
153
  'WebpConverter\\Service\\OptionsAccessManager' => $baseDir . '/src/Service/OptionsAccessManager.php',
154
+ 'WebpConverter\\Service\\PathsGenerator' => $baseDir . '/src/Service/PathsGenerator.php',
155
  'WebpConverter\\Service\\ServerConfigurator' => $baseDir . '/src/Service/ServerConfigurator.php',
156
  'WebpConverter\\Service\\StatsManager' => $baseDir . '/src/Service/StatsManager.php',
157
  'WebpConverter\\Service\\TokenValidator' => $baseDir . '/src/Service/TokenValidator.php',
vendor/composer/autoload_static.php CHANGED
@@ -50,7 +50,6 @@ class ComposerStaticInit024f0a84246706a5ce089d47fa9fe20c
50
  'WebpConverter\\Conversion\\Directory\\DirectoryIntegration' => __DIR__ . '/../..' . '/src/Conversion/Directory/DirectoryIntegration.php',
51
  'WebpConverter\\Conversion\\Directory\\DirectoryInterface' => __DIR__ . '/../..' . '/src/Conversion/Directory/DirectoryInterface.php',
52
  'WebpConverter\\Conversion\\Directory\\GalleryDirectory' => __DIR__ . '/../..' . '/src/Conversion/Directory/GalleryDirectory.php',
53
- 'WebpConverter\\Conversion\\Directory\\PathsGenerator' => __DIR__ . '/../..' . '/src/Conversion/Directory/PathsGenerator.php',
54
  'WebpConverter\\Conversion\\Directory\\PluginsDirectory' => __DIR__ . '/../..' . '/src/Conversion/Directory/PluginsDirectory.php',
55
  'WebpConverter\\Conversion\\Directory\\ThemesDirectory' => __DIR__ . '/../..' . '/src/Conversion/Directory/ThemesDirectory.php',
56
  'WebpConverter\\Conversion\\Directory\\UploadsDirectory' => __DIR__ . '/../..' . '/src/Conversion/Directory/UploadsDirectory.php',
@@ -167,6 +166,7 @@ class ComposerStaticInit024f0a84246706a5ce089d47fa9fe20c
167
  'WebpConverter\\Service\\FileLoader' => __DIR__ . '/../..' . '/src/Service/FileLoader.php',
168
  'WebpConverter\\Service\\NonceManager' => __DIR__ . '/../..' . '/src/Service/NonceManager.php',
169
  'WebpConverter\\Service\\OptionsAccessManager' => __DIR__ . '/../..' . '/src/Service/OptionsAccessManager.php',
 
170
  'WebpConverter\\Service\\ServerConfigurator' => __DIR__ . '/../..' . '/src/Service/ServerConfigurator.php',
171
  'WebpConverter\\Service\\StatsManager' => __DIR__ . '/../..' . '/src/Service/StatsManager.php',
172
  'WebpConverter\\Service\\TokenValidator' => __DIR__ . '/../..' . '/src/Service/TokenValidator.php',
50
  'WebpConverter\\Conversion\\Directory\\DirectoryIntegration' => __DIR__ . '/../..' . '/src/Conversion/Directory/DirectoryIntegration.php',
51
  'WebpConverter\\Conversion\\Directory\\DirectoryInterface' => __DIR__ . '/../..' . '/src/Conversion/Directory/DirectoryInterface.php',
52
  'WebpConverter\\Conversion\\Directory\\GalleryDirectory' => __DIR__ . '/../..' . '/src/Conversion/Directory/GalleryDirectory.php',
 
53
  'WebpConverter\\Conversion\\Directory\\PluginsDirectory' => __DIR__ . '/../..' . '/src/Conversion/Directory/PluginsDirectory.php',
54
  'WebpConverter\\Conversion\\Directory\\ThemesDirectory' => __DIR__ . '/../..' . '/src/Conversion/Directory/ThemesDirectory.php',
55
  'WebpConverter\\Conversion\\Directory\\UploadsDirectory' => __DIR__ . '/../..' . '/src/Conversion/Directory/UploadsDirectory.php',
166
  'WebpConverter\\Service\\FileLoader' => __DIR__ . '/../..' . '/src/Service/FileLoader.php',
167
  'WebpConverter\\Service\\NonceManager' => __DIR__ . '/../..' . '/src/Service/NonceManager.php',
168
  'WebpConverter\\Service\\OptionsAccessManager' => __DIR__ . '/../..' . '/src/Service/OptionsAccessManager.php',
169
+ 'WebpConverter\\Service\\PathsGenerator' => __DIR__ . '/../..' . '/src/Service/PathsGenerator.php',
170
  'WebpConverter\\Service\\ServerConfigurator' => __DIR__ . '/../..' . '/src/Service/ServerConfigurator.php',
171
  'WebpConverter\\Service\\StatsManager' => __DIR__ . '/../..' . '/src/Service/StatsManager.php',
172
  'WebpConverter\\Service\\TokenValidator' => __DIR__ . '/../..' . '/src/Service/TokenValidator.php',
vendor/composer/installed.php CHANGED
@@ -5,7 +5,7 @@
5
  'type' => 'library',
6
  'install_path' => __DIR__ . '/../../',
7
  'aliases' => array(),
8
- 'reference' => '3cf69f461ded76f3360f093894aa6efcb1c50527',
9
  'name' => 'gbiorczyk/webp-converter-for-media',
10
  'dev' => false,
11
  ),
@@ -16,7 +16,7 @@
16
  'type' => 'library',
17
  'install_path' => __DIR__ . '/../../',
18
  'aliases' => array(),
19
- 'reference' => '3cf69f461ded76f3360f093894aa6efcb1c50527',
20
  'dev_requirement' => false,
21
  ),
22
  'matt-plugins/deactivation-modal' => array(
5
  'type' => 'library',
6
  'install_path' => __DIR__ . '/../../',
7
  'aliases' => array(),
8
+ 'reference' => '265b990f6c489b80e9cab5abb2dba86669f41b7a',
9
  'name' => 'gbiorczyk/webp-converter-for-media',
10
  'dev' => false,
11
  ),
16
  'type' => 'library',
17
  'install_path' => __DIR__ . '/../../',
18
  'aliases' => array(),
19
+ 'reference' => '265b990f6c489b80e9cab5abb2dba86669f41b7a',
20
  'dev_requirement' => false,
21
  ),
22
  'matt-plugins/deactivation-modal' => array(
webp-converter-for-media.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Plugin Name: WebP Converter for Media
5
  * Description: Speed up your website by serving WebP and AVIF images instead of standard formats JPEG, PNG and GIF. Reduce image sizes just now!
6
- * Version: 4.3.0
7
  * Author: Mateusz Gbiorczyk
8
  * Author URI: https://mattplugins.com/
9
  * Text Domain: webp-converter-for-media
@@ -13,5 +13,5 @@
13
  require_once __DIR__ . '/vendor/autoload.php';
14
 
15
  new WebpConverter\WebpConverter(
16
- new WebpConverter\PluginInfo( __FILE__, '4.3.0' )
17
  );
3
  /**
4
  * Plugin Name: WebP Converter for Media
5
  * Description: Speed up your website by serving WebP and AVIF images instead of standard formats JPEG, PNG and GIF. Reduce image sizes just now!
6
+ * Version: 4.3.1
7
  * Author: Mateusz Gbiorczyk
8
  * Author URI: https://mattplugins.com/
9
  * Text Domain: webp-converter-for-media
13
  require_once __DIR__ . '/vendor/autoload.php';
14
 
15
  new WebpConverter\WebpConverter(
16
+ new WebpConverter\PluginInfo( __FILE__, '4.3.1' )
17
  );