Version Description
(2021-11-21) =
* [Fixed]
Automatic image conversion when /uploads directory is not organized into monthly and yearly folders
* [Fixed]
Displaying errors when converting images
Download this release
Release Info
Developer | mateuszgbiorczyk |
Plugin | Converter for Media – Optimize images | Convert WebP & AVIF |
Version | 3.2.4 |
Comparing to | |
See all releases |
Code changes from version 3.2.3 to 3.2.4
- assets/build/css/styles.css +1 -1
- assets/build/js/scripts.js +1 -1
- changelog.txt +4 -0
- readme.txt +16 -12
- src/Conversion/Endpoint/PathsEndpoint.php +8 -2
- src/Conversion/Media/Upload.php +6 -4
- src/Conversion/Method/GdMethod.php +0 -3
- src/Conversion/Method/ImagickMethod.php +1 -5
- src/Conversion/Method/MethodAbstract.php +12 -0
- src/Conversion/Method/MethodFactory.php +1 -0
- src/Conversion/Method/MethodIntegrator.php +4 -3
- src/Conversion/Method/MethodInterface.php +5 -4
- src/Conversion/SkipConvertedPaths.php +8 -4
- src/Error/Detector/LibsWithoutAvifSupportDetector.php +0 -40
- src/Error/Detector/RewritesErrorsDetector.php +1 -1
- src/Error/ErrorDetectorAggregator.php +3 -6
- src/Error/Notice/LibsWithoutAvifSupportNotice.php +0 -28
- src/Loader/HtaccessLoader.php +2 -2
- src/Notice/NoticeIntegration.php +5 -5
- src/Notice/ThanksNotice.php +2 -2
- src/Notice/WelcomeNotice.php +2 -2
- src/Plugin/Deactivation/Modal.php +1 -1
- src/Plugin/Uninstall/PluginSettings.php +7 -7
- src/Plugin/Update.php +3 -3
- src/{Helper → Service}/FileLoader.php +1 -1
- src/{Helper/OptionsAccess.php → Service/OptionsAccessManager.php} +2 -2
- src/{Helper → Service}/ViewLoader.php +1 -1
- src/Settings/Option/ImagesQualityOption.php +1 -1
- src/Settings/Option/LoaderTypeOption.php +1 -1
- src/Settings/Option/OptionAbstract.php +7 -0
- src/Settings/Option/OptionIntegration.php +8 -7
- src/Settings/Option/OptionInterface.php +5 -0
- src/Settings/Option/OptionsAggregator.php +22 -3
- src/Settings/Option/OutputFormatsOption.php +16 -5
- src/Settings/Option/SupportedDirectoriesOption.php +1 -1
- src/Settings/Option/SupportedExtensionsOption.php +1 -1
- src/Settings/Page/DebugPage.php +2 -2
- src/Settings/Page/SettingsPage.php +5 -2
- src/Settings/PluginOptions.php +2 -2
- src/Settings/SettingsSave.php +13 -7
- templates/components/widgets/options.php +15 -2
- templates/components/widgets/regenerate.php +1 -1
- vendor/autoload.php +1 -1
- vendor/composer/autoload_classmap.php +3 -5
- vendor/composer/autoload_real.php +4 -4
- vendor/composer/autoload_static.php +7 -9
- vendor/composer/installed.php +2 -2
- webp-converter-for-media.php +2 -2
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:Exo\ 2;font-style:"normal";font-weight:400;src:url(../../fonts/Exo2/Exo2-Regular.woff2) format("woff2"),url(../../fonts/Exo2/Exo2-Regular.woff) format("woff"),url(../../fonts/Exo2/Exo2-Regular.ttf) format("truetype")}@font-face{font-family:Exo\ 2;font-style:"normal";font-weight:500;src:url(../../fonts/Exo2/Exo2-SemiBold.woff2) format("woff2"),url(../../fonts/Exo2/Exo2-SemiBold.woff) format("woff"),url(../../fonts/Exo2/Exo2-SemiBold.ttf) format("truetype")}.webpModal [hidden]{display:none!important}.webpModal *,.webpModal :after,.webpModal :before{box-sizing:border-box;margin:0;padding:0}.webpModal__outer{background-color:rgba(0,0,0,.75);height:100%;left:0;position:fixed;top:0;width:100%;z-index:9999}.webpModal__form{background-color:#fff;font-family:Exo\ 2,sans-serif;font-size:0;left:50%;max-width:calc(100vw - 40px);padding:20px 30px;position:absolute;top:50%;transform:translate(-50%,-50%);width:600px}.webpModal__headline{font-size:16px;font-weight:500;line-height:1.5;padding:4px 0}.webpModal__desc{font-size:14px;line-height:1.5714285714;padding:4px 0}.webpModal__options{padding:10px 0}.webpModal__textarea{border:1px solid #b4b9be!important;border-radius:0;display:none;font-size:14px;line-height:1.5714285714;margin-top:10px;padding:4px 10px;width:100%}.webpModal__textarea[placeholder]{display:block}.webpModal__textarea[placeholder=""]{display:none}.webpModal__buttons{align-items:center;display:flex;flex-wrap:wrap;margin:0 -5px;padding:5px 0}.webpModal__button{padding:5px;width:50%}.webpModal__buttonInner{width:100%}.webpPage{color:#444;font-family:Exo\ 2,sans-serif;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:#46b450;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:#0073aa;color:#fff;font-size:16px;font-weight:400;line-height:1.5;padding:14px 30px}.webpPage__widgetTitle--second{background-color:#a0a5aa}.webpPage__widgetTitle--error{background-color:#dc3232}.webpPage__widgetRow{padding-bottom:10px}.webpPage__widgetRow:last-child{padding-bottom:0}.webpPage__widgetRow .webpButton{margin:10px 0}.webpPage__quality{border:1px solid #a0a5aa;display:flex;flex-wrap:wrap;margin:10px 0}.webpPage__qualityItem{border-left:1px solid #a0a5aa;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:#46b450;color:#fff;margin:-1px;padding:15px 21px}.webpPage__qualityItemInput[disabled]+.webpPage__qualityItemLabel{opacity:0;pointer-events: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;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--green:hover{color:#fff!important}.webpButton--blue{border-color:#0073aa;color:#0073aa!important}.webpButton--blue:after{background-color:#0073aa}.webpButton--green{border-color:#46b450;color:#46b450!important}.webpButton--green:after{background-color:#46b450}.webpContent{font-family:Exo\ 2,sans-serif;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:#0073aa;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}.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 #b4b9be}.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:#46b450;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:#46b450;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:hsla(210,7%,73%,.5);border:1px solid #b4b9be;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:#46b450}.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{padding:10px 0}.webpInput__field{border:1px solid #b4b9be!important;border-radius:0!important;box-shadow:none!important;font-size:14px!important;line-height:1.5714285714!important;padding:9px 15px!important;width:100%}.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:#46b450;content:"";height:100%;left:0;position:absolute;top:0;transition:width .3s;width:0}.webpLoader__barProgress--error:before{background-color:#dc3232}.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:#46b450;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:#dc3232}.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:#46b450;content:"";height:100%;left:0;position:absolute;top:0;width:2px}.webpLoader__successContent{color:#46b450;font-size:14px;font-weight:500;line-height:1.5714285714}.webpLoader__successContent a{color:inherit}.webpLoader__errors{border-left:2px solid #a0a5aa;margin-top:20px}.webpLoader__errorsTitle{background-color:#a0a5aa;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:#dc3232;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;display:flex;flex-wrap:wrap}.webpPopup__image{background-image:url(../../img/author.jpg);background-position:50%;background-repeat:no-repeat;background-size:cover;width:152px}.webpPopup__content{border:1px solid #a0a5aa;border-left:0;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-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}}@media screen and (max-width:782px){.webpModal__button{width:100%}.webpPage{padding-right:0}.webpPopup__inner{border:1px solid #a0a5aa;display:block}.webpPopup__image{height:152px;margin:20px auto 0}.webpPopup__content{border:0}}@media screen and (max-width:768px){.webpPage__quality{display:block}.webpPage__qualityItem{border-left:0}.webpPage__qualityItem+.webpPage__qualityItem{border-top:1px solid #a0a5aa}}
|
1 |
+
@charset "UTF-8";@keyframes dotsLoading{0%,to{content:"..."}25%{content:" .."}50%{content:". ."}75%{content:".. "}}@font-face{font-family:Exo\ 2;font-style:"normal";font-weight:400;src:url(../../fonts/Exo2/Exo2-Regular.woff2) format("woff2"),url(../../fonts/Exo2/Exo2-Regular.woff) format("woff"),url(../../fonts/Exo2/Exo2-Regular.ttf) format("truetype")}@font-face{font-family:Exo\ 2;font-style:"normal";font-weight:500;src:url(../../fonts/Exo2/Exo2-SemiBold.woff2) format("woff2"),url(../../fonts/Exo2/Exo2-SemiBold.woff) format("woff"),url(../../fonts/Exo2/Exo2-SemiBold.ttf) format("truetype")}.webpModal [hidden]{display:none!important}.webpModal *,.webpModal :after,.webpModal :before{box-sizing:border-box;margin:0;padding:0}.webpModal__outer{background-color:rgba(0,0,0,.75);height:100%;left:0;position:fixed;top:0;width:100%;z-index:9999}.webpModal__form{background-color:#fff;font-family:Exo\ 2,sans-serif;font-size:0;left:50%;max-width:calc(100vw - 40px);padding:20px 30px;position:absolute;top:50%;transform:translate(-50%,-50%);width:600px}.webpModal__headline{font-size:16px;font-weight:500;line-height:1.5;padding:4px 0}.webpModal__desc{font-size:14px;line-height:1.5714285714;padding:4px 0}.webpModal__options{padding:10px 0}.webpModal__textarea{border:1px solid #b4b9be!important;border-radius:0;display:none;font-size:14px;line-height:1.5714285714;margin-top:10px;padding:4px 10px;width:100%}.webpModal__textarea[placeholder]{display:block}.webpModal__textarea[placeholder=""]{display:none}.webpModal__buttons{align-items:center;display:flex;flex-wrap:wrap;margin:0 -5px;padding:5px 0}.webpModal__button{padding:5px;width:50%}.webpModal__buttonInner{width:100%}.webpPage{color:#444;font-family:Exo\ 2,sans-serif;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:#46b450;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:#0073aa;color:#fff;font-size:16px;font-weight:400;line-height:1.5;padding:14px 30px}.webpPage__widgetTitle--second{background-color:#a0a5aa}.webpPage__widgetTitle--error{background-color:#dc3232}.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:#0073aa;margin:10px 0;padding:10px 20px}.webpPage__widgetColumnNotice p{color:#fff;font-size:1.2rem}.webpPage__quality{border:1px solid #a0a5aa;display:flex;flex-wrap:wrap;margin:10px 0}.webpPage__qualityItem{border-left:1px solid #a0a5aa;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:#46b450;color:#fff;margin:-1px;padding:15px 21px}.webpPage__qualityItemInput[disabled]+.webpPage__qualityItemLabel{opacity:0;pointer-events: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;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--green:hover,.webpButton--red:hover{color:#fff!important}.webpButton--blue{border-color:#0073aa;color:#0073aa!important}.webpButton--blue:after{background-color:#0073aa}.webpButton--green{border-color:#46b450;color:#46b450!important}.webpButton--green:after{background-color:#46b450}.webpButton--red{border-color:#dc3232;color:#dc3232!important}.webpButton--red:after{background-color:#dc3232}.webpContent{font-family:Exo\ 2,sans-serif;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:#0073aa;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}.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 #b4b9be}.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:#46b450;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:#46b450;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:hsla(210,7%,73%,.5);border:1px solid #b4b9be;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:#46b450}.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 #b4b9be!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__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:#46b450;content:"";height:100%;left:0;position:absolute;top:0;transition:width .3s;width:0}.webpLoader__barProgress--error:before{background-color:#dc3232}.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:#46b450;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:#dc3232}.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:#46b450;content:"";height:100%;left:0;position:absolute;top:0;width:2px}.webpLoader__successContent{color:#46b450;font-size:14px;font-weight:500;line-height:1.5714285714}.webpLoader__successContent a{color:inherit}.webpLoader__errors{border-left:2px solid #a0a5aa;margin-top:20px}.webpLoader__errorsTitle{background-color:#a0a5aa;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:#dc3232;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;display:flex;flex-wrap:wrap}.webpPopup__image{background-image:url(../../img/author.jpg);background-position:50%;background-repeat:no-repeat;background-size:cover;width:152px}.webpPopup__content{border:1px solid #a0a5aa;border-left:0;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-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){.webpModal__button{width:100%}.webpPage{padding-right:0}.webpPage__quality{display:block}.webpPage__qualityItem{border-left:0}.webpPage__qualityItem+.webpPage__qualityItem{border-top:1px solid #a0a5aa}.webpInput{display:block}.webpInput__field{width:100%}.webpInput__button{margin:10px 0 0!important}.webpPopup__inner{border:1px solid #a0a5aa;display:block}.webpPopup__image{height:152px;margin:20px auto 0}.webpPopup__content{border:0}}
|
assets/build/js/scripts.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(){var e,t={669:function(e,t,r){e.exports=r(609)},448:function(e,t,r){"use strict";var n=r(867),o=r(26),i=r(372),s=r(327),a=r(97),u=r(109),c=r(985),f=r(61);e.exports=function(e){return new Promise((function(t,r){var l=e.data,h=e.headers,d=e.responseType;n.isFormData(l)&&delete h["Content-Type"];var p=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",v=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";h.Authorization="Basic "+btoa(m+":"+v)}var g=a(e.baseURL,e.url);function _(){if(p){var n="getAllResponseHeaders"in p?u(p.getAllResponseHeaders()):null,i={data:d&&"text"!==d&&"json"!==d?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:n,config:e,request:p};o(t,r,i),p=null}}if(p.open(e.method.toUpperCase(),s(g,e.params,e.paramsSerializer),!0),p.timeout=e.timeout,"onloadend"in p?p.onloadend=_:p.onreadystatechange=function(){p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))&&setTimeout(_)},p.onabort=function(){p&&(r(f("Request aborted",e,"ECONNABORTED",p)),p=null)},p.onerror=function(){r(f("Network Error",e,null,p)),p=null},p.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(f(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",p)),p=null},n.isStandardBrowserEnv()){var b=(e.withCredentials||c(g))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;b&&(h[e.xsrfHeaderName]=b)}"setRequestHeader"in p&&n.forEach(h,(function(e,t){void 0===l&&"content-type"===t.toLowerCase()?delete h[t]:p.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),d&&"json"!==d&&(p.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&p.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){p&&(p.abort(),r(e),p=null)})),l||(l=null),p.send(l)}))}},609:function(e,t,r){"use strict";var n=r(867),o=r(849),i=r(321),s=r(185);function a(e){var t=new i(e),r=o(i.prototype.request,t);return n.extend(r,i.prototype,t),n.extend(r,t),r}var u=a(r(655));u.Axios=i,u.create=function(e){return a(s(u.defaults,e))},u.Cancel=r(263),u.CancelToken=r(972),u.isCancel=r(502),u.all=function(e){return Promise.all(e)},u.spread=r(713),u.isAxiosError=r(268),e.exports=u,e.exports.default=u},263:function(e){"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},972:function(e,t,r){"use strict";var n=r(263);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},502:function(e){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:function(e,t,r){"use strict";var n=r(867),o=r(327),i=r(782),s=r(572),a=r(185),u=r(875),c=u.validators;function f(e){this.defaults=e,this.interceptors={request:new i,response:new i}}f.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=a(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&u.assertOptions(t,{silentJSONParsing:c.transitional(c.boolean,"1.0.0"),forcedJSONParsing:c.transitional(c.boolean,"1.0.0"),clarifyTimeoutError:c.transitional(c.boolean,"1.0.0")},!1);var r=[],n=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(n=n&&t.synchronous,r.unshift(t.fulfilled,t.rejected))}));var o,i=[];if(this.interceptors.response.forEach((function(e){i.push(e.fulfilled,e.rejected)})),!n){var f=[s,void 0];for(Array.prototype.unshift.apply(f,r),f=f.concat(i),o=Promise.resolve(e);f.length;)o=o.then(f.shift(),f.shift());return o}for(var l=e;r.length;){var h=r.shift(),d=r.shift();try{l=h(l)}catch(e){d(e);break}}try{o=s(l)}catch(e){return Promise.reject(e)}for(;i.length;)o=o.then(i.shift(),i.shift());return o},f.prototype.getUri=function(e){return e=a(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){f.prototype[e]=function(t,r){return this.request(a(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){f.prototype[e]=function(t,r,n){return this.request(a(n||{},{method:e,url:t,data:r}))}})),e.exports=f},782:function(e,t,r){"use strict";var n=r(867);function o(){this.handlers=[]}o.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},97:function(e,t,r){"use strict";var n=r(793),o=r(303);e.exports=function(e,t){return e&&!n(t)?o(e,t):t}},61:function(e,t,r){"use strict";var n=r(481);e.exports=function(e,t,r,o,i){var s=new Error(e);return n(s,t,r,o,i)}},572:function(e,t,r){"use strict";var n=r(867),o=r(527),i=r(502),s=r(655);function a(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return a(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return a(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(a(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:function(e){"use strict";e.exports=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},185:function(e,t,r){"use strict";var n=r(867);e.exports=function(e,t){t=t||{};var r={},o=["url","method","data"],i=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function u(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function c(o){n.isUndefined(t[o])?n.isUndefined(e[o])||(r[o]=u(void 0,e[o])):r[o]=u(e[o],t[o])}n.forEach(o,(function(e){n.isUndefined(t[e])||(r[e]=u(void 0,t[e]))})),n.forEach(i,c),n.forEach(s,(function(o){n.isUndefined(t[o])?n.isUndefined(e[o])||(r[o]=u(void 0,e[o])):r[o]=u(void 0,t[o])})),n.forEach(a,(function(n){n in t?r[n]=u(e[n],t[n]):n in e&&(r[n]=u(void 0,e[n]))}));var f=o.concat(i).concat(s).concat(a),l=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===f.indexOf(e)}));return n.forEach(l,c),r}},26:function(e,t,r){"use strict";var n=r(61);e.exports=function(e,t,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},527:function(e,t,r){"use strict";var n=r(867),o=r(655);e.exports=function(e,t,r){var i=this||o;return n.forEach(r,(function(r){e=r.call(i,e,t)})),e}},655:function(e,t,r){"use strict";var n=r(155),o=r(867),i=r(16),s=r(481),a={"Content-Type":"application/x-www-form-urlencoded"};function u(e,t){!o.isUndefined(e)&&o.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,f={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==n&&"[object process]"===Object.prototype.toString.call(n))&&(c=r(448)),c),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),o.isFormData(e)||o.isArrayBuffer(e)||o.isBuffer(e)||o.isStream(e)||o.isFile(e)||o.isBlob(e)?e:o.isArrayBufferView(e)?e.buffer:o.isURLSearchParams(e)?(u(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):o.isObject(e)||t&&"application/json"===t["Content-Type"]?(u(t,"application/json"),function(e,t,r){if(o.isString(e))try{return(t||JSON.parse)(e),o.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,r=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,i=!r&&"json"===this.responseType;if(i||n&&o.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw s(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};f.headers={common:{Accept:"application/json, text/plain, */*"}},o.forEach(["delete","get","head"],(function(e){f.headers[e]={}})),o.forEach(["post","put","patch"],(function(e){f.headers[e]=o.merge(a)})),e.exports=f},849:function(e){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},327:function(e,t,r){"use strict";var n=r(867);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(n.isURLSearchParams(t))i=t.toString();else{var s=[];n.forEach(t,(function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),s.push(o(t)+"="+o(e))})))})),i=s.join("&")}if(i){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},303:function(e){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},372:function(e,t,r){"use strict";var n=r(867);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,i,s){var a=[];a.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),n.isString(o)&&a.push("path="+o),n.isString(i)&&a.push("domain="+i),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},793:function(e){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},268:function(e){"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},985:function(e,t,r){"use strict";var n=r(867);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=o(window.location.href),function(t){var r=n.isString(t)?o(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},16:function(e,t,r){"use strict";var n=r(867);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},109:function(e,t,r){"use strict";var n=r(867),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,i,s={};return e?(n.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=n.trim(e.substr(0,i)).toLowerCase(),r=n.trim(e.substr(i+1)),t){if(s[t]&&o.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([r]):s[t]?s[t]+", "+r:r}})),s):s}},713:function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},875:function(e,t,r){"use strict";var n=r(593),o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var i={},s=n.version.split(".");function a(e,t){for(var r=t?t.split("."):s,n=e.split("."),o=0;o<3;o++){if(r[o]>n[o])return!0;if(r[o]<n[o])return!1}return!1}o.transitional=function(e,t,r){var o=t&&a(t);return function(s,a,u){if(!1===e)throw new Error(function(e,t){return"[Axios v"+n.version+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}(a," has been removed in "+t));return o&&!i[a]&&(i[a]=!0),!e||e(s,a,u)}},e.exports={isOlderVersion:a,assertOptions:function(e,t,r){if("object"!=typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),o=n.length;o-- >0;){var i=n[o],s=t[i];if(s){var a=e[i],u=void 0===a||s(a,i,e);if(!0!==u)throw new TypeError("option "+i+" must be "+u)}else if(!0!==r)throw Error("Unknown option "+i)}},validators:o}},867:function(e,t,r){"use strict";var n=r(849),o=Object.prototype.toString;function i(e){return"[object Array]"===o.call(e)}function s(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===o.call(e)}function f(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:i,isArrayBuffer:function(e){return"[object ArrayBuffer]"===o.call(e)},isBuffer:function(e){return null!==e&&!s(e)&&null!==e.constructor&&!s(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:a,isPlainObject:u,isUndefined:s,isDate:function(e){return"[object Date]"===o.call(e)},isFile:function(e){return"[object File]"===o.call(e)},isBlob:function(e){return"[object Blob]"===o.call(e)},isFunction:c,isStream:function(e){return a(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:f,merge:function e(){var t={};function r(r,n){u(t[n])&&u(r)?t[n]=e(t[n],r):u(r)?t[n]=e({},r):i(r)?t[n]=r.slice():t[n]=r}for(var n=0,o=arguments.length;n<o;n++)f(arguments[n],r);return t},extend:function(e,t,r){return f(t,(function(t,o){e[o]=r&&"function"==typeof t?n(t,r):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},70:function(e,t,r){"use strict";var n=r(669),o=r.n(n);function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.set_vars()&&this.set_events()}var t,r,n;return t=e,(r=[{key:"set_vars",value:function(){if(this.button_open=document.querySelector('[data-slug="webp-converter-for-media"] a[href*="action=deactivate"]'),this.modal=document.querySelector(".webpModal"),this.button_open&&this.modal)return this.outer=this.modal.querySelector(".webpModal__outer"),this.form=this.outer.querySelector(".webpModal__form"),this.form_options=this.form.querySelectorAll('[name="webpc_reason"]'),this.form_comment=this.form.querySelector('[name="webpc_comment"]'),this.button_submit=this.form.querySelector('button[type="submit"]'),this.button_cancel=this.form.querySelector('button[type="button"]'),this.events={open_modal:this.open_modal.bind(this)},this.atts={option_placeholder:"data-placeholder"},this.status={is_sent:!1},!0}},{key:"set_events",value:function(){var e=this;this.button_open.addEventListener("click",this.events.open_modal),this.button_submit.addEventListener("click",this.submit_form.bind(this)),this.button_cancel.addEventListener("click",this.cancel_form.bind(this)),this.outer.addEventListener("click",this.close_modal.bind(this)),this.form.addEventListener("click",(function(e){e.stopPropagation()}));for(var t=this.form_options.length,r=function(t){e.form_options[t].addEventListener("change",(function(){e.set_current_option(t)}))},n=0;n<t;n++)r(n)}},{key:"open_modal",value:function(e){e.preventDefault(),this.button_open.removeEventListener("click",this.events.open_modal),this.modal.removeAttribute("hidden")}},{key:"close_modal",value:function(){this.modal.setAttribute("hidden","hidden")}},{key:"submit_form",value:function(e){var t=this;e.preventDefault(),this.close_modal(),this.status.is_sent||(this.status.is_sent=!0,setTimeout((function(){t.send_request(),t.button_open.click()}),0))}},{key:"send_request",value:function(){var e=new FormData(this.form),t=this.form.getAttribute("action");o()({method:"POST",url:t,data:e})}},{key:"cancel_form",value:function(e){var t=this;e.preventDefault(),this.close_modal(),setTimeout((function(){t.button_open.click()}),0)}},{key:"set_current_option",value:function(e){this.form_comment.value="";var t=this.form_options[e].getAttribute(this.atts.option_placeholder);this.form_comment.setAttribute("placeholder",t)}}])&&i(t.prototype,r),n&&i(t,n),e}();function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var u=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.set_vars()&&this.set_events()}var t,r,n;return t=e,(r=[{key:"set_vars",value:function(){if(this.notice=document.querySelector('.notice[data-notice="webp-converter-for-media"]'),this.notice)return this.settings={ajax_url:this.notice.getAttribute("data-url"),ajax_action:"webpc_notice",button_close_class:".notice-dismiss",button_hide_class:"[data-permanently]"},this.events={click_on_close:this.click_on_close.bind(this)},!0}},{key:"set_events",value:function(){this.notice.addEventListener("click",this.events.click_on_close)}},{key:"click_on_close",value:function(e){var t=this.settings,r=t.button_close_class,n=t.button_hide_class;this.notice.removeEventListener("click",this.events.click_on_close),e.target.matches(r)?this.hide_notice(!1):e.target.matches(n)&&this.hide_notice(!0)}},{key:"hide_notice",value:function(e){var t=this.settings.button_close_class;this.send_request(e),e&&this.notice.querySelector(t).click()}},{key:"send_request",value:function(e){var t=this.settings.ajax_url;o()({method:"POST",url:t,data:this.get_data_for_request(e)})}},{key:"get_data_for_request",value:function(e){var t=this.settings.ajax_action,r=new FormData;return r.append("action",t),r.append("is_permanently",e?1:0),r}}])&&a(t.prototype,r),n&&a(t,n),e}();function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var f=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.set_vars()&&this.set_events()}var t,r,n;return t=e,(r=[{key:"set_vars",value:function(){if(this.section=document.querySelector(".webpLoader"),this.section)return this.wrapper=this.section.querySelector(".webpLoader__status"),this.progress=this.wrapper.querySelector(".webpLoader__barProgress"),this.progress_size=this.section.querySelector(".webpLoader__sizeProgress"),this.errors=this.section.querySelector(".webpLoader__errors"),this.errors_inner=this.errors.querySelector(".webpLoader__errorsContent"),this.success=this.section.querySelector(".webpLoader__success"),this.success_popup=this.section.querySelector(".webpLoader__popup"),this.option_force=this.section.querySelector('input[name="regenerate_force"]'),this.button=this.section.querySelector(".webpLoader__button"),this.data={count:0,max:0,items:[],size:{before:0,after:0},errors:[]},this.settings={is_disabled:!1,ajax:{url_paths:this.section.getAttribute("data-api-paths"),url_regenerate:this.section.getAttribute("data-api-regenerate"),error_message:this.section.getAttribute("data-api-error-message")},units:["kB","MB","GB"]},this.atts={progress:"data-percent"},this.classes={progress_error:"webpLoader__barProgress--error",button_disabled:"webpLoader__button--disabled",error_message:"webpLoader__errorsContentError"},!0}},{key:"set_events",value:function(){this.button.addEventListener("click",this.init_regeneration.bind(this))}},{key:"init_regeneration",value:function(e){e.preventDefault(),this.settings.is_disabled||(this.settings.is_disabled=!0,this.button.classList.add(this.classes.button_disabled),this.option_force.setAttribute("disabled","disabled"),this.wrapper.removeAttribute("hidden"),this.send_request_for_paths())}},{key:"send_request_for_paths",value:function(){var e=this,t=this.settings.ajax.url_paths;o()({method:"POST",url:t,data:this.get_data_for_paths_request()}).then((function(t){e.data.items=t.data,e.data.max=t.data.length,e.regenerate_next_images()})).catch(this.catch_request_error.bind(this))}},{key:"catch_request_error",value:function(e){var t=this.settings.ajax.error_message,r=e.response&&e.response.data.message||null;this.update_errors([r||t],!0),r||(this.print_error_message(JSON.stringify(e.toJSON()),!0,!0),this.print_error_message(JSON.stringify(e.response),!0,!0))}},{key:"get_data_for_paths_request",value:function(){var e=new FormData;return e.append("regenerate_force",this.option_force.checked?1:0),e}},{key:"regenerate_next_images",value:function(){if(0===this.data.max&&this.update_progress(),!(this.data.count>=this.data.max)){var e=this.data.items[this.data.count];this.data.count++,this.send_request_for_regeneration(e)}}},{key:"send_request_for_regeneration",value:function(e){var t=this,r=this.settings.ajax.url_regenerate;o()({method:"POST",url:r,data:{paths:e}}).then((function(e){t.update_errors(e.data.errors),t.update_size(e.data.size.before,e.data.size.after),t.update_progress(),t.regenerate_next_images()})).catch(this.catch_request_error.bind(this))}},{key:"update_errors",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(0!==e.length){for(var r=0;r<e.length;r++)this.print_error_message(e[r],t);this.errors.removeAttribute("hidden"),t&&this.progress.classList.add(this.classes.progress_error)}}},{key:"print_error_message",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=document.createElement("p");if(r){var o=document.createElement("pre");o.innerText=e,n.appendChild(o)}else n.innerHTML=e;t&&n.classList.add(this.classes.error_message),this.errors_inner.appendChild(n)}},{key:"update_size",value:function(e,t){var r=this.data.size;r.before+=e,r.after+=t;var n=r.before-r.after;if(n<0&&(n=0),0!==n){var o=Math.round(100*(1-r.after/r.before));o<0&&(o=0);var i=-1;do{i++,n/=1024}while(n>1024);var s=n.toFixed(2),a=this.settings.units[i];this.progress_size.innerHTML="".concat(s," ").concat(a," (").concat(o,"%)")}}},{key:"update_progress",value:function(){var e=this.data.max>0?Math.floor(this.data.count/this.data.max*100):100;e>100&&(e=100),100===e&&(this.success.removeAttribute("hidden"),this.success_popup.removeAttribute("hidden")),this.progress.setAttribute(this.atts.progress,e.toString())}}])&&c(t.prototype,r),n&&c(t,n),e}();new function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),new s,new u,new f}},694:function(){},155:function(e){var t,r,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var a,u=[],c=!1,f=-1;function l(){c&&a&&(c=!1,a.length?u=a.concat(u):f=-1,u.length&&h())}function h(){if(!c){var e=s(l);c=!0;for(var t=u.length;t;){for(a=u,u=[];++f<t;)a&&a[f].run();f=-1,t=u.length}a=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function p(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new d(e,t)),1!==u.length||c||s(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},593:function(e){"use strict";e.exports=JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}')}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,n),i.exports}n.m=t,e=[],n.O=function(t,r,o,i){if(!r){var s=1/0;for(f=0;f<e.length;f++){r=e[f][0],o=e[f][1],i=e[f][2];for(var a=!0,u=0;u<r.length;u++)(!1&i||s>=i)&&Object.keys(n.O).every((function(e){return n.O[e](r[u])}))?r.splice(u--,1):(a=!1,i<s&&(s=i));if(a){e.splice(f--,1);var c=o();void 0!==c&&(t=c)}}return t}i=i||0;for(var f=e.length;f>0&&e[f-1][2]>i;f--)e[f]=e[f-1];e[f]=[r,o,i]},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={794:0,505:0};n.O.j=function(t){return 0===e[t]};var t=function(t,r){var o,i,s=r[0],a=r[1],u=r[2],c=0;if(s.some((function(t){return 0!==e[t]}))){for(o in a)n.o(a,o)&&(n.m[o]=a[o]);if(u)var f=u(n)}for(t&&t(r);c<s.length;c++)i=s[c],n.o(e,i)&&e[i]&&e[i][0](),e[s[c]]=0;return n.O(f)},r=self.webpackChunkwebp_converter_for_media=self.webpackChunkwebp_converter_for_media||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}(),n.O(void 0,[505],(function(){return n(70)}));var o=n.O(void 0,[505],(function(){return n(694)}));o=n.O(o)}();
|
1 |
+
!function(){var e,t={669:function(e,t,r){e.exports=r(609)},448:function(e,t,r){"use strict";var n=r(867),o=r(26),s=r(372),i=r(327),a=r(97),u=r(109),c=r(985),f=r(61);e.exports=function(e){return new Promise((function(t,r){var l=e.data,h=e.headers,d=e.responseType;n.isFormData(l)&&delete h["Content-Type"];var p=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",v=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";h.Authorization="Basic "+btoa(m+":"+v)}var _=a(e.baseURL,e.url);function g(){if(p){var n="getAllResponseHeaders"in p?u(p.getAllResponseHeaders()):null,s={data:d&&"text"!==d&&"json"!==d?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:n,config:e,request:p};o(t,r,s),p=null}}if(p.open(e.method.toUpperCase(),i(_,e.params,e.paramsSerializer),!0),p.timeout=e.timeout,"onloadend"in p?p.onloadend=g:p.onreadystatechange=function(){p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))&&setTimeout(g)},p.onabort=function(){p&&(r(f("Request aborted",e,"ECONNABORTED",p)),p=null)},p.onerror=function(){r(f("Network Error",e,null,p)),p=null},p.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(f(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",p)),p=null},n.isStandardBrowserEnv()){var b=(e.withCredentials||c(_))&&e.xsrfCookieName?s.read(e.xsrfCookieName):void 0;b&&(h[e.xsrfHeaderName]=b)}"setRequestHeader"in p&&n.forEach(h,(function(e,t){void 0===l&&"content-type"===t.toLowerCase()?delete h[t]:p.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),d&&"json"!==d&&(p.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&p.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){p&&(p.abort(),r(e),p=null)})),l||(l=null),p.send(l)}))}},609:function(e,t,r){"use strict";var n=r(867),o=r(849),s=r(321),i=r(185);function a(e){var t=new s(e),r=o(s.prototype.request,t);return n.extend(r,s.prototype,t),n.extend(r,t),r}var u=a(r(655));u.Axios=s,u.create=function(e){return a(i(u.defaults,e))},u.Cancel=r(263),u.CancelToken=r(972),u.isCancel=r(502),u.all=function(e){return Promise.all(e)},u.spread=r(713),u.isAxiosError=r(268),e.exports=u,e.exports.default=u},263:function(e){"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},972:function(e,t,r){"use strict";var n=r(263);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},502:function(e){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:function(e,t,r){"use strict";var n=r(867),o=r(327),s=r(782),i=r(572),a=r(185),u=r(875),c=u.validators;function f(e){this.defaults=e,this.interceptors={request:new s,response:new s}}f.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=a(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&u.assertOptions(t,{silentJSONParsing:c.transitional(c.boolean,"1.0.0"),forcedJSONParsing:c.transitional(c.boolean,"1.0.0"),clarifyTimeoutError:c.transitional(c.boolean,"1.0.0")},!1);var r=[],n=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(n=n&&t.synchronous,r.unshift(t.fulfilled,t.rejected))}));var o,s=[];if(this.interceptors.response.forEach((function(e){s.push(e.fulfilled,e.rejected)})),!n){var f=[i,void 0];for(Array.prototype.unshift.apply(f,r),f=f.concat(s),o=Promise.resolve(e);f.length;)o=o.then(f.shift(),f.shift());return o}for(var l=e;r.length;){var h=r.shift(),d=r.shift();try{l=h(l)}catch(e){d(e);break}}try{o=i(l)}catch(e){return Promise.reject(e)}for(;s.length;)o=o.then(s.shift(),s.shift());return o},f.prototype.getUri=function(e){return e=a(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){f.prototype[e]=function(t,r){return this.request(a(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){f.prototype[e]=function(t,r,n){return this.request(a(n||{},{method:e,url:t,data:r}))}})),e.exports=f},782:function(e,t,r){"use strict";var n=r(867);function o(){this.handlers=[]}o.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},97:function(e,t,r){"use strict";var n=r(793),o=r(303);e.exports=function(e,t){return e&&!n(t)?o(e,t):t}},61:function(e,t,r){"use strict";var n=r(481);e.exports=function(e,t,r,o,s){var i=new Error(e);return n(i,t,r,o,s)}},572:function(e,t,r){"use strict";var n=r(867),o=r(527),s=r(502),i=r(655);function a(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return a(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||i.adapter)(e).then((function(t){return a(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return s(t)||(a(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:function(e){"use strict";e.exports=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},185:function(e,t,r){"use strict";var n=r(867);e.exports=function(e,t){t=t||{};var r={},o=["url","method","data"],s=["headers","auth","proxy","params"],i=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function u(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function c(o){n.isUndefined(t[o])?n.isUndefined(e[o])||(r[o]=u(void 0,e[o])):r[o]=u(e[o],t[o])}n.forEach(o,(function(e){n.isUndefined(t[e])||(r[e]=u(void 0,t[e]))})),n.forEach(s,c),n.forEach(i,(function(o){n.isUndefined(t[o])?n.isUndefined(e[o])||(r[o]=u(void 0,e[o])):r[o]=u(void 0,t[o])})),n.forEach(a,(function(n){n in t?r[n]=u(e[n],t[n]):n in e&&(r[n]=u(void 0,e[n]))}));var f=o.concat(s).concat(i).concat(a),l=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===f.indexOf(e)}));return n.forEach(l,c),r}},26:function(e,t,r){"use strict";var n=r(61);e.exports=function(e,t,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},527:function(e,t,r){"use strict";var n=r(867),o=r(655);e.exports=function(e,t,r){var s=this||o;return n.forEach(r,(function(r){e=r.call(s,e,t)})),e}},655:function(e,t,r){"use strict";var n=r(155),o=r(867),s=r(16),i=r(481),a={"Content-Type":"application/x-www-form-urlencoded"};function u(e,t){!o.isUndefined(e)&&o.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,f={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==n&&"[object process]"===Object.prototype.toString.call(n))&&(c=r(448)),c),transformRequest:[function(e,t){return s(t,"Accept"),s(t,"Content-Type"),o.isFormData(e)||o.isArrayBuffer(e)||o.isBuffer(e)||o.isStream(e)||o.isFile(e)||o.isBlob(e)?e:o.isArrayBufferView(e)?e.buffer:o.isURLSearchParams(e)?(u(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):o.isObject(e)||t&&"application/json"===t["Content-Type"]?(u(t,"application/json"),function(e,t,r){if(o.isString(e))try{return(t||JSON.parse)(e),o.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,r=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,s=!r&&"json"===this.responseType;if(s||n&&o.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(s){if("SyntaxError"===e.name)throw i(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};f.headers={common:{Accept:"application/json, text/plain, */*"}},o.forEach(["delete","get","head"],(function(e){f.headers[e]={}})),o.forEach(["post","put","patch"],(function(e){f.headers[e]=o.merge(a)})),e.exports=f},849:function(e){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},327:function(e,t,r){"use strict";var n=r(867);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var s;if(r)s=r(t);else if(n.isURLSearchParams(t))s=t.toString();else{var i=[];n.forEach(t,(function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),i.push(o(t)+"="+o(e))})))})),s=i.join("&")}if(s){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}},303:function(e){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},372:function(e,t,r){"use strict";var n=r(867);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,s,i){var a=[];a.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),n.isString(o)&&a.push("path="+o),n.isString(s)&&a.push("domain="+s),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},793:function(e){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},268:function(e){"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},985:function(e,t,r){"use strict";var n=r(867);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=o(window.location.href),function(t){var r=n.isString(t)?o(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},16:function(e,t,r){"use strict";var n=r(867);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},109:function(e,t,r){"use strict";var n=r(867),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,s,i={};return e?(n.forEach(e.split("\n"),(function(e){if(s=e.indexOf(":"),t=n.trim(e.substr(0,s)).toLowerCase(),r=n.trim(e.substr(s+1)),t){if(i[t]&&o.indexOf(t)>=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([r]):i[t]?i[t]+", "+r:r}})),i):i}},713:function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},875:function(e,t,r){"use strict";var n=r(593),o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var s={},i=n.version.split(".");function a(e,t){for(var r=t?t.split("."):i,n=e.split("."),o=0;o<3;o++){if(r[o]>n[o])return!0;if(r[o]<n[o])return!1}return!1}o.transitional=function(e,t,r){var o=t&&a(t);return function(i,a,u){if(!1===e)throw new Error(function(e,t){return"[Axios v"+n.version+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}(a," has been removed in "+t));return o&&!s[a]&&(s[a]=!0),!e||e(i,a,u)}},e.exports={isOlderVersion:a,assertOptions:function(e,t,r){if("object"!=typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),o=n.length;o-- >0;){var s=n[o],i=t[s];if(i){var a=e[s],u=void 0===a||i(a,s,e);if(!0!==u)throw new TypeError("option "+s+" must be "+u)}else if(!0!==r)throw Error("Unknown option "+s)}},validators:o}},867:function(e,t,r){"use strict";var n=r(849),o=Object.prototype.toString;function s(e){return"[object Array]"===o.call(e)}function i(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===o.call(e)}function f(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),s(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:s,isArrayBuffer:function(e){return"[object ArrayBuffer]"===o.call(e)},isBuffer:function(e){return null!==e&&!i(e)&&null!==e.constructor&&!i(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:a,isPlainObject:u,isUndefined:i,isDate:function(e){return"[object Date]"===o.call(e)},isFile:function(e){return"[object File]"===o.call(e)},isBlob:function(e){return"[object Blob]"===o.call(e)},isFunction:c,isStream:function(e){return a(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:f,merge:function e(){var t={};function r(r,n){u(t[n])&&u(r)?t[n]=e(t[n],r):u(r)?t[n]=e({},r):s(r)?t[n]=r.slice():t[n]=r}for(var n=0,o=arguments.length;n<o;n++)f(arguments[n],r);return t},extend:function(e,t,r){return f(t,(function(t,o){e[o]=r&&"function"==typeof t?n(t,r):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},70:function(e,t,r){"use strict";var n=r(669),o=r.n(n);function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.set_vars()&&this.set_events()}var t,r,n;return t=e,(r=[{key:"set_vars",value:function(){if(this.button_open=document.querySelector('[data-slug="webp-converter-for-media"] a[href*="action=deactivate"]'),this.modal=document.querySelector(".webpModal"),this.button_open&&this.modal)return this.outer=this.modal.querySelector(".webpModal__outer"),this.form=this.outer.querySelector(".webpModal__form"),this.form_options=this.form.querySelectorAll('[name="webpc_reason"]'),this.form_comment=this.form.querySelector('[name="webpc_comment"]'),this.button_submit=this.form.querySelector('button[type="submit"]'),this.button_cancel=this.form.querySelector('button[type="button"]'),this.events={open_modal:this.open_modal.bind(this)},this.atts={option_placeholder:"data-placeholder"},this.status={is_sent:!1},!0}},{key:"set_events",value:function(){var e=this;this.button_open.addEventListener("click",this.events.open_modal),this.button_submit.addEventListener("click",this.submit_form.bind(this)),this.button_cancel.addEventListener("click",this.cancel_form.bind(this)),this.outer.addEventListener("click",this.close_modal.bind(this)),this.form.addEventListener("click",(function(e){e.stopPropagation()}));for(var t=this.form_options.length,r=function(t){e.form_options[t].addEventListener("change",(function(){e.set_current_option(t)}))},n=0;n<t;n++)r(n)}},{key:"open_modal",value:function(e){e.preventDefault(),this.button_open.removeEventListener("click",this.events.open_modal),this.modal.removeAttribute("hidden")}},{key:"close_modal",value:function(){this.modal.setAttribute("hidden","hidden")}},{key:"submit_form",value:function(e){var t=this;e.preventDefault(),this.close_modal(),this.status.is_sent||(this.status.is_sent=!0,setTimeout((function(){t.send_request(),t.button_open.click()}),0))}},{key:"send_request",value:function(){var e=new FormData(this.form),t=this.form.getAttribute("action");o()({method:"POST",url:t,data:e})}},{key:"cancel_form",value:function(e){var t=this;e.preventDefault(),this.close_modal(),setTimeout((function(){t.button_open.click()}),0)}},{key:"set_current_option",value:function(e){this.form_comment.value="";var t=this.form_options[e].getAttribute(this.atts.option_placeholder);this.form_comment.setAttribute("placeholder",t)}}])&&s(t.prototype,r),n&&s(t,n),e}();function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var u=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.set_vars()&&this.set_events()}var t,r,n;return t=e,(r=[{key:"set_vars",value:function(){if(this.notice=document.querySelector('.notice[data-notice="webp-converter-for-media"]'),this.notice)return this.settings={ajax_url:this.notice.getAttribute("data-url"),ajax_action:"webpc_notice",button_close_class:".notice-dismiss",button_hide_class:"[data-permanently]"},this.events={click_on_close:this.click_on_close.bind(this)},!0}},{key:"set_events",value:function(){this.notice.addEventListener("click",this.events.click_on_close)}},{key:"click_on_close",value:function(e){var t=this.settings,r=t.button_close_class,n=t.button_hide_class;this.notice.removeEventListener("click",this.events.click_on_close),e.target.matches(r)?this.hide_notice(!1):e.target.matches(n)&&this.hide_notice(!0)}},{key:"hide_notice",value:function(e){var t=this.settings.button_close_class;this.send_request(e),e&&this.notice.querySelector(t).click()}},{key:"send_request",value:function(e){var t=this.settings.ajax_url;o()({method:"POST",url:t,data:this.get_data_for_request(e)})}},{key:"get_data_for_request",value:function(e){var t=this.settings.ajax_action,r=new FormData;return r.append("action",t),r.append("is_permanently",e?1:0),r}}])&&a(t.prototype,r),n&&a(t,n),e}();function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var f=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.set_vars()&&this.set_events()}var t,r,n;return t=e,(r=[{key:"set_vars",value:function(){if(this.section=document.querySelector(".webpLoader"),this.section)return this.wrapper=this.section.querySelector(".webpLoader__status"),this.progress=this.wrapper.querySelector(".webpLoader__barProgress"),this.progress_size=this.section.querySelector(".webpLoader__sizeProgress"),this.errors=this.section.querySelector(".webpLoader__errors"),this.errors_inner=this.errors.querySelector(".webpLoader__errorsContent"),this.success=this.section.querySelector(".webpLoader__success"),this.success_popup=this.section.querySelector(".webpLoader__popup"),this.option_force=this.section.querySelector('input[name="regenerate_force"]'),this.button=this.section.querySelector(".webpLoader__button"),this.data={count:0,max:0,items:[],size:{before:0,after:0},errors:[]},this.settings={is_disabled:!1,ajax:{url_paths:this.section.getAttribute("data-api-paths"),url_regenerate:this.section.getAttribute("data-api-regenerate"),error_message:this.section.getAttribute("data-api-error-message")},units:["kB","MB","GB"]},this.atts={progress:"data-percent"},this.classes={progress_error:"webpLoader__barProgress--error",button_disabled:"webpLoader__button--disabled",error_message:"webpLoader__errorsContentError"},!0}},{key:"set_events",value:function(){this.button.addEventListener("click",this.init_regeneration.bind(this))}},{key:"init_regeneration",value:function(e){e.preventDefault(),this.settings.is_disabled||(this.settings.is_disabled=!0,this.button.classList.add(this.classes.button_disabled),this.option_force.setAttribute("disabled","disabled"),this.wrapper.removeAttribute("hidden"),this.send_request_for_paths())}},{key:"send_request_for_paths",value:function(){var e=this,t=this.settings.ajax.url_paths;o()({method:"POST",url:t,data:this.get_data_for_paths_request()}).then((function(t){e.data.items=t.data,e.data.max=t.data.length,e.regenerate_next_images()})).catch((function(t){e.catch_request_error(t,!0)}))}},{key:"get_data_for_paths_request",value:function(){var e=new FormData;return e.append("regenerate_force",this.option_force.checked?1:0),e}},{key:"regenerate_next_images",value:function(){if(0===this.data.max&&this.update_progress(),!(this.data.count>=this.data.max)){var e=this.data.items[this.data.count];this.data.count++,this.send_request_for_regeneration(e)}}},{key:"send_request_for_regeneration",value:function(e){var t=this,r=this.settings.ajax.url_regenerate;o()({method:"POST",url:r,data:{paths:e}}).then((function(e){var r=e.data.is_fatal_error;t.update_errors(e.data.errors,r),r||(t.update_size(e.data.size.before,e.data.size.after),t.update_progress(),t.regenerate_next_images())})).catch((function(r){t.catch_request_error(r,!1,e),t.regenerate_next_images()}))}},{key:"update_errors",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=0;r<e.length;r++)this.print_error_message(e[r],t);t&&this.set_fatal_error()}},{key:"set_fatal_error",value:function(){this.progress.classList.add(this.classes.progress_error)}},{key:"catch_request_error",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;t&&(this.print_error_message([this.settings.ajax.error_message],!0),this.set_fatal_error());var n=null!==r?'["'.concat(r.join('", "'),'"]'):"";this.print_error_message("".concat(e.response.status," - ").concat(e.response.statusText," (").concat(e.response.config.url,") ").concat(n),!0,!0)}},{key:"print_error_message",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=document.createElement("p");if(r){var o=document.createElement("pre");o.innerText=e,n.appendChild(o)}else n.innerHTML=e;t&&n.classList.add(this.classes.error_message),this.errors.removeAttribute("hidden"),this.errors_inner.appendChild(n)}},{key:"update_size",value:function(e,t){var r=this.data.size;r.before+=e,r.after+=t;var n=r.before-r.after;if(n<0&&(n=0),0!==n){var o=Math.round(100*(1-r.after/r.before));o<0&&(o=0);var s=-1;do{s++,n/=1024}while(n>1024);var i=n.toFixed(2),a=this.settings.units[s];this.progress_size.innerHTML="".concat(i," ").concat(a," (").concat(o,"%)")}}},{key:"update_progress",value:function(){var e=this.data.max>0?Math.floor(this.data.count/this.data.max*100):100;e>100&&(e=100),100===e&&(this.success.removeAttribute("hidden"),this.success_popup&&this.success_popup.removeAttribute("hidden")),this.progress.setAttribute(this.atts.progress,e.toString())}}])&&c(t.prototype,r),n&&c(t,n),e}();new function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),new i,new u,new f}},694:function(){},155:function(e){var t,r,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var a,u=[],c=!1,f=-1;function l(){c&&a&&(c=!1,a.length?u=a.concat(u):f=-1,u.length&&h())}function h(){if(!c){var e=i(l);c=!0;for(var t=u.length;t;){for(a=u,u=[];++f<t;)a&&a[f].run();f=-1,t=u.length}a=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function p(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new d(e,t)),1!==u.length||c||i(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},593:function(e){"use strict";e.exports=JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}')}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var s=r[e]={exports:{}};return t[e](s,s.exports,n),s.exports}n.m=t,e=[],n.O=function(t,r,o,s){if(!r){var i=1/0;for(f=0;f<e.length;f++){r=e[f][0],o=e[f][1],s=e[f][2];for(var a=!0,u=0;u<r.length;u++)(!1&s||i>=s)&&Object.keys(n.O).every((function(e){return n.O[e](r[u])}))?r.splice(u--,1):(a=!1,s<i&&(i=s));if(a){e.splice(f--,1);var c=o();void 0!==c&&(t=c)}}return t}s=s||0;for(var f=e.length;f>0&&e[f-1][2]>s;f--)e[f]=e[f-1];e[f]=[r,o,s]},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={794:0,505:0};n.O.j=function(t){return 0===e[t]};var t=function(t,r){var o,s,i=r[0],a=r[1],u=r[2],c=0;if(i.some((function(t){return 0!==e[t]}))){for(o in a)n.o(a,o)&&(n.m[o]=a[o]);if(u)var f=u(n)}for(t&&t(r);c<i.length;c++)s=i[c],n.o(e,s)&&e[s]&&e[s][0](),e[i[c]]=0;return n.O(f)},r=self.webpackChunkwebp_converter_for_media=self.webpackChunkwebp_converter_for_media||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}(),n.O(void 0,[505],(function(){return n(70)}));var o=n.O(void 0,[505],(function(){return n(694)}));o=n.O(o)}();
|
changelog.txt
CHANGED
@@ -1,5 +1,9 @@
|
|
1 |
== Changelog ==
|
2 |
|
|
|
|
|
|
|
|
|
3 |
= 3.2.3 (2021-10-15) =
|
4 |
* `[Added]` Exclusion of re-converting images that caused regeneration error
|
5 |
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 3.2.4 (2021-11-21) =
|
4 |
+
* `[Fixed]` Automatic image conversion when /uploads directory is not organized into monthly and yearly folders
|
5 |
+
* `[Fixed]` Displaying errors when converting images
|
6 |
+
|
7 |
= 3.2.3 (2021-10-15) =
|
8 |
* `[Added]` Exclusion of re-converting images that caused regeneration error
|
9 |
|
readme.txt
CHANGED
@@ -21,27 +21,27 @@ As of today, over 90% of users use browsers that support the WebP format. The lo
|
|
21 |
|
22 |
This will be a profit both for your users who will not have to download so much data, but also for a server that will be less loaded. Remember that a better optimized website also affects your Google ranking.
|
23 |
|
24 |
-
#### Support for additional directories
|
25 |
-
|
26 |
-
Now you can convert WebP and optimize images not only from `/uploads` directory but also from `/plugins` and `/themes` directories. This allows full integration with the WebP format!
|
27 |
-
|
28 |
#### How does this work?
|
29 |
|
30 |
-
- By adding images to your Media Library, convert WebP starts automatically and WebP images are saved in a separate directory.
|
31 |
- If you have just installed the plugin, you can optimize images with one click.
|
32 |
-
-
|
33 |
-
-
|
34 |
-
-
|
35 |
-
-
|
36 |
-
-
|
37 |
-
-
|
38 |
- In case rewriting by rules from .htaccess file is blocked, a mode is available which loads images via PHP file. Then image URLs are changed, but the logic of operation is the same as in the case of the default mode.
|
39 |
- The final result is that your users download less than half of the data, and the website itself loads faster!
|
|
|
40 |
|
41 |
#### Convert WebP - it is the future!
|
42 |
|
43 |
Optimize images and raise your website to a new level now! Install the plugin and enjoy the website that loads faster by image optimization. Surely you and your users will appreciate it.
|
44 |
|
|
|
|
|
|
|
|
|
45 |
#### Support to the development of plugin
|
46 |
|
47 |
We spend hours working on the development of this plugin. Technical support also requires a lot of time, but we do it because we want to offer you the best plugin. We enjoy every new plugin installation.
|
@@ -137,7 +137,7 @@ When you have installed plugin and converted all images, follow these steps:
|
|
137 |
7. In addition, you can check weight of website before and after using plugin. The difference will be huge!
|
138 |
8. More information: [here](https://gbiorczyk.pl/webp-converter/check-devtools.png)
|
139 |
|
140 |
-
Please remember that in default loading mode *(via .htaccess)* URLs will remain unchanged. When you open the image in a new tab or look at its URL, you'll see the original URL.
|
141 |
|
142 |
WebP is only used when loading a image on a website. In default loading mode *(via .htaccess)* it is done by the rules from the .htaccess file, on the server side, without the visible URL change to the image. Yes, it can be called magic :)
|
143 |
|
@@ -458,6 +458,10 @@ This is all very important to us and allows us to do even better things for you!
|
|
458 |
|
459 |
== Changelog ==
|
460 |
|
|
|
|
|
|
|
|
|
461 |
= 3.2.3 (2021-10-15) =
|
462 |
* `[Added]` Exclusion of re-converting images that caused regeneration error
|
463 |
|
21 |
|
22 |
This will be a profit both for your users who will not have to download so much data, but also for a server that will be less loaded. Remember that a better optimized website also affects your Google ranking.
|
23 |
|
|
|
|
|
|
|
|
|
24 |
#### How does this work?
|
25 |
|
|
|
26 |
- If you have just installed the plugin, you can optimize images with one click.
|
27 |
+
- New images that will be added to the Media Library will be converted automatically.
|
28 |
+
- Our plugin does not modify your original images in any way. This means security for you and your files.
|
29 |
+
- When the browser loads an image, our plugin checks if it supports the WebP format. If so, the image in WebP format is loaded.
|
30 |
+
- The plugin does not make redirects in default mode, so the URL is always the same. Only the MIME type of the image changes to `image/webp`.
|
31 |
+
- No redirects means no cache issues, faster and trouble-free operation of your website. If you want to know more about how it works, check out [the plugin FAQ](#faq) below.
|
32 |
+
- It does not matter if the image display as an `img` HTML tag or you use `background-image`. It works always!
|
33 |
- In case rewriting by rules from .htaccess file is blocked, a mode is available which loads images via PHP file. Then image URLs are changed, but the logic of operation is the same as in the case of the default mode.
|
34 |
- The final result is that your users download less than half of the data, and the website itself loads faster!
|
35 |
+
- You lose nothing - if you had to remove the plugin, it will remove everything after itself. It does not leave any trace, so you can check it with ease.
|
36 |
|
37 |
#### Convert WebP - it is the future!
|
38 |
|
39 |
Optimize images and raise your website to a new level now! Install the plugin and enjoy the website that loads faster by image optimization. Surely you and your users will appreciate it.
|
40 |
|
41 |
+
#### Support for additional directories
|
42 |
+
|
43 |
+
You can convert WebP and optimize images not only from `/uploads` directory but also from `/plugins` and `/themes` directories. This allows full integration with the WebP format!
|
44 |
+
|
45 |
#### Support to the development of plugin
|
46 |
|
47 |
We spend hours working on the development of this plugin. Technical support also requires a lot of time, but we do it because we want to offer you the best plugin. We enjoy every new plugin installation.
|
137 |
7. In addition, you can check weight of website before and after using plugin. The difference will be huge!
|
138 |
8. More information: [here](https://gbiorczyk.pl/webp-converter/check-devtools.png)
|
139 |
|
140 |
+
Please remember that in default loading mode *(via .htaccess)* URLs will remain unchanged. When you open the image in a new tab or look at its URL, you'll see the original URL.
|
141 |
|
142 |
WebP is only used when loading a image on a website. In default loading mode *(via .htaccess)* it is done by the rules from the .htaccess file, on the server side, without the visible URL change to the image. Yes, it can be called magic :)
|
143 |
|
458 |
|
459 |
== Changelog ==
|
460 |
|
461 |
+
= 3.2.4 (2021-11-21) =
|
462 |
+
* `[Fixed]` Automatic image conversion when /uploads directory is not organized into monthly and yearly folders
|
463 |
+
* `[Fixed]` Displaying errors when converting images
|
464 |
+
|
465 |
= 3.2.3 (2021-10-15) =
|
466 |
* `[Added]` Exclusion of re-converting images that caused regeneration error
|
467 |
|
src/Conversion/Endpoint/PathsEndpoint.php
CHANGED
@@ -9,7 +9,7 @@ use WebpConverter\Settings\Option\SupportedDirectoriesOption;
|
|
9 |
*/
|
10 |
class PathsEndpoint extends EndpointAbstract {
|
11 |
|
12 |
-
const
|
13 |
|
14 |
/**
|
15 |
* {@inheritdoc}
|
@@ -41,7 +41,11 @@ class PathsEndpoint extends EndpointAbstract {
|
|
41 |
$params = $request->get_params();
|
42 |
$skip_converted = ( $params['regenerate_force'] !== true );
|
43 |
|
44 |
-
$data = $this->get_paths(
|
|
|
|
|
|
|
|
|
45 |
return new \WP_REST_Response(
|
46 |
$data,
|
47 |
200
|
@@ -73,6 +77,8 @@ class PathsEndpoint extends EndpointAbstract {
|
|
73 |
$list = array_merge( $list, $paths );
|
74 |
}
|
75 |
|
|
|
|
|
76 |
if ( $chunk_size === 0 ) {
|
77 |
return $list;
|
78 |
}
|
9 |
*/
|
10 |
class PathsEndpoint extends EndpointAbstract {
|
11 |
|
12 |
+
const PATHS_PER_REQUEST_LOCAL = 10;
|
13 |
|
14 |
/**
|
15 |
* {@inheritdoc}
|
41 |
$params = $request->get_params();
|
42 |
$skip_converted = ( $params['regenerate_force'] !== true );
|
43 |
|
44 |
+
$data = $this->get_paths(
|
45 |
+
$skip_converted,
|
46 |
+
self::PATHS_PER_REQUEST_LOCAL
|
47 |
+
);
|
48 |
+
|
49 |
return new \WP_REST_Response(
|
50 |
$data,
|
51 |
200
|
77 |
$list = array_merge( $list, $paths );
|
78 |
}
|
79 |
|
80 |
+
rsort( $list );
|
81 |
+
|
82 |
if ( $chunk_size === 0 ) {
|
83 |
return $list;
|
84 |
}
|
src/Conversion/Media/Upload.php
CHANGED
@@ -54,6 +54,7 @@ class Upload implements HookableInterface {
|
|
54 |
|
55 |
$paths = array_diff( $paths, $this->converted_paths );
|
56 |
$this->converted_paths = array_merge( $this->converted_paths, $paths );
|
|
|
57 |
$this->init_conversion( $paths );
|
58 |
|
59 |
return $data;
|
@@ -88,10 +89,11 @@ class Upload implements HookableInterface {
|
|
88 |
* @return string Server path of source image.
|
89 |
*/
|
90 |
private function get_attachment_directory( string $path ): string {
|
91 |
-
$upload
|
92 |
-
$
|
93 |
-
$source
|
94 |
-
|
|
|
95 |
}
|
96 |
|
97 |
/**
|
54 |
|
55 |
$paths = array_diff( $paths, $this->converted_paths );
|
56 |
$this->converted_paths = array_merge( $this->converted_paths, $paths );
|
57 |
+
|
58 |
$this->init_conversion( $paths );
|
59 |
|
60 |
return $data;
|
89 |
* @return string Server path of source image.
|
90 |
*/
|
91 |
private function get_attachment_directory( string $path ): string {
|
92 |
+
$upload = wp_upload_dir();
|
93 |
+
$path_directory = rtrim( dirname( $path ), '/\\.' );
|
94 |
+
$source = rtrim( $upload['basedir'], '/\\' ) . '/' . $path_directory . '/';
|
95 |
+
|
96 |
+
return str_replace( '\\', '/', $source );
|
97 |
}
|
98 |
|
99 |
/**
|
src/Conversion/Method/GdMethod.php
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
namespace WebpConverter\Conversion\Method;
|
4 |
|
5 |
use WebpConverter\Conversion\Exception;
|
6 |
-
use WebpConverter\Conversion\Format\AvifFormat;
|
7 |
use WebpConverter\Conversion\Format\WebpFormat;
|
8 |
use WebpConverter\Settings\Option\ImagesQualityOption;
|
9 |
use WebpConverter\Settings\Option\SupportedExtensionsOption;
|
@@ -58,8 +57,6 @@ class GdMethod extends LibraryMethodAbstract {
|
|
58 |
switch ( $format ) {
|
59 |
case WebpFormat::FORMAT_EXTENSION:
|
60 |
return 'imagewebp';
|
61 |
-
case AvifFormat::FORMAT_EXTENSION:
|
62 |
-
return 'imageavif';
|
63 |
default:
|
64 |
return null;
|
65 |
}
|
3 |
namespace WebpConverter\Conversion\Method;
|
4 |
|
5 |
use WebpConverter\Conversion\Exception;
|
|
|
6 |
use WebpConverter\Conversion\Format\WebpFormat;
|
7 |
use WebpConverter\Settings\Option\ImagesQualityOption;
|
8 |
use WebpConverter\Settings\Option\SupportedExtensionsOption;
|
57 |
switch ( $format ) {
|
58 |
case WebpFormat::FORMAT_EXTENSION:
|
59 |
return 'imagewebp';
|
|
|
|
|
60 |
default:
|
61 |
return null;
|
62 |
}
|
src/Conversion/Method/ImagickMethod.php
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
namespace WebpConverter\Conversion\Method;
|
4 |
|
5 |
use WebpConverter\Conversion\Exception;
|
6 |
-
use WebpConverter\Conversion\Format\AvifFormat;
|
7 |
use WebpConverter\Conversion\Format\WebpFormat;
|
8 |
use WebpConverter\Settings\Option\ExtraFeaturesOption;
|
9 |
use WebpConverter\Settings\Option\ImagesQualityOption;
|
@@ -28,8 +27,7 @@ class ImagickMethod extends LibraryMethodAbstract {
|
|
28 |
* {@inheritdoc}
|
29 |
*/
|
30 |
public function get_label(): string {
|
31 |
-
|
32 |
-
return sprintf( __( '%s (recommended)', 'webp-converter-for-media' ), 'Imagick' );
|
33 |
}
|
34 |
|
35 |
/**
|
@@ -62,8 +60,6 @@ class ImagickMethod extends LibraryMethodAbstract {
|
|
62 |
switch ( $format ) {
|
63 |
case WebpFormat::FORMAT_EXTENSION:
|
64 |
return 'WEBP';
|
65 |
-
case AvifFormat::FORMAT_EXTENSION:
|
66 |
-
return 'AVIF';
|
67 |
default:
|
68 |
return null;
|
69 |
}
|
3 |
namespace WebpConverter\Conversion\Method;
|
4 |
|
5 |
use WebpConverter\Conversion\Exception;
|
|
|
6 |
use WebpConverter\Conversion\Format\WebpFormat;
|
7 |
use WebpConverter\Settings\Option\ExtraFeaturesOption;
|
8 |
use WebpConverter\Settings\Option\ImagesQualityOption;
|
27 |
* {@inheritdoc}
|
28 |
*/
|
29 |
public function get_label(): string {
|
30 |
+
return 'Imagick';
|
|
|
31 |
}
|
32 |
|
33 |
/**
|
60 |
switch ( $format ) {
|
61 |
case WebpFormat::FORMAT_EXTENSION:
|
62 |
return 'WEBP';
|
|
|
|
|
63 |
default:
|
64 |
return null;
|
65 |
}
|
src/Conversion/Method/MethodAbstract.php
CHANGED
@@ -11,6 +11,11 @@ use WebpConverter\Settings\Option\ExtraFeaturesOption;
|
|
11 |
*/
|
12 |
abstract class MethodAbstract implements MethodInterface {
|
13 |
|
|
|
|
|
|
|
|
|
|
|
14 |
/**
|
15 |
* Messages of errors that occurred during conversion.
|
16 |
*
|
@@ -32,6 +37,13 @@ abstract class MethodAbstract implements MethodInterface {
|
|
32 |
*/
|
33 |
protected $size_after = 0;
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
/**
|
36 |
* {@inheritdoc}
|
37 |
*/
|
11 |
*/
|
12 |
abstract class MethodAbstract implements MethodInterface {
|
13 |
|
14 |
+
/**
|
15 |
+
* @var bool
|
16 |
+
*/
|
17 |
+
protected $is_fatal_error = false;
|
18 |
+
|
19 |
/**
|
20 |
* Messages of errors that occurred during conversion.
|
21 |
*
|
37 |
*/
|
38 |
protected $size_after = 0;
|
39 |
|
40 |
+
/**
|
41 |
+
* {@inheritdoc}
|
42 |
+
*/
|
43 |
+
public function is_fatal_error(): bool {
|
44 |
+
return $this->is_fatal_error;
|
45 |
+
}
|
46 |
+
|
47 |
/**
|
48 |
* {@inheritdoc}
|
49 |
*/
|
src/Conversion/Method/MethodFactory.php
CHANGED
@@ -78,6 +78,7 @@ class MethodFactory {
|
|
78 |
|| ( ! ( new FormatFactory() )->get_available_formats( $method_name ) ) ) {
|
79 |
continue;
|
80 |
}
|
|
|
81 |
$values[ $method_name ] = $method->get_label();
|
82 |
}
|
83 |
return $values;
|
78 |
|| ( ! ( new FormatFactory() )->get_available_formats( $method_name ) ) ) {
|
79 |
continue;
|
80 |
}
|
81 |
+
|
82 |
$values[ $method_name ] = $method->get_label();
|
83 |
}
|
84 |
return $values;
|
src/Conversion/Method/MethodIntegrator.php
CHANGED
@@ -24,7 +24,7 @@ class MethodIntegrator {
|
|
24 |
*
|
25 |
* @param string[] $paths Server paths for source images.
|
26 |
*
|
27 |
-
* @return
|
28 |
*/
|
29 |
public function init_conversion( array $paths ) {
|
30 |
if ( ! $method = $this->get_method_used() ) {
|
@@ -33,8 +33,9 @@ class MethodIntegrator {
|
|
33 |
|
34 |
$method->convert_paths( $paths, $this->plugin_data->get_plugin_settings() );
|
35 |
return [
|
36 |
-
'
|
37 |
-
'
|
|
|
38 |
'before' => $method->get_size_before(),
|
39 |
'after' => $method->get_size_after(),
|
40 |
],
|
24 |
*
|
25 |
* @param string[] $paths Server paths for source images.
|
26 |
*
|
27 |
+
* @return mixed[]|null Results data of conversion.
|
28 |
*/
|
29 |
public function init_conversion( array $paths ) {
|
30 |
if ( ! $method = $this->get_method_used() ) {
|
33 |
|
34 |
$method->convert_paths( $paths, $this->plugin_data->get_plugin_settings() );
|
35 |
return [
|
36 |
+
'is_fatal_error' => $method->is_fatal_error(),
|
37 |
+
'errors' => apply_filters( 'webpc_convert_errors', $method->get_errors() ),
|
38 |
+
'size' => [
|
39 |
'before' => $method->get_size_before(),
|
40 |
'after' => $method->get_size_after(),
|
41 |
],
|
src/Conversion/Method/MethodInterface.php
CHANGED
@@ -2,15 +2,11 @@
|
|
2 |
|
3 |
namespace WebpConverter\Conversion\Method;
|
4 |
|
5 |
-
use WebpConverter\Conversion\SkipCrashed;
|
6 |
-
|
7 |
/**
|
8 |
* Interface for class that converts images.
|
9 |
*/
|
10 |
interface MethodInterface {
|
11 |
|
12 |
-
public function __construct( SkipCrashed $skip_crashed );
|
13 |
-
|
14 |
/**
|
15 |
* Returns name of conversion method.
|
16 |
*
|
@@ -41,6 +37,11 @@ interface MethodInterface {
|
|
41 |
*/
|
42 |
public static function is_method_active( string $format ): bool;
|
43 |
|
|
|
|
|
|
|
|
|
|
|
44 |
/**
|
45 |
* Returns errors generated during image conversion.
|
46 |
*
|
2 |
|
3 |
namespace WebpConverter\Conversion\Method;
|
4 |
|
|
|
|
|
5 |
/**
|
6 |
* Interface for class that converts images.
|
7 |
*/
|
8 |
interface MethodInterface {
|
9 |
|
|
|
|
|
10 |
/**
|
11 |
* Returns name of conversion method.
|
12 |
*
|
37 |
*/
|
38 |
public static function is_method_active( string $format ): bool;
|
39 |
|
40 |
+
/**
|
41 |
+
* @return bool
|
42 |
+
*/
|
43 |
+
public function is_fatal_error(): bool;
|
44 |
+
|
45 |
/**
|
46 |
* Returns errors generated during image conversion.
|
47 |
*
|
src/Conversion/SkipConvertedPaths.php
CHANGED
@@ -6,6 +6,7 @@ use WebpConverter\Conversion\Format\FormatFactory;
|
|
6 |
use WebpConverter\HookableInterface;
|
7 |
use WebpConverter\PluginData;
|
8 |
use WebpConverter\Settings\Option\ConversionMethodOption;
|
|
|
9 |
|
10 |
/**
|
11 |
* Removes from list of source file paths those that have already been converted.
|
@@ -88,12 +89,15 @@ class SkipConvertedPaths implements HookableInterface {
|
|
88 |
* @return string[] Available output extensions.
|
89 |
*/
|
90 |
private function get_output_extensions(): array {
|
91 |
-
$settings
|
92 |
-
$
|
|
|
93 |
|
94 |
$values = [];
|
95 |
-
foreach ( $
|
96 |
-
|
|
|
|
|
97 |
}
|
98 |
return $values;
|
99 |
}
|
6 |
use WebpConverter\HookableInterface;
|
7 |
use WebpConverter\PluginData;
|
8 |
use WebpConverter\Settings\Option\ConversionMethodOption;
|
9 |
+
use WebpConverter\Settings\Option\OutputFormatsOption;
|
10 |
|
11 |
/**
|
12 |
* Removes from list of source file paths those that have already been converted.
|
89 |
* @return string[] Available output extensions.
|
90 |
*/
|
91 |
private function get_output_extensions(): array {
|
92 |
+
$settings = $this->plugin_data->get_plugin_settings();
|
93 |
+
$current_exts = $settings[ OutputFormatsOption::OPTION_NAME ];
|
94 |
+
$allowed_exts = ( new FormatFactory() )->get_available_formats( $settings[ ConversionMethodOption::OPTION_NAME ] ?? null );
|
95 |
|
96 |
$values = [];
|
97 |
+
foreach ( $allowed_exts as $extension => $format_label ) {
|
98 |
+
if ( in_array( $extension, $current_exts ) ) {
|
99 |
+
$values[] = $extension;
|
100 |
+
}
|
101 |
}
|
102 |
return $values;
|
103 |
}
|
src/Error/Detector/LibsWithoutAvifSupportDetector.php
DELETED
@@ -1,40 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace WebpConverter\Error\Detector;
|
4 |
-
|
5 |
-
use WebpConverter\Conversion\Format\AvifFormat;
|
6 |
-
use WebpConverter\Conversion\Method\GdMethod;
|
7 |
-
use WebpConverter\Conversion\Method\ImagickMethod;
|
8 |
-
use WebpConverter\Error\Notice\LibsWithoutAvifSupportNotice;
|
9 |
-
use WebpConverter\PluginData;
|
10 |
-
use WebpConverter\Settings\Option\OutputFormatsOption;
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Checks for configuration errors about image conversion methods that do not support AVIF output format.
|
14 |
-
*/
|
15 |
-
class LibsWithoutAvifSupportDetector implements ErrorDetector {
|
16 |
-
|
17 |
-
/**
|
18 |
-
* @var PluginData
|
19 |
-
*/
|
20 |
-
private $plugin_data;
|
21 |
-
|
22 |
-
public function __construct( PluginData $plugin_data ) {
|
23 |
-
$this->plugin_data = $plugin_data;
|
24 |
-
}
|
25 |
-
|
26 |
-
/**
|
27 |
-
* {@inheritdoc}
|
28 |
-
*/
|
29 |
-
public function get_error() {
|
30 |
-
$output_formats = $this->plugin_data->get_plugin_settings()[ OutputFormatsOption::OPTION_NAME ];
|
31 |
-
|
32 |
-
if ( ! in_array( AvifFormat::FORMAT_EXTENSION, $output_formats )
|
33 |
-
|| GdMethod::is_method_active( AvifFormat::FORMAT_EXTENSION )
|
34 |
-
|| ImagickMethod::is_method_active( AvifFormat::FORMAT_EXTENSION ) ) {
|
35 |
-
return null;
|
36 |
-
}
|
37 |
-
|
38 |
-
return new LibsWithoutAvifSupportNotice();
|
39 |
-
}
|
40 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/Error/Detector/RewritesErrorsDetector.php
CHANGED
@@ -10,12 +10,12 @@ use WebpConverter\Error\Notice\PassthruNotWorkingNotice;
|
|
10 |
use WebpConverter\Error\Notice\RewritesCachedNotice;
|
11 |
use WebpConverter\Error\Notice\RewritesNotExecutedNotice;
|
12 |
use WebpConverter\Error\Notice\RewritesNotWorkingNotice;
|
13 |
-
use WebpConverter\Helper\FileLoader;
|
14 |
use WebpConverter\Loader\HtaccessLoader;
|
15 |
use WebpConverter\Loader\LoaderAbstract;
|
16 |
use WebpConverter\Loader\PassthruLoader;
|
17 |
use WebpConverter\PluginData;
|
18 |
use WebpConverter\PluginInfo;
|
|
|
19 |
use WebpConverter\Settings\Option\LoaderTypeOption;
|
20 |
use WebpConverter\Settings\Option\OutputFormatsOption;
|
21 |
use WebpConverter\Settings\Option\SupportedDirectoriesOption;
|
10 |
use WebpConverter\Error\Notice\RewritesCachedNotice;
|
11 |
use WebpConverter\Error\Notice\RewritesNotExecutedNotice;
|
12 |
use WebpConverter\Error\Notice\RewritesNotWorkingNotice;
|
|
|
13 |
use WebpConverter\Loader\HtaccessLoader;
|
14 |
use WebpConverter\Loader\LoaderAbstract;
|
15 |
use WebpConverter\Loader\PassthruLoader;
|
16 |
use WebpConverter\PluginData;
|
17 |
use WebpConverter\PluginInfo;
|
18 |
+
use WebpConverter\Service\FileLoader;
|
19 |
use WebpConverter\Settings\Option\LoaderTypeOption;
|
20 |
use WebpConverter\Settings\Option\OutputFormatsOption;
|
21 |
use WebpConverter\Settings\Option\SupportedDirectoriesOption;
|
src/Error/ErrorDetectorAggregator.php
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
namespace WebpConverter\Error;
|
4 |
|
5 |
use WebpConverter\Error\Detector\LibsNotInstalledDetector;
|
6 |
-
use WebpConverter\Error\Detector\LibsWithoutAvifSupportDetector;
|
7 |
use WebpConverter\Error\Detector\LibsWithoutWebpSupportDetector;
|
8 |
use WebpConverter\Error\Detector\PassthruExecutionDetector;
|
9 |
use WebpConverter\Error\Detector\PathsErrorsDetector;
|
@@ -12,10 +11,10 @@ use WebpConverter\Error\Detector\RewritesErrorsDetector;
|
|
12 |
use WebpConverter\Error\Detector\SettingsIncorrectDetector;
|
13 |
use WebpConverter\Error\Notice\ErrorNotice;
|
14 |
use WebpConverter\Error\Notice\RewritesCachedNotice;
|
15 |
-
use WebpConverter\Helper\OptionsAccess;
|
16 |
use WebpConverter\HookableInterface;
|
17 |
use WebpConverter\PluginData;
|
18 |
use WebpConverter\PluginInfo;
|
|
|
19 |
|
20 |
/**
|
21 |
* Supports generating list of server configuration errors.
|
@@ -107,7 +106,7 @@ class ErrorDetectorAggregator implements HookableInterface {
|
|
107 |
$error_codes[] = $error->get_key();
|
108 |
}
|
109 |
} else {
|
110 |
-
$error_codes =
|
111 |
}
|
112 |
|
113 |
return $error_codes;
|
@@ -124,7 +123,7 @@ class ErrorDetectorAggregator implements HookableInterface {
|
|
124 |
$error_codes[] = $error->get_key();
|
125 |
}
|
126 |
|
127 |
-
|
128 |
}
|
129 |
|
130 |
/**
|
@@ -144,8 +143,6 @@ class ErrorDetectorAggregator implements HookableInterface {
|
|
144 |
$this->cached_errors[] = $new_error;
|
145 |
} elseif ( $new_error = ( new LibsWithoutWebpSupportDetector() )->get_error() ) {
|
146 |
$this->cached_errors[] = $new_error;
|
147 |
-
} elseif ( $new_error = ( new LibsWithoutAvifSupportDetector( $this->plugin_data ) )->get_error() ) {
|
148 |
-
$this->cached_errors[] = $new_error;
|
149 |
}
|
150 |
|
151 |
if ( $new_error = ( new RestApiDisabledDetector() )->get_error() ) {
|
3 |
namespace WebpConverter\Error;
|
4 |
|
5 |
use WebpConverter\Error\Detector\LibsNotInstalledDetector;
|
|
|
6 |
use WebpConverter\Error\Detector\LibsWithoutWebpSupportDetector;
|
7 |
use WebpConverter\Error\Detector\PassthruExecutionDetector;
|
8 |
use WebpConverter\Error\Detector\PathsErrorsDetector;
|
11 |
use WebpConverter\Error\Detector\SettingsIncorrectDetector;
|
12 |
use WebpConverter\Error\Notice\ErrorNotice;
|
13 |
use WebpConverter\Error\Notice\RewritesCachedNotice;
|
|
|
14 |
use WebpConverter\HookableInterface;
|
15 |
use WebpConverter\PluginData;
|
16 |
use WebpConverter\PluginInfo;
|
17 |
+
use WebpConverter\Service\OptionsAccessManager;
|
18 |
|
19 |
/**
|
20 |
* Supports generating list of server configuration errors.
|
106 |
$error_codes[] = $error->get_key();
|
107 |
}
|
108 |
} else {
|
109 |
+
$error_codes = OptionsAccessManager::get_option( self::ERRORS_CACHE_OPTION, [] );
|
110 |
}
|
111 |
|
112 |
return $error_codes;
|
123 |
$error_codes[] = $error->get_key();
|
124 |
}
|
125 |
|
126 |
+
OptionsAccessManager::update_option( self::ERRORS_CACHE_OPTION, $error_codes );
|
127 |
}
|
128 |
|
129 |
/**
|
143 |
$this->cached_errors[] = $new_error;
|
144 |
} elseif ( $new_error = ( new LibsWithoutWebpSupportDetector() )->get_error() ) {
|
145 |
$this->cached_errors[] = $new_error;
|
|
|
|
|
146 |
}
|
147 |
|
148 |
if ( $new_error = ( new RestApiDisabledDetector() )->get_error() ) {
|
src/Error/Notice/LibsWithoutAvifSupportNotice.php
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace WebpConverter\Error\Notice;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* {@inheritdoc}
|
7 |
-
*/
|
8 |
-
class LibsWithoutAvifSupportNotice implements ErrorNotice {
|
9 |
-
|
10 |
-
const ERROR_KEY = 'libs_without_avif_support';
|
11 |
-
|
12 |
-
/**
|
13 |
-
* {@inheritdoc}
|
14 |
-
*/
|
15 |
-
public function get_key(): string {
|
16 |
-
return self::ERROR_KEY;
|
17 |
-
}
|
18 |
-
|
19 |
-
/**
|
20 |
-
* {@inheritdoc}
|
21 |
-
*/
|
22 |
-
public function get_message(): array {
|
23 |
-
return [
|
24 |
-
__( 'The selected option of "Conversion method" does not support AVIF format. This is a new format, so you will probably have to wait for its full support via PHP on your server. This issue is plugin-independent.', 'webp-converter-for-media' ),
|
25 |
-
__( 'Select a different method in the "Conversion method" option, if available. Or in the "List of supported output formats" option, select only the WebP format, because the selected conversion method does not yet allow converting to AVIF format.', 'webp-converter-for-media' ),
|
26 |
-
];
|
27 |
-
}
|
28 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/Loader/HtaccessLoader.php
CHANGED
@@ -219,11 +219,11 @@ class HtaccessLoader extends LoaderAbstract {
|
|
219 |
return $content;
|
220 |
}
|
221 |
|
|
|
222 |
foreach ( $this->get_mime_types() as $format => $mime_type ) {
|
223 |
-
$content .= '<IfModule mod_mime.c>' . PHP_EOL;
|
224 |
$content .= " AddType ${mime_type} .${format}" . PHP_EOL;
|
225 |
-
$content .= '</IfModule>';
|
226 |
}
|
|
|
227 |
|
228 |
return apply_filters( 'webpc_htaccess_mod_mime', $content );
|
229 |
}
|
219 |
return $content;
|
220 |
}
|
221 |
|
222 |
+
$content .= '<IfModule mod_mime.c>' . PHP_EOL;
|
223 |
foreach ( $this->get_mime_types() as $format => $mime_type ) {
|
|
|
224 |
$content .= " AddType ${mime_type} .${format}" . PHP_EOL;
|
|
|
225 |
}
|
226 |
+
$content .= '</IfModule>';
|
227 |
|
228 |
return apply_filters( 'webpc_htaccess_mod_mime', $content );
|
229 |
}
|
src/Notice/NoticeIntegration.php
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
|
3 |
namespace WebpConverter\Notice;
|
4 |
|
5 |
-
use WebpConverter\Helper\OptionsAccess;
|
6 |
-
use WebpConverter\Helper\ViewLoader;
|
7 |
use WebpConverter\HookableInterface;
|
8 |
use WebpConverter\PluginInfo;
|
|
|
|
|
9 |
use WebpConverter\Settings\AdminAssets;
|
10 |
|
11 |
/**
|
@@ -77,11 +77,11 @@ class NoticeIntegration implements HookableInterface {
|
|
77 |
* @return void
|
78 |
*/
|
79 |
public function set_default_value() {
|
80 |
-
if (
|
81 |
return;
|
82 |
}
|
83 |
|
84 |
-
|
85 |
}
|
86 |
|
87 |
/**
|
@@ -90,6 +90,6 @@ class NoticeIntegration implements HookableInterface {
|
|
90 |
* @return void
|
91 |
*/
|
92 |
public function set_disable_value() {
|
93 |
-
|
94 |
}
|
95 |
}
|
2 |
|
3 |
namespace WebpConverter\Notice;
|
4 |
|
|
|
|
|
5 |
use WebpConverter\HookableInterface;
|
6 |
use WebpConverter\PluginInfo;
|
7 |
+
use WebpConverter\Service\OptionsAccessManager;
|
8 |
+
use WebpConverter\Service\ViewLoader;
|
9 |
use WebpConverter\Settings\AdminAssets;
|
10 |
|
11 |
/**
|
77 |
* @return void
|
78 |
*/
|
79 |
public function set_default_value() {
|
80 |
+
if ( OptionsAccessManager::get_option( $this->notice->get_option_name() ) !== null ) {
|
81 |
return;
|
82 |
}
|
83 |
|
84 |
+
OptionsAccessManager::update_option( $this->notice->get_option_name(), $this->notice->get_default_value() );
|
85 |
}
|
86 |
|
87 |
/**
|
90 |
* @return void
|
91 |
*/
|
92 |
public function set_disable_value() {
|
93 |
+
OptionsAccessManager::update_option( $this->notice->get_option_name(), $this->notice->get_disable_value() );
|
94 |
}
|
95 |
}
|
src/Notice/ThanksNotice.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
namespace WebpConverter\Notice;
|
4 |
|
5 |
-
use WebpConverter\
|
6 |
|
7 |
/**
|
8 |
* Supports notice displayed as thank you for using plugin.
|
@@ -38,7 +38,7 @@ class ThanksNotice extends NoticeAbstract implements NoticeInterface {
|
|
38 |
* {@inheritdoc}
|
39 |
*/
|
40 |
public function is_active(): bool {
|
41 |
-
$option_value =
|
42 |
return ( ( $option_value !== null ) && ( $option_value < time() ) );
|
43 |
}
|
44 |
|
2 |
|
3 |
namespace WebpConverter\Notice;
|
4 |
|
5 |
+
use WebpConverter\Service\OptionsAccessManager;
|
6 |
|
7 |
/**
|
8 |
* Supports notice displayed as thank you for using plugin.
|
38 |
* {@inheritdoc}
|
39 |
*/
|
40 |
public function is_active(): bool {
|
41 |
+
$option_value = OptionsAccessManager::get_option( $this->get_option_name() );
|
42 |
return ( ( $option_value !== null ) && ( $option_value < time() ) );
|
43 |
}
|
44 |
|
src/Notice/WelcomeNotice.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
namespace WebpConverter\Notice;
|
4 |
|
5 |
-
use WebpConverter\
|
6 |
use WebpConverter\Settings\Page\PageIntegration;
|
7 |
|
8 |
/**
|
@@ -38,7 +38,7 @@ class WelcomeNotice extends NoticeAbstract implements NoticeInterface {
|
|
38 |
* {@inheritdoc}
|
39 |
*/
|
40 |
public function is_active(): bool {
|
41 |
-
return (
|
42 |
}
|
43 |
|
44 |
/**
|
2 |
|
3 |
namespace WebpConverter\Notice;
|
4 |
|
5 |
+
use WebpConverter\Service\OptionsAccessManager;
|
6 |
use WebpConverter\Settings\Page\PageIntegration;
|
7 |
|
8 |
/**
|
38 |
* {@inheritdoc}
|
39 |
*/
|
40 |
public function is_active(): bool {
|
41 |
+
return ( OptionsAccessManager::get_option( $this->get_option_name() ) === $this->get_default_value() );
|
42 |
}
|
43 |
|
44 |
/**
|
src/Plugin/Deactivation/Modal.php
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
|
3 |
namespace WebpConverter\Plugin\Deactivation;
|
4 |
|
5 |
-
use WebpConverter\Helper\ViewLoader;
|
6 |
use WebpConverter\HookableInterface;
|
7 |
use WebpConverter\PluginData;
|
8 |
use WebpConverter\PluginInfo;
|
|
|
9 |
use WebpConverter\Settings\AdminAssets;
|
10 |
|
11 |
/**
|
2 |
|
3 |
namespace WebpConverter\Plugin\Deactivation;
|
4 |
|
|
|
5 |
use WebpConverter\HookableInterface;
|
6 |
use WebpConverter\PluginData;
|
7 |
use WebpConverter\PluginInfo;
|
8 |
+
use WebpConverter\Service\ViewLoader;
|
9 |
use WebpConverter\Settings\AdminAssets;
|
10 |
|
11 |
/**
|
src/Plugin/Uninstall/PluginSettings.php
CHANGED
@@ -3,10 +3,10 @@
|
|
3 |
namespace WebpConverter\Plugin\Uninstall;
|
4 |
|
5 |
use WebpConverter\Error\ErrorDetectorAggregator;
|
6 |
-
use WebpConverter\Helper\OptionsAccess;
|
7 |
use WebpConverter\Notice\ThanksNotice;
|
8 |
use WebpConverter\Notice\WelcomeNotice;
|
9 |
use WebpConverter\Plugin\Update;
|
|
|
10 |
use WebpConverter\Settings\SettingsSave;
|
11 |
|
12 |
/**
|
@@ -20,11 +20,11 @@ class PluginSettings {
|
|
20 |
* @return void
|
21 |
*/
|
22 |
public static function remove_plugin_settings() {
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
}
|
30 |
}
|
3 |
namespace WebpConverter\Plugin\Uninstall;
|
4 |
|
5 |
use WebpConverter\Error\ErrorDetectorAggregator;
|
|
|
6 |
use WebpConverter\Notice\ThanksNotice;
|
7 |
use WebpConverter\Notice\WelcomeNotice;
|
8 |
use WebpConverter\Plugin\Update;
|
9 |
+
use WebpConverter\Service\OptionsAccessManager;
|
10 |
use WebpConverter\Settings\SettingsSave;
|
11 |
|
12 |
/**
|
20 |
* @return void
|
21 |
*/
|
22 |
public static function remove_plugin_settings() {
|
23 |
+
OptionsAccessManager::delete_option( ThanksNotice::NOTICE_OLD_OPTION );
|
24 |
+
OptionsAccessManager::delete_option( ThanksNotice::NOTICE_OPTION );
|
25 |
+
OptionsAccessManager::delete_option( WelcomeNotice::NOTICE_OPTION );
|
26 |
+
OptionsAccessManager::delete_option( ErrorDetectorAggregator::ERRORS_CACHE_OPTION );
|
27 |
+
OptionsAccessManager::delete_option( SettingsSave::SETTINGS_OPTION );
|
28 |
+
OptionsAccessManager::delete_option( Update::VERSION_OPTION );
|
29 |
}
|
30 |
}
|
src/Plugin/Update.php
CHANGED
@@ -2,11 +2,11 @@
|
|
2 |
|
3 |
namespace WebpConverter\Plugin;
|
4 |
|
5 |
-
use WebpConverter\Helper\OptionsAccess;
|
6 |
use WebpConverter\HookableInterface;
|
7 |
use WebpConverter\Loader\LoaderAbstract;
|
8 |
use WebpConverter\Plugin\Activation\DefaultSettings;
|
9 |
use WebpConverter\PluginInfo;
|
|
|
10 |
|
11 |
/**
|
12 |
* Runs actions after plugin update to new version.
|
@@ -38,7 +38,7 @@ class Update implements HookableInterface {
|
|
38 |
* @internal
|
39 |
*/
|
40 |
public function run_actions_after_update() {
|
41 |
-
$version =
|
42 |
if ( $version === $this->plugin_info->get_plugin_version() ) {
|
43 |
return;
|
44 |
}
|
@@ -46,6 +46,6 @@ class Update implements HookableInterface {
|
|
46 |
( new DefaultSettings( $this->plugin_info ) )->add_default_options();
|
47 |
do_action( LoaderAbstract::ACTION_NAME, true );
|
48 |
|
49 |
-
|
50 |
}
|
51 |
}
|
2 |
|
3 |
namespace WebpConverter\Plugin;
|
4 |
|
|
|
5 |
use WebpConverter\HookableInterface;
|
6 |
use WebpConverter\Loader\LoaderAbstract;
|
7 |
use WebpConverter\Plugin\Activation\DefaultSettings;
|
8 |
use WebpConverter\PluginInfo;
|
9 |
+
use WebpConverter\Service\OptionsAccessManager;
|
10 |
|
11 |
/**
|
12 |
* Runs actions after plugin update to new version.
|
38 |
* @internal
|
39 |
*/
|
40 |
public function run_actions_after_update() {
|
41 |
+
$version = OptionsAccessManager::get_option( self::VERSION_OPTION );
|
42 |
if ( $version === $this->plugin_info->get_plugin_version() ) {
|
43 |
return;
|
44 |
}
|
46 |
( new DefaultSettings( $this->plugin_info ) )->add_default_options();
|
47 |
do_action( LoaderAbstract::ACTION_NAME, true );
|
48 |
|
49 |
+
OptionsAccessManager::update_option( self::VERSION_OPTION, $this->plugin_info->get_plugin_version() );
|
50 |
}
|
51 |
}
|
src/{Helper → Service}/FileLoader.php
RENAMED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
namespace WebpConverter\
|
4 |
|
5 |
use WebpConverter\Loader\PassthruLoader;
|
6 |
use WebpConverter\PluginData;
|
1 |
<?php
|
2 |
|
3 |
+
namespace WebpConverter\Service;
|
4 |
|
5 |
use WebpConverter\Loader\PassthruLoader;
|
6 |
use WebpConverter\PluginData;
|
src/{Helper/OptionsAccess.php → Service/OptionsAccessManager.php}
RENAMED
@@ -1,11 +1,11 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
namespace WebpConverter\
|
4 |
|
5 |
/**
|
6 |
* Provides access to options stored in database.
|
7 |
*/
|
8 |
-
class
|
9 |
|
10 |
/**
|
11 |
* @param string $option_name .
|
1 |
<?php
|
2 |
|
3 |
+
namespace WebpConverter\Service;
|
4 |
|
5 |
/**
|
6 |
* Provides access to options stored in database.
|
7 |
*/
|
8 |
+
class OptionsAccessManager {
|
9 |
|
10 |
/**
|
11 |
* @param string $option_name .
|
src/{Helper → Service}/ViewLoader.php
RENAMED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
namespace WebpConverter\
|
4 |
|
5 |
use WebpConverter\PluginInfo;
|
6 |
|
1 |
<?php
|
2 |
|
3 |
+
namespace WebpConverter\Service;
|
4 |
|
5 |
use WebpConverter\PluginInfo;
|
6 |
|
src/Settings/Option/ImagesQualityOption.php
CHANGED
@@ -13,7 +13,7 @@ class ImagesQualityOption extends OptionAbstract {
|
|
13 |
* {@inheritdoc}
|
14 |
*/
|
15 |
public function get_priority(): int {
|
16 |
-
return
|
17 |
}
|
18 |
|
19 |
/**
|
13 |
* {@inheritdoc}
|
14 |
*/
|
15 |
public function get_priority(): int {
|
16 |
+
return 50;
|
17 |
}
|
18 |
|
19 |
/**
|
src/Settings/Option/LoaderTypeOption.php
CHANGED
@@ -16,7 +16,7 @@ class LoaderTypeOption extends OptionAbstract {
|
|
16 |
* {@inheritdoc}
|
17 |
*/
|
18 |
public function get_priority(): int {
|
19 |
-
return
|
20 |
}
|
21 |
|
22 |
/**
|
16 |
* {@inheritdoc}
|
17 |
*/
|
18 |
public function get_priority(): int {
|
19 |
+
return 60;
|
20 |
}
|
21 |
|
22 |
/**
|
src/Settings/Option/OptionAbstract.php
CHANGED
@@ -12,6 +12,13 @@ abstract class OptionAbstract implements OptionInterface {
|
|
12 |
const OPTION_TYPE_QUALITY = 'quality';
|
13 |
const OPTION_TYPE_INPUT = 'input';
|
14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
/**
|
16 |
* {@inheritdoc}
|
17 |
*/
|
12 |
const OPTION_TYPE_QUALITY = 'quality';
|
13 |
const OPTION_TYPE_INPUT = 'input';
|
14 |
|
15 |
+
/**
|
16 |
+
* {@inheritdoc}
|
17 |
+
*/
|
18 |
+
public function get_notice_lines() {
|
19 |
+
return null;
|
20 |
+
}
|
21 |
+
|
22 |
/**
|
23 |
* {@inheritdoc}
|
24 |
*/
|
src/Settings/Option/OptionIntegration.php
CHANGED
@@ -45,13 +45,14 @@ class OptionIntegration {
|
|
45 |
}
|
46 |
|
47 |
return [
|
48 |
-
'name'
|
49 |
-
'type'
|
50 |
-
'label'
|
51 |
-
'
|
52 |
-
'
|
53 |
-
'
|
54 |
-
'
|
|
|
55 |
];
|
56 |
}
|
57 |
|
45 |
}
|
46 |
|
47 |
return [
|
48 |
+
'name' => $this->option->get_name(),
|
49 |
+
'type' => $option_type,
|
50 |
+
'label' => $this->option->get_label(),
|
51 |
+
'notice_lines' => $this->option->get_notice_lines(),
|
52 |
+
'info' => $this->option->get_info(),
|
53 |
+
'values' => $values,
|
54 |
+
'disabled' => $disabled_values ?: [],
|
55 |
+
'value' => ( $value !== null ) ? $value : $this->option->get_default_value( $settings ),
|
56 |
];
|
57 |
}
|
58 |
|
src/Settings/Option/OptionInterface.php
CHANGED
@@ -35,6 +35,11 @@ interface OptionInterface {
|
|
35 |
*/
|
36 |
public function get_label(): string;
|
37 |
|
|
|
|
|
|
|
|
|
|
|
38 |
/**
|
39 |
* Returns additional information of field.
|
40 |
*
|
35 |
*/
|
36 |
public function get_label(): string;
|
37 |
|
38 |
+
/**
|
39 |
+
* @return string[]|null
|
40 |
+
*/
|
41 |
+
public function get_notice_lines();
|
42 |
+
|
43 |
/**
|
44 |
* Returns additional information of field.
|
45 |
*
|
src/Settings/Option/OptionsAggregator.php
CHANGED
@@ -15,12 +15,14 @@ class OptionsAggregator {
|
|
15 |
private $options = [];
|
16 |
|
17 |
public function __construct() {
|
18 |
-
$
|
|
|
19 |
$this->set_option( new SupportedExtensionsOption() );
|
20 |
$this->set_option( new SupportedDirectoriesOption() );
|
21 |
-
$this->set_option( new
|
22 |
-
$this->set_option(
|
23 |
$this->set_option( new ImagesQualityOption() );
|
|
|
24 |
$this->set_option( new ExtraFeaturesOption() );
|
25 |
}
|
26 |
|
@@ -39,6 +41,23 @@ class OptionsAggregator {
|
|
39 |
return $options;
|
40 |
}
|
41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
/**
|
43 |
* @param OptionInterface $new_option .
|
44 |
*
|
15 |
private $options = [];
|
16 |
|
17 |
public function __construct() {
|
18 |
+
$conversion_method = new ConversionMethodOption();
|
19 |
+
|
20 |
$this->set_option( new SupportedExtensionsOption() );
|
21 |
$this->set_option( new SupportedDirectoriesOption() );
|
22 |
+
$this->set_option( new OutputFormatsOption( $conversion_method ) );
|
23 |
+
$this->set_option( $conversion_method );
|
24 |
$this->set_option( new ImagesQualityOption() );
|
25 |
+
$this->set_option( new LoaderTypeOption() );
|
26 |
$this->set_option( new ExtraFeaturesOption() );
|
27 |
}
|
28 |
|
41 |
return $options;
|
42 |
}
|
43 |
|
44 |
+
/**
|
45 |
+
* @param string $option_name .
|
46 |
+
*
|
47 |
+
* @return OptionInterface|null
|
48 |
+
*/
|
49 |
+
public function get_option( string $option_name ) {
|
50 |
+
$options = $this->get_options();
|
51 |
+
|
52 |
+
foreach ( $options as $option ) {
|
53 |
+
if ( $option->get_name() === $option_name ) {
|
54 |
+
return $option;
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
+
return null;
|
59 |
+
}
|
60 |
+
|
61 |
/**
|
62 |
* @param OptionInterface $new_option .
|
63 |
*
|
src/Settings/Option/OutputFormatsOption.php
CHANGED
@@ -12,6 +12,11 @@ class OutputFormatsOption extends OptionAbstract {
|
|
12 |
|
13 |
const OPTION_NAME = 'output_formats';
|
14 |
|
|
|
|
|
|
|
|
|
|
|
15 |
/**
|
16 |
* Object of integration class supports all conversion methods.
|
17 |
*
|
@@ -19,15 +24,16 @@ class OutputFormatsOption extends OptionAbstract {
|
|
19 |
*/
|
20 |
private $formats_integration;
|
21 |
|
22 |
-
public function __construct() {
|
23 |
-
$this->
|
|
|
24 |
}
|
25 |
|
26 |
/**
|
27 |
* {@inheritdoc}
|
28 |
*/
|
29 |
public function get_priority(): int {
|
30 |
-
return
|
31 |
}
|
32 |
|
33 |
/**
|
@@ -66,7 +72,9 @@ class OutputFormatsOption extends OptionAbstract {
|
|
66 |
* @return string[]
|
67 |
*/
|
68 |
public function get_default_value( array $settings = null ): array {
|
69 |
-
$method = $settings[ ConversionMethodOption::OPTION_NAME ]
|
|
|
|
|
70 |
$formats = array_keys( $this->formats_integration->get_available_formats( $method ) );
|
71 |
|
72 |
return ( in_array( WebpFormat::FORMAT_EXTENSION, $formats ) ) ? [ WebpFormat::FORMAT_EXTENSION ] : [];
|
@@ -78,9 +86,12 @@ class OutputFormatsOption extends OptionAbstract {
|
|
78 |
* @return string[]
|
79 |
*/
|
80 |
public function get_disabled_values( array $settings ): array {
|
81 |
-
$method = $settings[ ConversionMethodOption::OPTION_NAME ]
|
|
|
|
|
82 |
$formats = $this->formats_integration->get_formats();
|
83 |
$formats_available = $this->formats_integration->get_available_formats( $method );
|
|
|
84 |
return array_keys( array_diff( $formats, $formats_available ) );
|
85 |
}
|
86 |
}
|
12 |
|
13 |
const OPTION_NAME = 'output_formats';
|
14 |
|
15 |
+
/**
|
16 |
+
* @var ConversionMethodOption
|
17 |
+
*/
|
18 |
+
private $conversion_method_option;
|
19 |
+
|
20 |
/**
|
21 |
* Object of integration class supports all conversion methods.
|
22 |
*
|
24 |
*/
|
25 |
private $formats_integration;
|
26 |
|
27 |
+
public function __construct( ConversionMethodOption $conversion_method_option ) {
|
28 |
+
$this->conversion_method_option = $conversion_method_option;
|
29 |
+
$this->formats_integration = new FormatFactory();
|
30 |
}
|
31 |
|
32 |
/**
|
33 |
* {@inheritdoc}
|
34 |
*/
|
35 |
public function get_priority(): int {
|
36 |
+
return 30;
|
37 |
}
|
38 |
|
39 |
/**
|
72 |
* @return string[]
|
73 |
*/
|
74 |
public function get_default_value( array $settings = null ): array {
|
75 |
+
$method = ( isset( $settings[ ConversionMethodOption::OPTION_NAME ] ) && $settings[ ConversionMethodOption::OPTION_NAME ] )
|
76 |
+
? $settings[ ConversionMethodOption::OPTION_NAME ]
|
77 |
+
: $this->conversion_method_option->get_default_value( $settings );
|
78 |
$formats = array_keys( $this->formats_integration->get_available_formats( $method ) );
|
79 |
|
80 |
return ( in_array( WebpFormat::FORMAT_EXTENSION, $formats ) ) ? [ WebpFormat::FORMAT_EXTENSION ] : [];
|
86 |
* @return string[]
|
87 |
*/
|
88 |
public function get_disabled_values( array $settings ): array {
|
89 |
+
$method = ( isset( $settings[ ConversionMethodOption::OPTION_NAME ] ) && $settings[ ConversionMethodOption::OPTION_NAME ] )
|
90 |
+
? $settings[ ConversionMethodOption::OPTION_NAME ]
|
91 |
+
: $this->conversion_method_option->get_default_value( $settings );
|
92 |
$formats = $this->formats_integration->get_formats();
|
93 |
$formats_available = $this->formats_integration->get_available_formats( $method );
|
94 |
+
|
95 |
return array_keys( array_diff( $formats, $formats_available ) );
|
96 |
}
|
97 |
}
|
src/Settings/Option/SupportedDirectoriesOption.php
CHANGED
@@ -15,7 +15,7 @@ class SupportedDirectoriesOption extends OptionAbstract {
|
|
15 |
* {@inheritdoc}
|
16 |
*/
|
17 |
public function get_priority(): int {
|
18 |
-
return
|
19 |
}
|
20 |
|
21 |
/**
|
15 |
* {@inheritdoc}
|
16 |
*/
|
17 |
public function get_priority(): int {
|
18 |
+
return 20;
|
19 |
}
|
20 |
|
21 |
/**
|
src/Settings/Option/SupportedExtensionsOption.php
CHANGED
@@ -13,7 +13,7 @@ class SupportedExtensionsOption extends OptionAbstract {
|
|
13 |
* {@inheritdoc}
|
14 |
*/
|
15 |
public function get_priority(): int {
|
16 |
-
return
|
17 |
}
|
18 |
|
19 |
/**
|
13 |
* {@inheritdoc}
|
14 |
*/
|
15 |
public function get_priority(): int {
|
16 |
+
return 10;
|
17 |
}
|
18 |
|
19 |
/**
|
src/Settings/Page/DebugPage.php
CHANGED
@@ -4,11 +4,11 @@
|
|
4 |
namespace WebpConverter\Settings\Page;
|
5 |
|
6 |
use WebpConverter\Error\Detector\RewritesErrorsDetector;
|
7 |
-
use WebpConverter\Helper\FileLoader;
|
8 |
-
use WebpConverter\Helper\ViewLoader;
|
9 |
use WebpConverter\Loader\LoaderAbstract;
|
10 |
use WebpConverter\PluginData;
|
11 |
use WebpConverter\PluginInfo;
|
|
|
|
|
12 |
use WebpConverter\Settings\SettingsSave;
|
13 |
|
14 |
/**
|
4 |
namespace WebpConverter\Settings\Page;
|
5 |
|
6 |
use WebpConverter\Error\Detector\RewritesErrorsDetector;
|
|
|
|
|
7 |
use WebpConverter\Loader\LoaderAbstract;
|
8 |
use WebpConverter\PluginData;
|
9 |
use WebpConverter\PluginInfo;
|
10 |
+
use WebpConverter\Service\FileLoader;
|
11 |
+
use WebpConverter\Service\ViewLoader;
|
12 |
use WebpConverter\Settings\SettingsSave;
|
13 |
|
14 |
/**
|
src/Settings/Page/SettingsPage.php
CHANGED
@@ -5,10 +5,10 @@ namespace WebpConverter\Settings\Page;
|
|
5 |
|
6 |
use WebpConverter\Conversion\Endpoint\PathsEndpoint;
|
7 |
use WebpConverter\Conversion\Endpoint\RegenerateEndpoint;
|
8 |
-
use WebpConverter\Helper\ViewLoader;
|
9 |
use WebpConverter\Loader\LoaderAbstract;
|
10 |
use WebpConverter\PluginData;
|
11 |
use WebpConverter\PluginInfo;
|
|
|
12 |
use WebpConverter\Settings\PluginOptions;
|
13 |
use WebpConverter\Settings\SettingsSave;
|
14 |
|
@@ -29,7 +29,10 @@ class SettingsPage extends PageAbstract {
|
|
29 |
*/
|
30 |
private $plugin_data;
|
31 |
|
32 |
-
public function __construct(
|
|
|
|
|
|
|
33 |
$this->plugin_info = $plugin_info;
|
34 |
$this->plugin_data = $plugin_data;
|
35 |
}
|
5 |
|
6 |
use WebpConverter\Conversion\Endpoint\PathsEndpoint;
|
7 |
use WebpConverter\Conversion\Endpoint\RegenerateEndpoint;
|
|
|
8 |
use WebpConverter\Loader\LoaderAbstract;
|
9 |
use WebpConverter\PluginData;
|
10 |
use WebpConverter\PluginInfo;
|
11 |
+
use WebpConverter\Service\ViewLoader;
|
12 |
use WebpConverter\Settings\PluginOptions;
|
13 |
use WebpConverter\Settings\SettingsSave;
|
14 |
|
29 |
*/
|
30 |
private $plugin_data;
|
31 |
|
32 |
+
public function __construct(
|
33 |
+
PluginInfo $plugin_info,
|
34 |
+
PluginData $plugin_data
|
35 |
+
) {
|
36 |
$this->plugin_info = $plugin_info;
|
37 |
$this->plugin_data = $plugin_data;
|
38 |
}
|
src/Settings/PluginOptions.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
namespace WebpConverter\Settings;
|
4 |
|
5 |
-
use WebpConverter\
|
6 |
use WebpConverter\Settings\Option\OptionIntegration;
|
7 |
use WebpConverter\Settings\Option\OptionsAggregator;
|
8 |
|
@@ -30,7 +30,7 @@ class PluginOptions {
|
|
30 |
*/
|
31 |
public function get_options( bool $is_debug = false, array $posted_settings = null ): array {
|
32 |
$is_save = ( $posted_settings !== null );
|
33 |
-
$settings = ( $is_save ) ? $posted_settings :
|
34 |
|
35 |
$options = [];
|
36 |
foreach ( $this->options_aggregator->get_options() as $option_object ) {
|
2 |
|
3 |
namespace WebpConverter\Settings;
|
4 |
|
5 |
+
use WebpConverter\Service\OptionsAccessManager;
|
6 |
use WebpConverter\Settings\Option\OptionIntegration;
|
7 |
use WebpConverter\Settings\Option\OptionsAggregator;
|
8 |
|
30 |
*/
|
31 |
public function get_options( bool $is_debug = false, array $posted_settings = null ): array {
|
32 |
$is_save = ( $posted_settings !== null );
|
33 |
+
$settings = ( $is_save ) ? $posted_settings : OptionsAccessManager::get_option( SettingsSave::SETTINGS_OPTION, [] );
|
34 |
|
35 |
$options = [];
|
36 |
foreach ( $this->options_aggregator->get_options() as $option_object ) {
|
src/Settings/SettingsSave.php
CHANGED
@@ -4,9 +4,9 @@ namespace WebpConverter\Settings;
|
|
4 |
|
5 |
use WebpConverter\Conversion\Cron\Event;
|
6 |
use WebpConverter\Conversion\Directory\DirectoryFactory;
|
7 |
-
use WebpConverter\Helper\OptionsAccess;
|
8 |
use WebpConverter\Loader\LoaderAbstract;
|
9 |
use WebpConverter\PluginData;
|
|
|
10 |
use WebpConverter\Settings\Option\SupportedDirectoriesOption;
|
11 |
|
12 |
/**
|
@@ -14,6 +14,11 @@ use WebpConverter\Settings\Option\SupportedDirectoriesOption;
|
|
14 |
*/
|
15 |
class SettingsSave {
|
16 |
|
|
|
|
|
|
|
|
|
|
|
17 |
/**
|
18 |
* @var PluginData
|
19 |
*/
|
@@ -23,11 +28,6 @@ class SettingsSave {
|
|
23 |
$this->plugin_data = $plugin_data;
|
24 |
}
|
25 |
|
26 |
-
const SETTINGS_OPTION = 'webpc_settings';
|
27 |
-
const SUBMIT_VALUE = 'webpc_save';
|
28 |
-
const NONCE_PARAM_KEY = '_wpnonce';
|
29 |
-
const NONCE_PARAM_VALUE = 'webpc-save';
|
30 |
-
|
31 |
/**
|
32 |
* Saves plugin settings after submitting form on plugin settings page.
|
33 |
*
|
@@ -40,7 +40,13 @@ class SettingsSave {
|
|
40 |
return;
|
41 |
}
|
42 |
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
$this->plugin_data->invalidate_plugin_settings();
|
45 |
$this->init_actions_after_save();
|
46 |
}
|
4 |
|
5 |
use WebpConverter\Conversion\Cron\Event;
|
6 |
use WebpConverter\Conversion\Directory\DirectoryFactory;
|
|
|
7 |
use WebpConverter\Loader\LoaderAbstract;
|
8 |
use WebpConverter\PluginData;
|
9 |
+
use WebpConverter\Service\OptionsAccessManager;
|
10 |
use WebpConverter\Settings\Option\SupportedDirectoriesOption;
|
11 |
|
12 |
/**
|
14 |
*/
|
15 |
class SettingsSave {
|
16 |
|
17 |
+
const SETTINGS_OPTION = 'webpc_settings';
|
18 |
+
const SUBMIT_VALUE = 'webpc_save';
|
19 |
+
const NONCE_PARAM_KEY = '_wpnonce';
|
20 |
+
const NONCE_PARAM_VALUE = 'webpc-save';
|
21 |
+
|
22 |
/**
|
23 |
* @var PluginData
|
24 |
*/
|
28 |
$this->plugin_data = $plugin_data;
|
29 |
}
|
30 |
|
|
|
|
|
|
|
|
|
|
|
31 |
/**
|
32 |
* Saves plugin settings after submitting form on plugin settings page.
|
33 |
*
|
40 |
return;
|
41 |
}
|
42 |
|
43 |
+
if ( isset( $_POST[ self::SUBMIT_VALUE ] ) ) {
|
44 |
+
$plugin_settings = ( new PluginOptions() )->get_values( false, $_POST );
|
45 |
+
} else {
|
46 |
+
$plugin_settings = $this->plugin_data->get_plugin_settings();
|
47 |
+
}
|
48 |
+
|
49 |
+
OptionsAccessManager::update_option( self::SETTINGS_OPTION, $plugin_settings );
|
50 |
$this->plugin_data->invalidate_plugin_settings();
|
51 |
$this->init_actions_after_save();
|
52 |
}
|
templates/components/widgets/options.php
CHANGED
@@ -16,8 +16,21 @@
|
|
16 |
<div class="webpContent">
|
17 |
<?php foreach ( $options as $index => $option ) : ?>
|
18 |
<div class="webpPage__widgetRow">
|
19 |
-
<
|
20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
</div>
|
22 |
<?php endforeach; ?>
|
23 |
<div class="webpPage__widgetRow">
|
16 |
<div class="webpContent">
|
17 |
<?php foreach ( $options as $index => $option ) : ?>
|
18 |
<div class="webpPage__widgetRow">
|
19 |
+
<ul class="webpPage__widgetColumns">
|
20 |
+
<li class="webpPage__widgetColumn">
|
21 |
+
<h4><?php echo esc_html( $option['label'] ); ?></h4>
|
22 |
+
<?php include dirname( __DIR__ ) . '/fields/' . $option['type'] . '.php'; ?>
|
23 |
+
</li>
|
24 |
+
<?php if ( $option['notice_lines'] ) : ?>
|
25 |
+
<li class="webpPage__widgetColumn">
|
26 |
+
<div class="webpPage__widgetColumnNotice">
|
27 |
+
<?php foreach ( $option['notice_lines'] as $line ) : ?>
|
28 |
+
<p><?php echo wp_kses_post( $line ); ?></p>
|
29 |
+
<?php endforeach; ?>
|
30 |
+
</div>
|
31 |
+
</li>
|
32 |
+
<?php endif; ?>
|
33 |
+
</ul>
|
34 |
</div>
|
35 |
<?php endforeach; ?>
|
36 |
<div class="webpPage__widgetRow">
|
templates/components/widgets/regenerate.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
<div class="webpLoader webpContent"
|
16 |
data-api-paths="<?php echo esc_url( $api_paths_url ); ?>"
|
17 |
data-api-regenerate="<?php echo esc_url( $api_regenerate_url ); ?>"
|
18 |
-
data-api-error-message="<?php echo
|
19 |
>
|
20 |
<div class="webpPage__widgetRow">
|
21 |
<p>
|
15 |
<div class="webpLoader webpContent"
|
16 |
data-api-paths="<?php echo esc_url( $api_paths_url ); ?>"
|
17 |
data-api-regenerate="<?php echo esc_url( $api_regenerate_url ); ?>"
|
18 |
+
data-api-error-message="<?php echo esc_html( __( 'An error occurred while connecting to REST API. Please try again.', 'webp-converter-for-media' ) ); ?>"
|
19 |
>
|
20 |
<div class="webpPage__widgetRow">
|
21 |
<p>
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit37614692d30f246008194d111fcdb36b::getLoader();
|
vendor/composer/autoload_classmap.php
CHANGED
@@ -66,7 +66,6 @@ return array(
|
|
66 |
'WebpConverter\\Conversion\\SkipLarger' => $baseDir . '/src/Conversion/SkipLarger.php',
|
67 |
'WebpConverter\\Error\\Detector\\ErrorDetector' => $baseDir . '/src/Error/Detector/ErrorDetector.php',
|
68 |
'WebpConverter\\Error\\Detector\\LibsNotInstalledDetector' => $baseDir . '/src/Error/Detector/LibsNotInstalledDetector.php',
|
69 |
-
'WebpConverter\\Error\\Detector\\LibsWithoutAvifSupportDetector' => $baseDir . '/src/Error/Detector/LibsWithoutAvifSupportDetector.php',
|
70 |
'WebpConverter\\Error\\Detector\\LibsWithoutWebpSupportDetector' => $baseDir . '/src/Error/Detector/LibsWithoutWebpSupportDetector.php',
|
71 |
'WebpConverter\\Error\\Detector\\PassthruExecutionDetector' => $baseDir . '/src/Error/Detector/PassthruExecutionDetector.php',
|
72 |
'WebpConverter\\Error\\Detector\\PathsErrorsDetector' => $baseDir . '/src/Error/Detector/PathsErrorsDetector.php',
|
@@ -77,7 +76,6 @@ return array(
|
|
77 |
'WebpConverter\\Error\\Notice\\BypassingApacheNotice' => $baseDir . '/src/Error/Notice/BypassingApacheNotice.php',
|
78 |
'WebpConverter\\Error\\Notice\\ErrorNotice' => $baseDir . '/src/Error/Notice/ErrorNotice.php',
|
79 |
'WebpConverter\\Error\\Notice\\LibsNotInstalledNotice' => $baseDir . '/src/Error/Notice/LibsNotInstalledNotice.php',
|
80 |
-
'WebpConverter\\Error\\Notice\\LibsWithoutAvifSupportNotice' => $baseDir . '/src/Error/Notice/LibsWithoutAvifSupportNotice.php',
|
81 |
'WebpConverter\\Error\\Notice\\LibsWithoutWebpSupportNotice' => $baseDir . '/src/Error/Notice/LibsWithoutWebpSupportNotice.php',
|
82 |
'WebpConverter\\Error\\Notice\\PassthruExecutionNotice' => $baseDir . '/src/Error/Notice/PassthruExecutionNotice.php',
|
83 |
'WebpConverter\\Error\\Notice\\PassthruNotWorkingNotice' => $baseDir . '/src/Error/Notice/PassthruNotWorkingNotice.php',
|
@@ -90,9 +88,6 @@ return array(
|
|
90 |
'WebpConverter\\Error\\Notice\\RewritesNotExecutedNotice' => $baseDir . '/src/Error/Notice/RewritesNotExecutedNotice.php',
|
91 |
'WebpConverter\\Error\\Notice\\RewritesNotWorkingNotice' => $baseDir . '/src/Error/Notice/RewritesNotWorkingNotice.php',
|
92 |
'WebpConverter\\Error\\Notice\\SettingsIncorrectNotice' => $baseDir . '/src/Error/Notice/SettingsIncorrectNotice.php',
|
93 |
-
'WebpConverter\\Helper\\FileLoader' => $baseDir . '/src/Helper/FileLoader.php',
|
94 |
-
'WebpConverter\\Helper\\OptionsAccess' => $baseDir . '/src/Helper/OptionsAccess.php',
|
95 |
-
'WebpConverter\\Helper\\ViewLoader' => $baseDir . '/src/Helper/ViewLoader.php',
|
96 |
'WebpConverter\\HookableInterface' => $baseDir . '/src/HookableInterface.php',
|
97 |
'WebpConverter\\Loader\\HtaccessLoader' => $baseDir . '/src/Loader/HtaccessLoader.php',
|
98 |
'WebpConverter\\Loader\\LoaderAbstract' => $baseDir . '/src/Loader/LoaderAbstract.php',
|
@@ -122,6 +117,9 @@ return array(
|
|
122 |
'WebpConverter\\Plugin\\Uninstall\\PluginSettings' => $baseDir . '/src/Plugin/Uninstall/PluginSettings.php',
|
123 |
'WebpConverter\\Plugin\\Uninstall\\WebpFiles' => $baseDir . '/src/Plugin/Uninstall/WebpFiles.php',
|
124 |
'WebpConverter\\Plugin\\Update' => $baseDir . '/src/Plugin/Update.php',
|
|
|
|
|
|
|
125 |
'WebpConverter\\Settings\\AdminAssets' => $baseDir . '/src/Settings/AdminAssets.php',
|
126 |
'WebpConverter\\Settings\\Option\\ConversionMethodOption' => $baseDir . '/src/Settings/Option/ConversionMethodOption.php',
|
127 |
'WebpConverter\\Settings\\Option\\ExtraFeaturesOption' => $baseDir . '/src/Settings/Option/ExtraFeaturesOption.php',
|
66 |
'WebpConverter\\Conversion\\SkipLarger' => $baseDir . '/src/Conversion/SkipLarger.php',
|
67 |
'WebpConverter\\Error\\Detector\\ErrorDetector' => $baseDir . '/src/Error/Detector/ErrorDetector.php',
|
68 |
'WebpConverter\\Error\\Detector\\LibsNotInstalledDetector' => $baseDir . '/src/Error/Detector/LibsNotInstalledDetector.php',
|
|
|
69 |
'WebpConverter\\Error\\Detector\\LibsWithoutWebpSupportDetector' => $baseDir . '/src/Error/Detector/LibsWithoutWebpSupportDetector.php',
|
70 |
'WebpConverter\\Error\\Detector\\PassthruExecutionDetector' => $baseDir . '/src/Error/Detector/PassthruExecutionDetector.php',
|
71 |
'WebpConverter\\Error\\Detector\\PathsErrorsDetector' => $baseDir . '/src/Error/Detector/PathsErrorsDetector.php',
|
76 |
'WebpConverter\\Error\\Notice\\BypassingApacheNotice' => $baseDir . '/src/Error/Notice/BypassingApacheNotice.php',
|
77 |
'WebpConverter\\Error\\Notice\\ErrorNotice' => $baseDir . '/src/Error/Notice/ErrorNotice.php',
|
78 |
'WebpConverter\\Error\\Notice\\LibsNotInstalledNotice' => $baseDir . '/src/Error/Notice/LibsNotInstalledNotice.php',
|
|
|
79 |
'WebpConverter\\Error\\Notice\\LibsWithoutWebpSupportNotice' => $baseDir . '/src/Error/Notice/LibsWithoutWebpSupportNotice.php',
|
80 |
'WebpConverter\\Error\\Notice\\PassthruExecutionNotice' => $baseDir . '/src/Error/Notice/PassthruExecutionNotice.php',
|
81 |
'WebpConverter\\Error\\Notice\\PassthruNotWorkingNotice' => $baseDir . '/src/Error/Notice/PassthruNotWorkingNotice.php',
|
88 |
'WebpConverter\\Error\\Notice\\RewritesNotExecutedNotice' => $baseDir . '/src/Error/Notice/RewritesNotExecutedNotice.php',
|
89 |
'WebpConverter\\Error\\Notice\\RewritesNotWorkingNotice' => $baseDir . '/src/Error/Notice/RewritesNotWorkingNotice.php',
|
90 |
'WebpConverter\\Error\\Notice\\SettingsIncorrectNotice' => $baseDir . '/src/Error/Notice/SettingsIncorrectNotice.php',
|
|
|
|
|
|
|
91 |
'WebpConverter\\HookableInterface' => $baseDir . '/src/HookableInterface.php',
|
92 |
'WebpConverter\\Loader\\HtaccessLoader' => $baseDir . '/src/Loader/HtaccessLoader.php',
|
93 |
'WebpConverter\\Loader\\LoaderAbstract' => $baseDir . '/src/Loader/LoaderAbstract.php',
|
117 |
'WebpConverter\\Plugin\\Uninstall\\PluginSettings' => $baseDir . '/src/Plugin/Uninstall/PluginSettings.php',
|
118 |
'WebpConverter\\Plugin\\Uninstall\\WebpFiles' => $baseDir . '/src/Plugin/Uninstall/WebpFiles.php',
|
119 |
'WebpConverter\\Plugin\\Update' => $baseDir . '/src/Plugin/Update.php',
|
120 |
+
'WebpConverter\\Service\\FileLoader' => $baseDir . '/src/Service/FileLoader.php',
|
121 |
+
'WebpConverter\\Service\\OptionsAccessManager' => $baseDir . '/src/Service/OptionsAccessManager.php',
|
122 |
+
'WebpConverter\\Service\\ViewLoader' => $baseDir . '/src/Service/ViewLoader.php',
|
123 |
'WebpConverter\\Settings\\AdminAssets' => $baseDir . '/src/Settings/AdminAssets.php',
|
124 |
'WebpConverter\\Settings\\Option\\ConversionMethodOption' => $baseDir . '/src/Settings/Option/ConversionMethodOption.php',
|
125 |
'WebpConverter\\Settings\\Option\\ExtraFeaturesOption' => $baseDir . '/src/Settings/Option/ExtraFeaturesOption.php',
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit2030f27ad23da16097b04d49bce16e0c
|
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
-
spl_autoload_register(array('
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
27 |
-
spl_autoload_unregister(array('
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
-
call_user_func(\Composer\Autoload\
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit37614692d30f246008194d111fcdb36b
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
spl_autoload_register(array('ComposerAutoloaderInit37614692d30f246008194d111fcdb36b', 'loadClassLoader'), true, true);
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit37614692d30f246008194d111fcdb36b', 'loadClassLoader'));
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit37614692d30f246008194d111fcdb36b::getInitializer($loader));
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'W' =>
|
@@ -81,7 +81,6 @@ class ComposerStaticInit2030f27ad23da16097b04d49bce16e0c
|
|
81 |
'WebpConverter\\Conversion\\SkipLarger' => __DIR__ . '/../..' . '/src/Conversion/SkipLarger.php',
|
82 |
'WebpConverter\\Error\\Detector\\ErrorDetector' => __DIR__ . '/../..' . '/src/Error/Detector/ErrorDetector.php',
|
83 |
'WebpConverter\\Error\\Detector\\LibsNotInstalledDetector' => __DIR__ . '/../..' . '/src/Error/Detector/LibsNotInstalledDetector.php',
|
84 |
-
'WebpConverter\\Error\\Detector\\LibsWithoutAvifSupportDetector' => __DIR__ . '/../..' . '/src/Error/Detector/LibsWithoutAvifSupportDetector.php',
|
85 |
'WebpConverter\\Error\\Detector\\LibsWithoutWebpSupportDetector' => __DIR__ . '/../..' . '/src/Error/Detector/LibsWithoutWebpSupportDetector.php',
|
86 |
'WebpConverter\\Error\\Detector\\PassthruExecutionDetector' => __DIR__ . '/../..' . '/src/Error/Detector/PassthruExecutionDetector.php',
|
87 |
'WebpConverter\\Error\\Detector\\PathsErrorsDetector' => __DIR__ . '/../..' . '/src/Error/Detector/PathsErrorsDetector.php',
|
@@ -92,7 +91,6 @@ class ComposerStaticInit2030f27ad23da16097b04d49bce16e0c
|
|
92 |
'WebpConverter\\Error\\Notice\\BypassingApacheNotice' => __DIR__ . '/../..' . '/src/Error/Notice/BypassingApacheNotice.php',
|
93 |
'WebpConverter\\Error\\Notice\\ErrorNotice' => __DIR__ . '/../..' . '/src/Error/Notice/ErrorNotice.php',
|
94 |
'WebpConverter\\Error\\Notice\\LibsNotInstalledNotice' => __DIR__ . '/../..' . '/src/Error/Notice/LibsNotInstalledNotice.php',
|
95 |
-
'WebpConverter\\Error\\Notice\\LibsWithoutAvifSupportNotice' => __DIR__ . '/../..' . '/src/Error/Notice/LibsWithoutAvifSupportNotice.php',
|
96 |
'WebpConverter\\Error\\Notice\\LibsWithoutWebpSupportNotice' => __DIR__ . '/../..' . '/src/Error/Notice/LibsWithoutWebpSupportNotice.php',
|
97 |
'WebpConverter\\Error\\Notice\\PassthruExecutionNotice' => __DIR__ . '/../..' . '/src/Error/Notice/PassthruExecutionNotice.php',
|
98 |
'WebpConverter\\Error\\Notice\\PassthruNotWorkingNotice' => __DIR__ . '/../..' . '/src/Error/Notice/PassthruNotWorkingNotice.php',
|
@@ -105,9 +103,6 @@ class ComposerStaticInit2030f27ad23da16097b04d49bce16e0c
|
|
105 |
'WebpConverter\\Error\\Notice\\RewritesNotExecutedNotice' => __DIR__ . '/../..' . '/src/Error/Notice/RewritesNotExecutedNotice.php',
|
106 |
'WebpConverter\\Error\\Notice\\RewritesNotWorkingNotice' => __DIR__ . '/../..' . '/src/Error/Notice/RewritesNotWorkingNotice.php',
|
107 |
'WebpConverter\\Error\\Notice\\SettingsIncorrectNotice' => __DIR__ . '/../..' . '/src/Error/Notice/SettingsIncorrectNotice.php',
|
108 |
-
'WebpConverter\\Helper\\FileLoader' => __DIR__ . '/../..' . '/src/Helper/FileLoader.php',
|
109 |
-
'WebpConverter\\Helper\\OptionsAccess' => __DIR__ . '/../..' . '/src/Helper/OptionsAccess.php',
|
110 |
-
'WebpConverter\\Helper\\ViewLoader' => __DIR__ . '/../..' . '/src/Helper/ViewLoader.php',
|
111 |
'WebpConverter\\HookableInterface' => __DIR__ . '/../..' . '/src/HookableInterface.php',
|
112 |
'WebpConverter\\Loader\\HtaccessLoader' => __DIR__ . '/../..' . '/src/Loader/HtaccessLoader.php',
|
113 |
'WebpConverter\\Loader\\LoaderAbstract' => __DIR__ . '/../..' . '/src/Loader/LoaderAbstract.php',
|
@@ -137,6 +132,9 @@ class ComposerStaticInit2030f27ad23da16097b04d49bce16e0c
|
|
137 |
'WebpConverter\\Plugin\\Uninstall\\PluginSettings' => __DIR__ . '/../..' . '/src/Plugin/Uninstall/PluginSettings.php',
|
138 |
'WebpConverter\\Plugin\\Uninstall\\WebpFiles' => __DIR__ . '/../..' . '/src/Plugin/Uninstall/WebpFiles.php',
|
139 |
'WebpConverter\\Plugin\\Update' => __DIR__ . '/../..' . '/src/Plugin/Update.php',
|
|
|
|
|
|
|
140 |
'WebpConverter\\Settings\\AdminAssets' => __DIR__ . '/../..' . '/src/Settings/AdminAssets.php',
|
141 |
'WebpConverter\\Settings\\Option\\ConversionMethodOption' => __DIR__ . '/../..' . '/src/Settings/Option/ConversionMethodOption.php',
|
142 |
'WebpConverter\\Settings\\Option\\ExtraFeaturesOption' => __DIR__ . '/../..' . '/src/Settings/Option/ExtraFeaturesOption.php',
|
@@ -162,9 +160,9 @@ class ComposerStaticInit2030f27ad23da16097b04d49bce16e0c
|
|
162 |
public static function getInitializer(ClassLoader $loader)
|
163 |
{
|
164 |
return \Closure::bind(function () use ($loader) {
|
165 |
-
$loader->prefixLengthsPsr4 =
|
166 |
-
$loader->prefixDirsPsr4 =
|
167 |
-
$loader->classMap =
|
168 |
|
169 |
}, null, ClassLoader::class);
|
170 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit37614692d30f246008194d111fcdb36b
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'W' =>
|
81 |
'WebpConverter\\Conversion\\SkipLarger' => __DIR__ . '/../..' . '/src/Conversion/SkipLarger.php',
|
82 |
'WebpConverter\\Error\\Detector\\ErrorDetector' => __DIR__ . '/../..' . '/src/Error/Detector/ErrorDetector.php',
|
83 |
'WebpConverter\\Error\\Detector\\LibsNotInstalledDetector' => __DIR__ . '/../..' . '/src/Error/Detector/LibsNotInstalledDetector.php',
|
|
|
84 |
'WebpConverter\\Error\\Detector\\LibsWithoutWebpSupportDetector' => __DIR__ . '/../..' . '/src/Error/Detector/LibsWithoutWebpSupportDetector.php',
|
85 |
'WebpConverter\\Error\\Detector\\PassthruExecutionDetector' => __DIR__ . '/../..' . '/src/Error/Detector/PassthruExecutionDetector.php',
|
86 |
'WebpConverter\\Error\\Detector\\PathsErrorsDetector' => __DIR__ . '/../..' . '/src/Error/Detector/PathsErrorsDetector.php',
|
91 |
'WebpConverter\\Error\\Notice\\BypassingApacheNotice' => __DIR__ . '/../..' . '/src/Error/Notice/BypassingApacheNotice.php',
|
92 |
'WebpConverter\\Error\\Notice\\ErrorNotice' => __DIR__ . '/../..' . '/src/Error/Notice/ErrorNotice.php',
|
93 |
'WebpConverter\\Error\\Notice\\LibsNotInstalledNotice' => __DIR__ . '/../..' . '/src/Error/Notice/LibsNotInstalledNotice.php',
|
|
|
94 |
'WebpConverter\\Error\\Notice\\LibsWithoutWebpSupportNotice' => __DIR__ . '/../..' . '/src/Error/Notice/LibsWithoutWebpSupportNotice.php',
|
95 |
'WebpConverter\\Error\\Notice\\PassthruExecutionNotice' => __DIR__ . '/../..' . '/src/Error/Notice/PassthruExecutionNotice.php',
|
96 |
'WebpConverter\\Error\\Notice\\PassthruNotWorkingNotice' => __DIR__ . '/../..' . '/src/Error/Notice/PassthruNotWorkingNotice.php',
|
103 |
'WebpConverter\\Error\\Notice\\RewritesNotExecutedNotice' => __DIR__ . '/../..' . '/src/Error/Notice/RewritesNotExecutedNotice.php',
|
104 |
'WebpConverter\\Error\\Notice\\RewritesNotWorkingNotice' => __DIR__ . '/../..' . '/src/Error/Notice/RewritesNotWorkingNotice.php',
|
105 |
'WebpConverter\\Error\\Notice\\SettingsIncorrectNotice' => __DIR__ . '/../..' . '/src/Error/Notice/SettingsIncorrectNotice.php',
|
|
|
|
|
|
|
106 |
'WebpConverter\\HookableInterface' => __DIR__ . '/../..' . '/src/HookableInterface.php',
|
107 |
'WebpConverter\\Loader\\HtaccessLoader' => __DIR__ . '/../..' . '/src/Loader/HtaccessLoader.php',
|
108 |
'WebpConverter\\Loader\\LoaderAbstract' => __DIR__ . '/../..' . '/src/Loader/LoaderAbstract.php',
|
132 |
'WebpConverter\\Plugin\\Uninstall\\PluginSettings' => __DIR__ . '/../..' . '/src/Plugin/Uninstall/PluginSettings.php',
|
133 |
'WebpConverter\\Plugin\\Uninstall\\WebpFiles' => __DIR__ . '/../..' . '/src/Plugin/Uninstall/WebpFiles.php',
|
134 |
'WebpConverter\\Plugin\\Update' => __DIR__ . '/../..' . '/src/Plugin/Update.php',
|
135 |
+
'WebpConverter\\Service\\FileLoader' => __DIR__ . '/../..' . '/src/Service/FileLoader.php',
|
136 |
+
'WebpConverter\\Service\\OptionsAccessManager' => __DIR__ . '/../..' . '/src/Service/OptionsAccessManager.php',
|
137 |
+
'WebpConverter\\Service\\ViewLoader' => __DIR__ . '/../..' . '/src/Service/ViewLoader.php',
|
138 |
'WebpConverter\\Settings\\AdminAssets' => __DIR__ . '/../..' . '/src/Settings/AdminAssets.php',
|
139 |
'WebpConverter\\Settings\\Option\\ConversionMethodOption' => __DIR__ . '/../..' . '/src/Settings/Option/ConversionMethodOption.php',
|
140 |
'WebpConverter\\Settings\\Option\\ExtraFeaturesOption' => __DIR__ . '/../..' . '/src/Settings/Option/ExtraFeaturesOption.php',
|
160 |
public static function getInitializer(ClassLoader $loader)
|
161 |
{
|
162 |
return \Closure::bind(function () use ($loader) {
|
163 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit37614692d30f246008194d111fcdb36b::$prefixLengthsPsr4;
|
164 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit37614692d30f246008194d111fcdb36b::$prefixDirsPsr4;
|
165 |
+
$loader->classMap = ComposerStaticInit37614692d30f246008194d111fcdb36b::$classMap;
|
166 |
|
167 |
}, null, ClassLoader::class);
|
168 |
}
|
vendor/composer/installed.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
'type' => 'library',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
-
'reference' => '
|
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' => '
|
20 |
'dev_requirement' => false,
|
21 |
),
|
22 |
),
|
5 |
'type' => 'library',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
+
'reference' => '4afd37946b78dcfd632b52873ad5c796c2a10d75',
|
9 |
'name' => 'gbiorczyk/webp-converter-for-media',
|
10 |
'dev' => false,
|
11 |
),
|
16 |
'type' => 'library',
|
17 |
'install_path' => __DIR__ . '/../../',
|
18 |
'aliases' => array(),
|
19 |
+
'reference' => '4afd37946b78dcfd632b52873ad5c796c2a10d75',
|
20 |
'dev_requirement' => false,
|
21 |
),
|
22 |
),
|
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 images instead of standard formats JPEG, PNG and GIF.
|
6 |
-
* Version: 3.2.
|
7 |
* Author: Mateusz Gbiorczyk
|
8 |
* Author URI: https://gbiorczyk.pl/
|
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__, '3.2.
|
17 |
);
|
3 |
/**
|
4 |
* Plugin Name: WebP Converter for Media
|
5 |
* Description: Speed up your website by serving WebP images instead of standard formats JPEG, PNG and GIF.
|
6 |
+
* Version: 3.2.4
|
7 |
* Author: Mateusz Gbiorczyk
|
8 |
* Author URI: https://gbiorczyk.pl/
|
9 |
* Text Domain: webp-converter-for-media
|
13 |
require_once __DIR__ . '/vendor/autoload.php';
|
14 |
|
15 |
new WebpConverter\WebpConverter(
|
16 |
+
new WebpConverter\PluginInfo( __FILE__, '3.2.4' )
|
17 |
);
|