Version Description
(2022-07-15) =
* [Changed]
Plugin name from "WebP Converter to Media" to "Converter for Media"
* [Removed]
"Browser Caching for files in output formats" option in plugin settings (will be active always)
* [Removed]
"Force redirections to output formats for all domains" option in plugin settings (will be active always)
* [Fixed]
Error handling about unreadable source or output path
* [Changed]
Error message for bypassing_apache error in server configuration
* [Changed]
Error message for rewrites_not_executed error in server configuration
* [Added]
Limit of 3 attempts to image regeneration to avoid infinity loops
* [Added]
Debug information about saved plugin data
* [Added]
Notification asking to clear cache for Cloudways
* [Added]
Action webpc_after_conversion
to operation on output path after image conversion
* [Added]
Filter webpc_htaccess_mod_rewrite_inherit
to disable mod_rewrite inheritance
* [Added]
Filter webpc_htaccess_mod_rewrite_referer
to disable redirections to output formats for other domains
See changelog.txt for previous versions.
=
Release Info
Developer | mateuszgbiorczyk |
Plugin | Converter for Media – Optimize images | Convert WebP & AVIF |
Version | 4.5.0 |
Comparing to | |
See all releases |
Code changes from version 4.4.1 to 4.5.0
- assets/build/css/styles.css +1 -1
- assets/build/js/scripts.js +1 -1
- changelog.txt +14 -0
- readme.txt +14 -10
- src/Conversion/Cron/CronInitiator.php +13 -4
- src/Conversion/Cron/CronSchedulesGenerator.php +1 -1
- src/Conversion/Format/FormatFactory.php +3 -3
- src/Conversion/Method/LibraryMethodAbstract.php +1 -0
- src/Conversion/Method/MethodAbstract.php +1 -1
- src/Conversion/Method/RemoteMethod.php +22 -11
- src/Conversion/PathsFinder.php +31 -22
- src/Error/Notice/BypassingApacheNotice.php +21 -13
- src/Error/Notice/LibsWithoutWebpSupportNotice.php +7 -2
- src/Error/Notice/RewritesNotExecutedNotice.php +6 -2
- src/Loader/HtaccessLoader.php +10 -14
- src/Notice/AvifSupportNotice.php +4 -5
- src/Notice/CloudflareNotice.php +32 -5
- src/Notice/CloudwaysNotice.php +100 -0
- src/Notice/LitespeedNotice.php +17 -5
- src/Notice/NoticeInterface.php +1 -1
- src/Notice/ThanksNotice.php +5 -6
- src/Plugin/Deactivation/PluginSettings.php +2 -0
- src/Plugin/Uninstall/PluginSettings.php +2 -0
- src/Service/DeactivationModalGenerator.php +1 -1
- src/Service/FileLoader.php +5 -0
- src/Settings/Option/ExtraFeaturesOption.php +9 -39
- src/Settings/Option/OptionAbstract.php +12 -3
- src/Settings/Option/OptionIntegration.php +4 -2
- src/Settings/Option/OptionInterface.php +11 -4
- src/Settings/Option/OptionsAggregator.php +1 -1
- src/Settings/Option/OutputFormatsOption.php +1 -1
- src/Settings/Option/SupportedDirectoriesOption.php +1 -1
- src/Settings/Option/SupportedExtensionsOption.php +9 -24
- src/Settings/Page/PageIntegration.php +1 -1
- src/WebpConverter.php +1 -0
- templates/components/notices/avif-support.php +1 -1
- templates/components/notices/{litespeed.php → clear-cache.php} +8 -25
- templates/components/notices/cloudflare.php +0 -81
- templates/components/notices/thanks.php +1 -1
- templates/components/notices/welcome.php +1 -1
- templates/components/server/options.php +61 -0
- templates/components/server/wordpress.php +12 -0
- templates/components/widgets/server.php +2 -1
- templates/views/settings-debug.php +1 -1
- templates/views/settings.php +1 -1
- vendor/composer/autoload_classmap.php +1 -0
- vendor/composer/autoload_static.php +1 -0
- vendor/composer/installed.php +2 -2
- webp-converter-for-media.php +4 -4
@@ -1 +1 @@
|
|
1 |
-
@charset "UTF-8";@keyframes dotsLoading{0%,to{content:"..."}25%{content:" .."}50%{content:". ."}75%{content:".. "}}@font-face{font-family:webpc-icomoon;font-style:normal;font-weight:400;src:url(../../fonts/icons/icomoon.eot?ver=19234631);src:url(../../fonts/icons/icomoon.woff?ver=19234631) format("woff"),url(../../fonts/icons/icomoon.eot?ver=19234631#iefix) format("embedded-opentype"),url(../../fonts/icons/icomoon.ttf?ver=19234631) format("truetype"),url(../../fonts/icons/icomoon.svg?ver=19234631#icomoon) format("svg")}.icon-logo:before{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\e900"!important;font-family:webpc-icomoon!important;font-style:normal;font-variant:normal;font-weight:400;text-transform:none}.webpPage{color:#101517;margin:0;overflow:hidden;padding:0 20px 0 0}.webpPage *,.webpPage :after,.webpPage :before{box-sizing:border-box;margin:0;padding:0}.webpPage [hidden]{display:none!important}.webpPage .webpPage__headline{font-size:24px;line-height:1.2083333333;margin:0;padding:15px 0 23px}.webpPage__alert{background-color:#00a32a;color:#fff;font-size:14px;line-height:1.5714285714;margin-bottom:30px;padding:15px 20px}.webpPage__columns{margin:0 -30px;overflow:hidden}.webpPage__column{float:left;padding:0 30px}.webpPage__column--large{width:66.666%}.webpPage__column--small{width:33.333%}.webpPage__widget{background-color:#fff}.webpPage__widget+.webpPage__widget{margin-top:60px}.webpPage__widgetTitle{background-color:#2271b1;color:#fff;font-size:16px;font-weight:400;line-height:1.5;padding:14px 30px}.webpPage__widgetTitle--second{background-color:#a7aaad}.webpPage__widgetTitle--error{background-color:#d63638}.webpPage__widgetRow{padding-bottom:10px}.webpPage__widgetRow:last-child{padding-bottom:0}.webpPage__widgetRow .webpButton{margin:10px 0}.webpPage__widgetColumns{display:flex;flex-wrap:wrap;margin:0 -10px}.webpPage__widgetColumn{padding:0 10px;width:50%}.webpPage__widgetColumn:first-child:last-child{flex:1}.webpPage__widgetColumnNotice{background-color:#2271b1;margin:10px 0;padding:10px 20px}.webpPage__widgetColumnNotice p{color:#fff;font-size:1.2rem}.webpPage__widgetColumnNotice p+p{margin-top:0}.webpPage__widgetColumnNotice p a{color:inherit;font-weight:500;letter-spacing:1px;text-decoration:none;text-transform:uppercase}.webpPage__quality{border:1px solid #c3c4c7;display:flex;flex-wrap:wrap;margin:10px 0}.webpPage__qualityItem{border-left:1px solid #c3c4c7;flex:1;margin-left:-1px;text-align:center}.webpPage__qualityItemInput{display:none!important}.webpPage__qualityItemLabel{display:block;font-size:14px;line-height:1.5714285714;padding:14px 20px;position:relative;transition:color .3s,background-color .3s}.webpPage__qualityItemInput:checked+.webpPage__qualityItemLabel{background-color:#00a32a;color:#fff;margin:-1px;padding:15px 21px}.webpPage__qualityItemInput[disabled]+.webpPage__qualityItemLabel{opacity:0;pointer-events:none}#wp-admin-bar-webpc-menu .ab-icon:before{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\e900"!important;font-family:webpc-icomoon!important;font-style:normal;font-variant:normal;font-weight:400;text-transform:none}.notice[data-notice=webp-converter-for-media]{padding:0}.notice[data-notice=webp-converter-for-media]~.notice[data-notice=webp-converter-for-media]{display:none}.webpButton{background-color:#fff;border:1px solid transparent;box-shadow:none!important;box-sizing:border-box;cursor:pointer;display:inline-block;font-size:14px;font-weight:500;line-height:1.5714285714;min-width:180px;opacity:1!important;outline:none!important;padding:9px 30px;position:relative;text-align:center;text-decoration:none!important;transition:color .3s!important;z-index:10}p>.webpButton{margin:6px 0}.webpButton:before{float:left;font-family:dashicons;font-size:20px;line-height:1.1;margin-right:10px}.webpButton:after{content:"";height:100%;left:0;position:absolute;top:0;transition:width .3s;width:0;z-index:-1}.webpButton:hover:after{width:100%}.webpButton[disabled]{opacity:.5!important;pointer-events:none}.webpButton--blue:hover,.webpButton--gray:hover,.webpButton--green:hover,.webpButton--red:hover{color:#fff!important}.webpButton--blue{border-color:#2271b1;color:#2271b1!important}.webpButton--blue.webpButton--bg,.webpButton--blue:after{background-color:#2271b1}.webpButton--blue.webpButton--bg:after{background-color:#135e96}.webpButton--green{border-color:#00a32a;color:#00a32a!important}.webpButton--green.webpButton--bg,.webpButton--green:after{background-color:#00a32a}.webpButton--green.webpButton--bg:after{background-color:#008a20}.webpButton--red{border-color:#d63638;color:#d63638!important}.webpButton--red.webpButton--bg,.webpButton--red:after{background-color:#d63638}.webpButton--red.webpButton--bg:after{background-color:#b32d2e}.webpButton--gray{border-color:#c3c4c7;color:#c3c4c7!important}.webpButton--gray.webpButton--bg,.webpButton--gray:after{background-color:#c3c4c7}.webpButton--gray.webpButton--bg:after{background-color:#a7aaad}.webpButton--bg{color:#fff!important;font-weight:400}.webpContent{padding:20px 30px}.webpContent--author{background-image:url(../../img/author.png);background-position:left calc(100% - 30px);background-repeat:no-repeat;background-size:152px 152px;margin-left:20px;padding-left:172px}.webpContent p{font-size:14px;line-height:1.5714285714;max-width:800px}.webpContent p.center{text-align:center}.webpContent--wide p{max-width:100%}.webpContent a{box-shadow:none;color:#2271b1;outline:none;text-decoration:underline;transition:opacity .3s}.webpContent a:hover{opacity:.5}.webpContent h1,.webpContent h2,.webpContent h3,.webpContent h4,.webpContent h5,.webpContent h6{font-size:16px;font-weight:500;line-height:1.5}.webpContent h1,.webpContent h2,.webpContent h3,.webpContent h4,.webpContent h5,.webpContent h6,.webpContent p{margin:10px 0 0;padding:4px 0}.webpContent h1:first-child,.webpContent h2:first-child,.webpContent h3:first-child,.webpContent h4:first-child,.webpContent h5:first-child,.webpContent h6:first-child,.webpContent p:first-child,.webpContent p>p{margin-top:0}.webpInput+p{background-color:#f0f0f1;margin:0 0 10px;max-width:none;padding:14px 20px}.webpContent h1+p,.webpContent h2+p,.webpContent h3+p,.webpContent h4+p,.webpContent h5+p,.webpContent h6+p{font-size:12px;line-height:1.75;margin-top:0}.webpContent--notice h1+p,.webpContent--notice h2+p,.webpContent--notice h3+p,.webpContent--notice h4+p,.webpContent--notice h5+p,.webpContent--notice h6+p{font-size:14px;line-height:1.5714285714}.webpContent__buttons{margin-top:-10px;overflow:hidden;padding:10px 0}.webpContent__button{float:left;margin:20px 20px 0 0}.webpContent__button:last-child{margin-right:0}.webpField{display:flex;padding:10px 0}.webpField--center{align-items:center}.webpField+.webpField{margin-top:-12px}.webpField__input{display:none!important}.webpField__input+label{display:inline-block;position:relative}.webpField__input[disabled]+label{pointer-events:none}.webpField__input[disabled]+label:after,.webpField__input[disabled]+label:before{opacity:.25}.webpField__input--checkbox+label,.webpField__input--radio+label{height:22px;width:22px}.webpField__input--checkbox+label:after,.webpField__input--checkbox+label:before,.webpField__input--radio+label:after,.webpField__input--radio+label:before{align-items:center;content:"";display:flex;height:22px;justify-content:center;left:0;position:absolute;top:0;width:22px}.webpField__input--checkbox+label:before,.webpField__input--radio+label:before{border:1px solid #c3c4c7}.webpField__input--checkbox+label:after,.webpField__input--radio+label:after{position:absolute;transform:scale(0);transition:transform .3s}.webpField__input--checkbox:checked+label:after,.webpField__input--radio:checked+label:after{transform:scale(1)}.webpField__input--checkbox+label:after{color:#00a32a;content:"\f147";font-family:dashicons;font-size:20px;line-height:1}.webpField__input--radio+label:before{border-radius:50%}.webpField__input--radio+label:after{background-color:#00a32a;border-radius:50%;content:"";height:6px;left:8px;top:8px;width:6px}.webpField__input--toggle+label{height:22px;width:44px}.webpField__input--toggle+label:after,.webpField__input--toggle+label:before{content:"";position:absolute}.webpField__input--toggle+label:before{background-color:#dcdcde;border:1px solid #c3c4c7;border-radius:11px;height:22px;left:0;top:0;transition:background-color .3s;width:44px}.webpField__input--toggle+label:after{background-color:#fff;border-radius:50%;height:16px;left:3px;position:absolute;top:3px;transition:transform .3s;width:16px}.webpField__input--toggle:checked+label:before{background-color:#00a32a}.webpField__input--toggle:checked+label:after{transform:translateX(22px)}.webpField__label{display:block;font-size:14px;line-height:1.5714285714;max-width:650px;position:relative}.webpField__input~.webpField__label{margin-left:20px}.webpInput{align-items:center;display:flex;padding:10px 0}.webpInput__field{border:1px solid #c3c4c7!important;border-radius:0!important;box-shadow:none!important;flex:1;font-size:14px!important;line-height:1.5714285714!important;padding:9px 15px!important}.webpInput__field--small{margin:0 10px;padding:4px 10px!important;width:80px}.webpInput__field[readonly]{background-color:#f0f0f1}.webpInput__button{margin:0 0 0 10px!important}.webpLoader__status{padding:20px 0 10px;position:relative}.webpLoader__bar--hidden{display:none}.webpLoader__barProgress{font-size:0;height:21px;line-height:0;position:relative}.webpLoader__barProgress:before{background-color:#00a32a;content:"";height:100%;left:0;position:absolute;top:0;transition:width .3s;width:0}.webpLoader__barProgress--error:before{background-color:#d63638}.webpLoader__barProgress[data-percent="0"]:before{width:0}.webpLoader__barProgress[data-percent="1"]:before{width:1%}.webpLoader__barProgress[data-percent="2"]:before{width:2%}.webpLoader__barProgress[data-percent="3"]:before{width:3%}.webpLoader__barProgress[data-percent="4"]:before{width:4%}.webpLoader__barProgress[data-percent="5"]:before{width:5%}.webpLoader__barProgress[data-percent="6"]:before{width:6%}.webpLoader__barProgress[data-percent="7"]:before{width:7%}.webpLoader__barProgress[data-percent="8"]:before{width:8%}.webpLoader__barProgress[data-percent="9"]:before{width:9%}.webpLoader__barProgress[data-percent="10"]:before{width:10%}.webpLoader__barProgress[data-percent="11"]:before{width:11%}.webpLoader__barProgress[data-percent="12"]:before{width:12%}.webpLoader__barProgress[data-percent="13"]:before{width:13%}.webpLoader__barProgress[data-percent="14"]:before{width:14%}.webpLoader__barProgress[data-percent="15"]:before{width:15%}.webpLoader__barProgress[data-percent="16"]:before{width:16%}.webpLoader__barProgress[data-percent="17"]:before{width:17%}.webpLoader__barProgress[data-percent="18"]:before{width:18%}.webpLoader__barProgress[data-percent="19"]:before{width:19%}.webpLoader__barProgress[data-percent="20"]:before{width:20%}.webpLoader__barProgress[data-percent="21"]:before{width:21%}.webpLoader__barProgress[data-percent="22"]:before{width:22%}.webpLoader__barProgress[data-percent="23"]:before{width:23%}.webpLoader__barProgress[data-percent="24"]:before{width:24%}.webpLoader__barProgress[data-percent="25"]:before{width:25%}.webpLoader__barProgress[data-percent="26"]:before{width:26%}.webpLoader__barProgress[data-percent="27"]:before{width:27%}.webpLoader__barProgress[data-percent="28"]:before{width:28%}.webpLoader__barProgress[data-percent="29"]:before{width:29%}.webpLoader__barProgress[data-percent="30"]:before{width:30%}.webpLoader__barProgress[data-percent="31"]:before{width:31%}.webpLoader__barProgress[data-percent="32"]:before{width:32%}.webpLoader__barProgress[data-percent="33"]:before{width:33%}.webpLoader__barProgress[data-percent="34"]:before{width:34%}.webpLoader__barProgress[data-percent="35"]:before{width:35%}.webpLoader__barProgress[data-percent="36"]:before{width:36%}.webpLoader__barProgress[data-percent="37"]:before{width:37%}.webpLoader__barProgress[data-percent="38"]:before{width:38%}.webpLoader__barProgress[data-percent="39"]:before{width:39%}.webpLoader__barProgress[data-percent="40"]:before{width:40%}.webpLoader__barProgress[data-percent="41"]:before{width:41%}.webpLoader__barProgress[data-percent="42"]:before{width:42%}.webpLoader__barProgress[data-percent="43"]:before{width:43%}.webpLoader__barProgress[data-percent="44"]:before{width:44%}.webpLoader__barProgress[data-percent="45"]:before{width:45%}.webpLoader__barProgress[data-percent="46"]:before{width:46%}.webpLoader__barProgress[data-percent="47"]:before{width:47%}.webpLoader__barProgress[data-percent="48"]:before{width:48%}.webpLoader__barProgress[data-percent="49"]:before{width:49%}.webpLoader__barProgress[data-percent="50"]:before{width:50%}.webpLoader__barProgress[data-percent="51"]:before{width:51%}.webpLoader__barProgress[data-percent="52"]:before{width:52%}.webpLoader__barProgress[data-percent="53"]:before{width:53%}.webpLoader__barProgress[data-percent="54"]:before{width:54%}.webpLoader__barProgress[data-percent="55"]:before{width:55%}.webpLoader__barProgress[data-percent="56"]:before{width:56%}.webpLoader__barProgress[data-percent="57"]:before{width:57%}.webpLoader__barProgress[data-percent="58"]:before{width:58%}.webpLoader__barProgress[data-percent="59"]:before{width:59%}.webpLoader__barProgress[data-percent="60"]:before{width:60%}.webpLoader__barProgress[data-percent="61"]:before{width:61%}.webpLoader__barProgress[data-percent="62"]:before{width:62%}.webpLoader__barProgress[data-percent="63"]:before{width:63%}.webpLoader__barProgress[data-percent="64"]:before{width:64%}.webpLoader__barProgress[data-percent="65"]:before{width:65%}.webpLoader__barProgress[data-percent="66"]:before{width:66%}.webpLoader__barProgress[data-percent="67"]:before{width:67%}.webpLoader__barProgress[data-percent="68"]:before{width:68%}.webpLoader__barProgress[data-percent="69"]:before{width:69%}.webpLoader__barProgress[data-percent="70"]:before{width:70%}.webpLoader__barProgress[data-percent="71"]:before{width:71%}.webpLoader__barProgress[data-percent="72"]:before{width:72%}.webpLoader__barProgress[data-percent="73"]:before{width:73%}.webpLoader__barProgress[data-percent="74"]:before{width:74%}.webpLoader__barProgress[data-percent="75"]:before{width:75%}.webpLoader__barProgress[data-percent="76"]:before{width:76%}.webpLoader__barProgress[data-percent="77"]:before{width:77%}.webpLoader__barProgress[data-percent="78"]:before{width:78%}.webpLoader__barProgress[data-percent="79"]:before{width:79%}.webpLoader__barProgress[data-percent="80"]:before{width:80%}.webpLoader__barProgress[data-percent="81"]:before{width:81%}.webpLoader__barProgress[data-percent="82"]:before{width:82%}.webpLoader__barProgress[data-percent="83"]:before{width:83%}.webpLoader__barProgress[data-percent="84"]:before{width:84%}.webpLoader__barProgress[data-percent="85"]:before{width:85%}.webpLoader__barProgress[data-percent="86"]:before{width:86%}.webpLoader__barProgress[data-percent="87"]:before{width:87%}.webpLoader__barProgress[data-percent="88"]:before{width:88%}.webpLoader__barProgress[data-percent="89"]:before{width:89%}.webpLoader__barProgress[data-percent="90"]:before{width:90%}.webpLoader__barProgress[data-percent="91"]:before{width:91%}.webpLoader__barProgress[data-percent="92"]:before{width:92%}.webpLoader__barProgress[data-percent="93"]:before{width:93%}.webpLoader__barProgress[data-percent="94"]:before{width:94%}.webpLoader__barProgress[data-percent="95"]:before{width:95%}.webpLoader__barProgress[data-percent="96"]:before{width:96%}.webpLoader__barProgress[data-percent="97"]:before{width:97%}.webpLoader__barProgress[data-percent="98"]:before{width:98%}.webpLoader__barProgress[data-percent="99"]:before{width:99%}.webpLoader__barProgress[data-percent="100"]:before{width:100%}.webpLoader__barCount{background-color:#00a32a;color:#fff;display:inline-block;font-family:monospace;font-size:12px;line-height:1.75;padding:0 5px;position:relative}.webpLoader__barProgress--error .webpLoader__barCount{background-color:#d63638}.webpLoader__barCount:after{animation:dotsLoading 1s linear infinite;content:"...";margin-left:5px}.webpLoader__barProgress--error .webpLoader__barCount:after,.webpLoader__barProgress[data-percent="100"] .webpLoader__barCount:after{display:none}.webpLoader__barProgress[data-percent="0"] .webpLoader__barCount:before{content:"0%"}.webpLoader__barProgress[data-percent="1"] .webpLoader__barCount:before{content:"1%"}.webpLoader__barProgress[data-percent="2"] .webpLoader__barCount:before{content:"2%"}.webpLoader__barProgress[data-percent="3"] .webpLoader__barCount:before{content:"3%"}.webpLoader__barProgress[data-percent="4"] .webpLoader__barCount:before{content:"4%"}.webpLoader__barProgress[data-percent="5"] .webpLoader__barCount:before{content:"5%"}.webpLoader__barProgress[data-percent="6"] .webpLoader__barCount:before{content:"6%"}.webpLoader__barProgress[data-percent="7"] .webpLoader__barCount:before{content:"7%"}.webpLoader__barProgress[data-percent="8"] .webpLoader__barCount:before{content:"8%"}.webpLoader__barProgress[data-percent="9"] .webpLoader__barCount:before{content:"9%"}.webpLoader__barProgress[data-percent="10"] .webpLoader__barCount:before{content:"10%"}.webpLoader__barProgress[data-percent="11"] .webpLoader__barCount:before{content:"11%"}.webpLoader__barProgress[data-percent="12"] .webpLoader__barCount:before{content:"12%"}.webpLoader__barProgress[data-percent="13"] .webpLoader__barCount:before{content:"13%"}.webpLoader__barProgress[data-percent="14"] .webpLoader__barCount:before{content:"14%"}.webpLoader__barProgress[data-percent="15"] .webpLoader__barCount:before{content:"15%"}.webpLoader__barProgress[data-percent="16"] .webpLoader__barCount:before{content:"16%"}.webpLoader__barProgress[data-percent="17"] .webpLoader__barCount:before{content:"17%"}.webpLoader__barProgress[data-percent="18"] .webpLoader__barCount:before{content:"18%"}.webpLoader__barProgress[data-percent="19"] .webpLoader__barCount:before{content:"19%"}.webpLoader__barProgress[data-percent="20"] .webpLoader__barCount:before{content:"20%"}.webpLoader__barProgress[data-percent="21"] .webpLoader__barCount:before{content:"21%"}.webpLoader__barProgress[data-percent="22"] .webpLoader__barCount:before{content:"22%"}.webpLoader__barProgress[data-percent="23"] .webpLoader__barCount:before{content:"23%"}.webpLoader__barProgress[data-percent="24"] .webpLoader__barCount:before{content:"24%"}.webpLoader__barProgress[data-percent="25"] .webpLoader__barCount:before{content:"25%"}.webpLoader__barProgress[data-percent="26"] .webpLoader__barCount:before{content:"26%"}.webpLoader__barProgress[data-percent="27"] .webpLoader__barCount:before{content:"27%"}.webpLoader__barProgress[data-percent="28"] .webpLoader__barCount:before{content:"28%"}.webpLoader__barProgress[data-percent="29"] .webpLoader__barCount:before{content:"29%"}.webpLoader__barProgress[data-percent="30"] .webpLoader__barCount:before{content:"30%"}.webpLoader__barProgress[data-percent="31"] .webpLoader__barCount:before{content:"31%"}.webpLoader__barProgress[data-percent="32"] .webpLoader__barCount:before{content:"32%"}.webpLoader__barProgress[data-percent="33"] .webpLoader__barCount:before{content:"33%"}.webpLoader__barProgress[data-percent="34"] .webpLoader__barCount:before{content:"34%"}.webpLoader__barProgress[data-percent="35"] .webpLoader__barCount:before{content:"35%"}.webpLoader__barProgress[data-percent="36"] .webpLoader__barCount:before{content:"36%"}.webpLoader__barProgress[data-percent="37"] .webpLoader__barCount:before{content:"37%"}.webpLoader__barProgress[data-percent="38"] .webpLoader__barCount:before{content:"38%"}.webpLoader__barProgress[data-percent="39"] .webpLoader__barCount:before{content:"39%"}.webpLoader__barProgress[data-percent="40"] .webpLoader__barCount:before{content:"40%"}.webpLoader__barProgress[data-percent="41"] .webpLoader__barCount:before{content:"41%"}.webpLoader__barProgress[data-percent="42"] .webpLoader__barCount:before{content:"42%"}.webpLoader__barProgress[data-percent="43"] .webpLoader__barCount:before{content:"43%"}.webpLoader__barProgress[data-percent="44"] .webpLoader__barCount:before{content:"44%"}.webpLoader__barProgress[data-percent="45"] .webpLoader__barCount:before{content:"45%"}.webpLoader__barProgress[data-percent="46"] .webpLoader__barCount:before{content:"46%"}.webpLoader__barProgress[data-percent="47"] .webpLoader__barCount:before{content:"47%"}.webpLoader__barProgress[data-percent="48"] .webpLoader__barCount:before{content:"48%"}.webpLoader__barProgress[data-percent="49"] .webpLoader__barCount:before{content:"49%"}.webpLoader__barProgress[data-percent="50"] .webpLoader__barCount:before{content:"50%"}.webpLoader__barProgress[data-percent="51"] .webpLoader__barCount:before{content:"51%"}.webpLoader__barProgress[data-percent="52"] .webpLoader__barCount:before{content:"52%"}.webpLoader__barProgress[data-percent="53"] .webpLoader__barCount:before{content:"53%"}.webpLoader__barProgress[data-percent="54"] .webpLoader__barCount:before{content:"54%"}.webpLoader__barProgress[data-percent="55"] .webpLoader__barCount:before{content:"55%"}.webpLoader__barProgress[data-percent="56"] .webpLoader__barCount:before{content:"56%"}.webpLoader__barProgress[data-percent="57"] .webpLoader__barCount:before{content:"57%"}.webpLoader__barProgress[data-percent="58"] .webpLoader__barCount:before{content:"58%"}.webpLoader__barProgress[data-percent="59"] .webpLoader__barCount:before{content:"59%"}.webpLoader__barProgress[data-percent="60"] .webpLoader__barCount:before{content:"60%"}.webpLoader__barProgress[data-percent="61"] .webpLoader__barCount:before{content:"61%"}.webpLoader__barProgress[data-percent="62"] .webpLoader__barCount:before{content:"62%"}.webpLoader__barProgress[data-percent="63"] .webpLoader__barCount:before{content:"63%"}.webpLoader__barProgress[data-percent="64"] .webpLoader__barCount:before{content:"64%"}.webpLoader__barProgress[data-percent="65"] .webpLoader__barCount:before{content:"65%"}.webpLoader__barProgress[data-percent="66"] .webpLoader__barCount:before{content:"66%"}.webpLoader__barProgress[data-percent="67"] .webpLoader__barCount:before{content:"67%"}.webpLoader__barProgress[data-percent="68"] .webpLoader__barCount:before{content:"68%"}.webpLoader__barProgress[data-percent="69"] .webpLoader__barCount:before{content:"69%"}.webpLoader__barProgress[data-percent="70"] .webpLoader__barCount:before{content:"70%"}.webpLoader__barProgress[data-percent="71"] .webpLoader__barCount:before{content:"71%"}.webpLoader__barProgress[data-percent="72"] .webpLoader__barCount:before{content:"72%"}.webpLoader__barProgress[data-percent="73"] .webpLoader__barCount:before{content:"73%"}.webpLoader__barProgress[data-percent="74"] .webpLoader__barCount:before{content:"74%"}.webpLoader__barProgress[data-percent="75"] .webpLoader__barCount:before{content:"75%"}.webpLoader__barProgress[data-percent="76"] .webpLoader__barCount:before{content:"76%"}.webpLoader__barProgress[data-percent="77"] .webpLoader__barCount:before{content:"77%"}.webpLoader__barProgress[data-percent="78"] .webpLoader__barCount:before{content:"78%"}.webpLoader__barProgress[data-percent="79"] .webpLoader__barCount:before{content:"79%"}.webpLoader__barProgress[data-percent="80"] .webpLoader__barCount:before{content:"80%"}.webpLoader__barProgress[data-percent="81"] .webpLoader__barCount:before{content:"81%"}.webpLoader__barProgress[data-percent="82"] .webpLoader__barCount:before{content:"82%"}.webpLoader__barProgress[data-percent="83"] .webpLoader__barCount:before{content:"83%"}.webpLoader__barProgress[data-percent="84"] .webpLoader__barCount:before{content:"84%"}.webpLoader__barProgress[data-percent="85"] .webpLoader__barCount:before{content:"85%"}.webpLoader__barProgress[data-percent="86"] .webpLoader__barCount:before{content:"86%"}.webpLoader__barProgress[data-percent="87"] .webpLoader__barCount:before{content:"87%"}.webpLoader__barProgress[data-percent="88"] .webpLoader__barCount:before{content:"88%"}.webpLoader__barProgress[data-percent="89"] .webpLoader__barCount:before{content:"89%"}.webpLoader__barProgress[data-percent="90"] .webpLoader__barCount:before{content:"90%"}.webpLoader__barProgress[data-percent="91"] .webpLoader__barCount:before{content:"91%"}.webpLoader__barProgress[data-percent="92"] .webpLoader__barCount:before{content:"92%"}.webpLoader__barProgress[data-percent="93"] .webpLoader__barCount:before{content:"93%"}.webpLoader__barProgress[data-percent="94"] .webpLoader__barCount:before{content:"94%"}.webpLoader__barProgress[data-percent="95"] .webpLoader__barCount:before{content:"95%"}.webpLoader__barProgress[data-percent="96"] .webpLoader__barCount:before{content:"96%"}.webpLoader__barProgress[data-percent="97"] .webpLoader__barCount:before{content:"97%"}.webpLoader__barProgress[data-percent="98"] .webpLoader__barCount:before{content:"98%"}.webpLoader__barProgress[data-percent="99"] .webpLoader__barCount:before{content:"99%"}.webpLoader__barProgress[data-percent="100"] .webpLoader__barCount:before{content:"100%"}.webpLoader__progress{font-size:14px;line-height:1.5714285714;margin-bottom:-10px;padding:4px 0}.webpLoader__progressValue{font-weight:500}.webpLoader__success{margin-top:20px;padding:4px 0 4px 20px;position:relative}.webpLoader__success:before{background-color:#00a32a;content:"";height:100%;left:0;position:absolute;top:0;width:2px}.webpLoader__successContent{color:#00a32a;font-size:14px;font-weight:500;line-height:1.5714285714}.webpLoader__successContent a{color:inherit}.webpLoader__errors{border-left:2px solid #c3c4c7;margin-top:20px}.webpLoader__errorsTitle{background-color:#c3c4c7;color:#fff;display:inline-block;font-size:14px;line-height:1.5714285714;padding:4px 22px}.webpLoader__errorsContent{padding:10px 0 10px 20px}.webpLoader__errorsContent>p{font-size:12px;line-height:1.75;margin:0;max-width:100%}.webpLoader__errorsContent>p.webpLoader__errorsContentError{color:#d63638;font-size:14px;font-weight:500;line-height:1.5714285714}.webpLoader__errorsContent pre{font-size:12px;line-height:1.75;white-space:normal}.webpLoader__button--disabled{opacity:.25!important;pointer-events:none}.webpPopup{margin-top:20px}.webpPopup__inner{background-color:#fff;border:1px solid #c3c4c7;display:flex;flex-wrap:wrap}.webpPopup__image{background-image:url(../../img/author.png);background-position:50%;background-repeat:no-repeat;background-size:cover;width:152px}.webpPopup__content{border-left:1px solid #c3c4c7;flex:1;padding:10px 20px}.webpServerInfo{color:#222;text-align:center}.webpServerInfo pre{font-family:monospace;margin:0}.webpServerInfo h1,.webpServerInfo h2{display:none}.webpServerInfo p{max-width:100%}.webpServerInfo table{border:0;border-collapse:collapse;margin:10px auto;width:100%}.webpServerInfo td,.webpServerInfo th{border:1px solid #666;font-family:monospace;font-size:12px;line-height:1.75;padding:4px 5px;text-align:center;vertical-align:baseline}.webpServerInfo .p{text-align:left}.webpServerInfo .e{background-color:#ccf;font-weight:700;width:300px}.webpServerInfo .h{background-color:#99c;font-weight:700}.webpServerInfo .v{word-wrap:break-word;background-color:#ddd;max-width:300px;overflow-x:auto}.webpServerInfo .v i{color:#999}.webpServerInfo img{border:0;float:right}@media screen and (max-width:1280px){.webpPage__columns{margin:0 -15px}.webpPage__column{padding:0 15px}.webpPage__widget+.webpPage__widget{margin-top:30px}}@media screen and (max-width:1024px){.webpPage__column--large{width:100%}.webpPage__column--small{margin-top:40px;width:100%}.webpPage__widgetColumns{display:block}.webpPage__widgetColumn{width:100%}}@media screen and (max-width:782px){.webpPage{padding-right:0}.webpPage__quality{display:block}.webpPage__qualityItem{border-left:0}.webpPage__qualityItem+.webpPage__qualityItem{border-top:1px solid #c3c4c7}.webpContent--author{background:none;margin-left:0;padding-left:30px}.webpInput{display:block}.webpInput__field{width:100%}.webpInput__button{margin:10px 0 0!important}.webpPopup__inner{border:1px solid #c3c4c7;display:block}.webpPopup__image{height:152px;margin:20px auto 0}.webpPopup__content{border-left:0}}
|
1 |
+
@charset "UTF-8";@keyframes dotsLoading{0%,to{content:"..."}25%{content:" .."}50%{content:". ."}75%{content:".. "}}@font-face{font-family:webpc-icomoon;font-style:normal;font-weight:400;src:url(../../fonts/icons/icomoon.eot?ver=19973276);src:url(../../fonts/icons/icomoon.woff?ver=19973276) format("woff"),url(../../fonts/icons/icomoon.eot?ver=19973276#iefix) format("embedded-opentype"),url(../../fonts/icons/icomoon.ttf?ver=19973276) format("truetype"),url(../../fonts/icons/icomoon.svg?ver=19973276#icomoon) format("svg")}.icon-logo:before{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\e900"!important;font-family:webpc-icomoon!important;font-style:normal;font-variant:normal;font-weight:400;text-transform:none}.webpPage{color:#101517;margin:0;overflow:hidden;padding:0 20px 0 0}.webpPage *,.webpPage :after,.webpPage :before{box-sizing:border-box;margin:0;padding:0}.webpPage [hidden]{display:none!important}.webpPage .webpPage__headline{font-size:24px;line-height:1.2083333333;margin:0;padding:15px 0 23px}.webpPage__alert{background-color:#00a32a;color:#fff;font-size:14px;line-height:1.5714285714;margin-bottom:30px;padding:15px 20px}.webpPage__columns{margin:0 -30px;overflow:hidden}.webpPage__column{float:left;padding:0 30px}.webpPage__column--large{width:66.666%}.webpPage__column--small{width:33.333%}.webpPage__widget{background-color:#fff}.webpPage__widget+.webpPage__widget{margin-top:60px}.webpPage__widgetTitle{background-color:#2271b1;color:#fff;font-size:16px;font-weight:400;line-height:1.5;padding:14px 30px}.webpPage__widgetTitle--second{background-color:#a7aaad}.webpPage__widgetTitle--error{background-color:#d63638}.webpPage__widgetRow{padding-bottom:10px}.webpPage__widgetRow:last-child{padding-bottom:0}.webpPage__widgetRow .webpButton{margin:10px 0}.webpPage__widgetColumns{display:flex;flex-wrap:wrap;margin:0 -10px}.webpPage__widgetColumn{padding:0 10px;width:50%}.webpPage__widgetColumn:first-child:last-child{flex:1}.webpPage__widgetColumnNotice{background-color:#2271b1;margin:10px 0;padding:10px 20px}.webpPage__widgetColumnNotice p{color:#fff;font-size:1.2rem}.webpPage__widgetColumnNotice p+p{margin-top:0}.webpPage__widgetColumnNotice p a{color:inherit;font-weight:500;letter-spacing:1px;text-decoration:none;text-transform:uppercase}.webpPage__quality{border:1px solid #c3c4c7;display:flex;flex-wrap:wrap;margin:10px 0}.webpPage__qualityItem{border-left:1px solid #c3c4c7;flex:1;margin-left:-1px;text-align:center}.webpPage__qualityItemInput{display:none!important}.webpPage__qualityItemLabel{display:block;font-size:14px;line-height:1.5714285714;padding:14px 20px;position:relative;transition:color .3s,background-color .3s}.webpPage__qualityItemInput:checked+.webpPage__qualityItemLabel{background-color:#00a32a;color:#fff;margin:-1px;padding:15px 21px}.webpPage__qualityItemInput[disabled]+.webpPage__qualityItemLabel{opacity:0;pointer-events:none}#wp-admin-bar-webpc-menu .ab-icon:before{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\e900"!important;font-family:webpc-icomoon!important;font-style:normal;font-variant:normal;font-weight:400;text-transform:none}.notice[data-notice=webp-converter-for-media]{padding:0}.notice[data-notice=webp-converter-for-media]~.notice[data-notice=webp-converter-for-media]{display:none}.webpButton{background-color:#fff;border:1px solid transparent;box-shadow:none!important;box-sizing:border-box;cursor:pointer;display:inline-block;font-size:14px;font-weight:500;line-height:1.5714285714;min-width:180px;opacity:1!important;outline:none!important;padding:9px 30px;position:relative;text-align:center;text-decoration:none!important;transition:color .3s!important;z-index:10}p>.webpButton{margin:6px 0}.webpButton:before{float:left;font-family:dashicons;font-size:20px;line-height:1.1;margin-right:10px}.webpButton:after{content:"";height:100%;left:0;position:absolute;top:0;transition:width .3s;width:0;z-index:-1}.webpButton:hover:after{width:100%}.webpButton[disabled]{opacity:.5!important;pointer-events:none}.webpButton--blue:hover,.webpButton--gray:hover,.webpButton--green:hover,.webpButton--red:hover{color:#fff!important}.webpButton--blue{border-color:#2271b1;color:#2271b1!important}.webpButton--blue.webpButton--bg,.webpButton--blue:after{background-color:#2271b1}.webpButton--blue.webpButton--bg:after{background-color:#135e96}.webpButton--green{border-color:#00a32a;color:#00a32a!important}.webpButton--green.webpButton--bg,.webpButton--green:after{background-color:#00a32a}.webpButton--green.webpButton--bg:after{background-color:#008a20}.webpButton--red{border-color:#d63638;color:#d63638!important}.webpButton--red.webpButton--bg,.webpButton--red:after{background-color:#d63638}.webpButton--red.webpButton--bg:after{background-color:#b32d2e}.webpButton--gray{border-color:#c3c4c7;color:#c3c4c7!important}.webpButton--gray.webpButton--bg,.webpButton--gray:after{background-color:#c3c4c7}.webpButton--gray.webpButton--bg:after{background-color:#a7aaad}.webpButton--bg{color:#fff!important;font-weight:400}.webpContent{padding:20px 30px}.webpContent--author{background-image:url(../../img/author.png);background-position:left calc(100% - 30px);background-repeat:no-repeat;background-size:152px 152px;margin-left:20px;padding-left:172px}.webpContent p{font-size:14px;line-height:1.5714285714;max-width:800px}.webpContent p.center{text-align:center}.webpContent--wide p{max-width:100%}.webpContent a{box-shadow:none;color:#2271b1;outline:none;text-decoration:underline;transition:opacity .3s}.webpContent a:hover{opacity:.5}.webpContent h1,.webpContent h2,.webpContent h3,.webpContent h4,.webpContent h5,.webpContent h6{font-size:16px;font-weight:500;line-height:1.5}.webpContent h1,.webpContent h2,.webpContent h3,.webpContent h4,.webpContent h5,.webpContent h6,.webpContent p{margin:10px 0 0;padding:4px 0}.webpContent h1:first-child,.webpContent h2:first-child,.webpContent h3:first-child,.webpContent h4:first-child,.webpContent h5:first-child,.webpContent h6:first-child,.webpContent p:first-child,.webpContent p>p{margin-top:0}.webpInput+p{background-color:#f0f0f1;margin:0 0 10px;max-width:none;padding:14px 20px}.webpContent h1+p,.webpContent h2+p,.webpContent h3+p,.webpContent h4+p,.webpContent h5+p,.webpContent h6+p{font-size:12px;line-height:1.75;margin-top:0}.webpContent--notice h1+p,.webpContent--notice h2+p,.webpContent--notice h3+p,.webpContent--notice h4+p,.webpContent--notice h5+p,.webpContent--notice h6+p{font-size:14px;line-height:1.5714285714}.webpContent__buttons{margin-top:-10px;overflow:hidden;padding:10px 0}.webpContent__button{float:left;margin:20px 20px 0 0}.webpContent__button:last-child{margin-right:0}.webpField{display:flex;padding:10px 0}.webpField--center{align-items:center}.webpField+.webpField{margin-top:-12px}.webpField__input{display:none!important}.webpField__input+label{display:inline-block;position:relative}.webpField__input[disabled]+label{pointer-events:none}.webpField__input[disabled]+label:after,.webpField__input[disabled]+label:before{opacity:.25}.webpField__input--checkbox+label,.webpField__input--radio+label{height:22px;width:22px}.webpField__input--checkbox+label:after,.webpField__input--checkbox+label:before,.webpField__input--radio+label:after,.webpField__input--radio+label:before{align-items:center;content:"";display:flex;height:22px;justify-content:center;left:0;position:absolute;top:0;width:22px}.webpField__input--checkbox+label:before,.webpField__input--radio+label:before{border:1px solid #c3c4c7}.webpField__input--checkbox+label:after,.webpField__input--radio+label:after{position:absolute;transform:scale(0);transition:transform .3s}.webpField__input--checkbox:checked+label:after,.webpField__input--radio:checked+label:after{transform:scale(1)}.webpField__input--checkbox+label:after{color:#00a32a;content:"\f147";font-family:dashicons;font-size:20px;line-height:1}.webpField__input--radio+label:before{border-radius:50%}.webpField__input--radio+label:after{background-color:#00a32a;border-radius:50%;content:"";height:6px;left:8px;top:8px;width:6px}.webpField__input--toggle+label{height:22px;width:44px}.webpField__input--toggle+label:after,.webpField__input--toggle+label:before{content:"";position:absolute}.webpField__input--toggle+label:before{background-color:#dcdcde;border:1px solid #c3c4c7;border-radius:11px;height:22px;left:0;top:0;transition:background-color .3s;width:44px}.webpField__input--toggle+label:after{background-color:#fff;border-radius:50%;height:16px;left:3px;position:absolute;top:3px;transition:transform .3s;width:16px}.webpField__input--toggle:checked+label:before{background-color:#00a32a}.webpField__input--toggle:checked+label:after{transform:translateX(22px)}.webpField__label{display:block;font-size:14px;line-height:1.5714285714;max-width:650px;position:relative}.webpField__input~.webpField__label{margin-left:20px}.webpInput{align-items:center;display:flex;padding:10px 0}.webpInput__field{border:1px solid #c3c4c7!important;border-radius:0!important;box-shadow:none!important;flex:1;font-size:14px!important;line-height:1.5714285714!important;padding:9px 15px!important}.webpInput__field--small{margin:0 10px;padding:4px 10px!important;width:80px}.webpInput__field[readonly]{background-color:#f0f0f1}.webpInput__button{margin:0 0 0 10px!important}.webpLoader__status{padding:20px 0 10px;position:relative}.webpLoader__bar--hidden{display:none}.webpLoader__barProgress{font-size:0;height:21px;line-height:0;position:relative}.webpLoader__barProgress:before{background-color:#00a32a;content:"";height:100%;left:0;position:absolute;top:0;transition:width .3s;width:0}.webpLoader__barProgress--error:before{background-color:#d63638}.webpLoader__barProgress[data-percent="0"]:before{width:0}.webpLoader__barProgress[data-percent="1"]:before{width:1%}.webpLoader__barProgress[data-percent="2"]:before{width:2%}.webpLoader__barProgress[data-percent="3"]:before{width:3%}.webpLoader__barProgress[data-percent="4"]:before{width:4%}.webpLoader__barProgress[data-percent="5"]:before{width:5%}.webpLoader__barProgress[data-percent="6"]:before{width:6%}.webpLoader__barProgress[data-percent="7"]:before{width:7%}.webpLoader__barProgress[data-percent="8"]:before{width:8%}.webpLoader__barProgress[data-percent="9"]:before{width:9%}.webpLoader__barProgress[data-percent="10"]:before{width:10%}.webpLoader__barProgress[data-percent="11"]:before{width:11%}.webpLoader__barProgress[data-percent="12"]:before{width:12%}.webpLoader__barProgress[data-percent="13"]:before{width:13%}.webpLoader__barProgress[data-percent="14"]:before{width:14%}.webpLoader__barProgress[data-percent="15"]:before{width:15%}.webpLoader__barProgress[data-percent="16"]:before{width:16%}.webpLoader__barProgress[data-percent="17"]:before{width:17%}.webpLoader__barProgress[data-percent="18"]:before{width:18%}.webpLoader__barProgress[data-percent="19"]:before{width:19%}.webpLoader__barProgress[data-percent="20"]:before{width:20%}.webpLoader__barProgress[data-percent="21"]:before{width:21%}.webpLoader__barProgress[data-percent="22"]:before{width:22%}.webpLoader__barProgress[data-percent="23"]:before{width:23%}.webpLoader__barProgress[data-percent="24"]:before{width:24%}.webpLoader__barProgress[data-percent="25"]:before{width:25%}.webpLoader__barProgress[data-percent="26"]:before{width:26%}.webpLoader__barProgress[data-percent="27"]:before{width:27%}.webpLoader__barProgress[data-percent="28"]:before{width:28%}.webpLoader__barProgress[data-percent="29"]:before{width:29%}.webpLoader__barProgress[data-percent="30"]:before{width:30%}.webpLoader__barProgress[data-percent="31"]:before{width:31%}.webpLoader__barProgress[data-percent="32"]:before{width:32%}.webpLoader__barProgress[data-percent="33"]:before{width:33%}.webpLoader__barProgress[data-percent="34"]:before{width:34%}.webpLoader__barProgress[data-percent="35"]:before{width:35%}.webpLoader__barProgress[data-percent="36"]:before{width:36%}.webpLoader__barProgress[data-percent="37"]:before{width:37%}.webpLoader__barProgress[data-percent="38"]:before{width:38%}.webpLoader__barProgress[data-percent="39"]:before{width:39%}.webpLoader__barProgress[data-percent="40"]:before{width:40%}.webpLoader__barProgress[data-percent="41"]:before{width:41%}.webpLoader__barProgress[data-percent="42"]:before{width:42%}.webpLoader__barProgress[data-percent="43"]:before{width:43%}.webpLoader__barProgress[data-percent="44"]:before{width:44%}.webpLoader__barProgress[data-percent="45"]:before{width:45%}.webpLoader__barProgress[data-percent="46"]:before{width:46%}.webpLoader__barProgress[data-percent="47"]:before{width:47%}.webpLoader__barProgress[data-percent="48"]:before{width:48%}.webpLoader__barProgress[data-percent="49"]:before{width:49%}.webpLoader__barProgress[data-percent="50"]:before{width:50%}.webpLoader__barProgress[data-percent="51"]:before{width:51%}.webpLoader__barProgress[data-percent="52"]:before{width:52%}.webpLoader__barProgress[data-percent="53"]:before{width:53%}.webpLoader__barProgress[data-percent="54"]:before{width:54%}.webpLoader__barProgress[data-percent="55"]:before{width:55%}.webpLoader__barProgress[data-percent="56"]:before{width:56%}.webpLoader__barProgress[data-percent="57"]:before{width:57%}.webpLoader__barProgress[data-percent="58"]:before{width:58%}.webpLoader__barProgress[data-percent="59"]:before{width:59%}.webpLoader__barProgress[data-percent="60"]:before{width:60%}.webpLoader__barProgress[data-percent="61"]:before{width:61%}.webpLoader__barProgress[data-percent="62"]:before{width:62%}.webpLoader__barProgress[data-percent="63"]:before{width:63%}.webpLoader__barProgress[data-percent="64"]:before{width:64%}.webpLoader__barProgress[data-percent="65"]:before{width:65%}.webpLoader__barProgress[data-percent="66"]:before{width:66%}.webpLoader__barProgress[data-percent="67"]:before{width:67%}.webpLoader__barProgress[data-percent="68"]:before{width:68%}.webpLoader__barProgress[data-percent="69"]:before{width:69%}.webpLoader__barProgress[data-percent="70"]:before{width:70%}.webpLoader__barProgress[data-percent="71"]:before{width:71%}.webpLoader__barProgress[data-percent="72"]:before{width:72%}.webpLoader__barProgress[data-percent="73"]:before{width:73%}.webpLoader__barProgress[data-percent="74"]:before{width:74%}.webpLoader__barProgress[data-percent="75"]:before{width:75%}.webpLoader__barProgress[data-percent="76"]:before{width:76%}.webpLoader__barProgress[data-percent="77"]:before{width:77%}.webpLoader__barProgress[data-percent="78"]:before{width:78%}.webpLoader__barProgress[data-percent="79"]:before{width:79%}.webpLoader__barProgress[data-percent="80"]:before{width:80%}.webpLoader__barProgress[data-percent="81"]:before{width:81%}.webpLoader__barProgress[data-percent="82"]:before{width:82%}.webpLoader__barProgress[data-percent="83"]:before{width:83%}.webpLoader__barProgress[data-percent="84"]:before{width:84%}.webpLoader__barProgress[data-percent="85"]:before{width:85%}.webpLoader__barProgress[data-percent="86"]:before{width:86%}.webpLoader__barProgress[data-percent="87"]:before{width:87%}.webpLoader__barProgress[data-percent="88"]:before{width:88%}.webpLoader__barProgress[data-percent="89"]:before{width:89%}.webpLoader__barProgress[data-percent="90"]:before{width:90%}.webpLoader__barProgress[data-percent="91"]:before{width:91%}.webpLoader__barProgress[data-percent="92"]:before{width:92%}.webpLoader__barProgress[data-percent="93"]:before{width:93%}.webpLoader__barProgress[data-percent="94"]:before{width:94%}.webpLoader__barProgress[data-percent="95"]:before{width:95%}.webpLoader__barProgress[data-percent="96"]:before{width:96%}.webpLoader__barProgress[data-percent="97"]:before{width:97%}.webpLoader__barProgress[data-percent="98"]:before{width:98%}.webpLoader__barProgress[data-percent="99"]:before{width:99%}.webpLoader__barProgress[data-percent="100"]:before{width:100%}.webpLoader__barCount{background-color:#00a32a;color:#fff;display:inline-block;font-family:monospace;font-size:12px;line-height:1.75;padding:0 5px;position:relative}.webpLoader__barProgress--error .webpLoader__barCount{background-color:#d63638}.webpLoader__barCount:after{animation:dotsLoading 1s linear infinite;content:"...";margin-left:5px}.webpLoader__barProgress--error .webpLoader__barCount:after,.webpLoader__barProgress[data-percent="100"] .webpLoader__barCount:after{display:none}.webpLoader__barProgress[data-percent="0"] .webpLoader__barCount:before{content:"0%"}.webpLoader__barProgress[data-percent="1"] .webpLoader__barCount:before{content:"1%"}.webpLoader__barProgress[data-percent="2"] .webpLoader__barCount:before{content:"2%"}.webpLoader__barProgress[data-percent="3"] .webpLoader__barCount:before{content:"3%"}.webpLoader__barProgress[data-percent="4"] .webpLoader__barCount:before{content:"4%"}.webpLoader__barProgress[data-percent="5"] .webpLoader__barCount:before{content:"5%"}.webpLoader__barProgress[data-percent="6"] .webpLoader__barCount:before{content:"6%"}.webpLoader__barProgress[data-percent="7"] .webpLoader__barCount:before{content:"7%"}.webpLoader__barProgress[data-percent="8"] .webpLoader__barCount:before{content:"8%"}.webpLoader__barProgress[data-percent="9"] .webpLoader__barCount:before{content:"9%"}.webpLoader__barProgress[data-percent="10"] .webpLoader__barCount:before{content:"10%"}.webpLoader__barProgress[data-percent="11"] .webpLoader__barCount:before{content:"11%"}.webpLoader__barProgress[data-percent="12"] .webpLoader__barCount:before{content:"12%"}.webpLoader__barProgress[data-percent="13"] .webpLoader__barCount:before{content:"13%"}.webpLoader__barProgress[data-percent="14"] .webpLoader__barCount:before{content:"14%"}.webpLoader__barProgress[data-percent="15"] .webpLoader__barCount:before{content:"15%"}.webpLoader__barProgress[data-percent="16"] .webpLoader__barCount:before{content:"16%"}.webpLoader__barProgress[data-percent="17"] .webpLoader__barCount:before{content:"17%"}.webpLoader__barProgress[data-percent="18"] .webpLoader__barCount:before{content:"18%"}.webpLoader__barProgress[data-percent="19"] .webpLoader__barCount:before{content:"19%"}.webpLoader__barProgress[data-percent="20"] .webpLoader__barCount:before{content:"20%"}.webpLoader__barProgress[data-percent="21"] .webpLoader__barCount:before{content:"21%"}.webpLoader__barProgress[data-percent="22"] .webpLoader__barCount:before{content:"22%"}.webpLoader__barProgress[data-percent="23"] .webpLoader__barCount:before{content:"23%"}.webpLoader__barProgress[data-percent="24"] .webpLoader__barCount:before{content:"24%"}.webpLoader__barProgress[data-percent="25"] .webpLoader__barCount:before{content:"25%"}.webpLoader__barProgress[data-percent="26"] .webpLoader__barCount:before{content:"26%"}.webpLoader__barProgress[data-percent="27"] .webpLoader__barCount:before{content:"27%"}.webpLoader__barProgress[data-percent="28"] .webpLoader__barCount:before{content:"28%"}.webpLoader__barProgress[data-percent="29"] .webpLoader__barCount:before{content:"29%"}.webpLoader__barProgress[data-percent="30"] .webpLoader__barCount:before{content:"30%"}.webpLoader__barProgress[data-percent="31"] .webpLoader__barCount:before{content:"31%"}.webpLoader__barProgress[data-percent="32"] .webpLoader__barCount:before{content:"32%"}.webpLoader__barProgress[data-percent="33"] .webpLoader__barCount:before{content:"33%"}.webpLoader__barProgress[data-percent="34"] .webpLoader__barCount:before{content:"34%"}.webpLoader__barProgress[data-percent="35"] .webpLoader__barCount:before{content:"35%"}.webpLoader__barProgress[data-percent="36"] .webpLoader__barCount:before{content:"36%"}.webpLoader__barProgress[data-percent="37"] .webpLoader__barCount:before{content:"37%"}.webpLoader__barProgress[data-percent="38"] .webpLoader__barCount:before{content:"38%"}.webpLoader__barProgress[data-percent="39"] .webpLoader__barCount:before{content:"39%"}.webpLoader__barProgress[data-percent="40"] .webpLoader__barCount:before{content:"40%"}.webpLoader__barProgress[data-percent="41"] .webpLoader__barCount:before{content:"41%"}.webpLoader__barProgress[data-percent="42"] .webpLoader__barCount:before{content:"42%"}.webpLoader__barProgress[data-percent="43"] .webpLoader__barCount:before{content:"43%"}.webpLoader__barProgress[data-percent="44"] .webpLoader__barCount:before{content:"44%"}.webpLoader__barProgress[data-percent="45"] .webpLoader__barCount:before{content:"45%"}.webpLoader__barProgress[data-percent="46"] .webpLoader__barCount:before{content:"46%"}.webpLoader__barProgress[data-percent="47"] .webpLoader__barCount:before{content:"47%"}.webpLoader__barProgress[data-percent="48"] .webpLoader__barCount:before{content:"48%"}.webpLoader__barProgress[data-percent="49"] .webpLoader__barCount:before{content:"49%"}.webpLoader__barProgress[data-percent="50"] .webpLoader__barCount:before{content:"50%"}.webpLoader__barProgress[data-percent="51"] .webpLoader__barCount:before{content:"51%"}.webpLoader__barProgress[data-percent="52"] .webpLoader__barCount:before{content:"52%"}.webpLoader__barProgress[data-percent="53"] .webpLoader__barCount:before{content:"53%"}.webpLoader__barProgress[data-percent="54"] .webpLoader__barCount:before{content:"54%"}.webpLoader__barProgress[data-percent="55"] .webpLoader__barCount:before{content:"55%"}.webpLoader__barProgress[data-percent="56"] .webpLoader__barCount:before{content:"56%"}.webpLoader__barProgress[data-percent="57"] .webpLoader__barCount:before{content:"57%"}.webpLoader__barProgress[data-percent="58"] .webpLoader__barCount:before{content:"58%"}.webpLoader__barProgress[data-percent="59"] .webpLoader__barCount:before{content:"59%"}.webpLoader__barProgress[data-percent="60"] .webpLoader__barCount:before{content:"60%"}.webpLoader__barProgress[data-percent="61"] .webpLoader__barCount:before{content:"61%"}.webpLoader__barProgress[data-percent="62"] .webpLoader__barCount:before{content:"62%"}.webpLoader__barProgress[data-percent="63"] .webpLoader__barCount:before{content:"63%"}.webpLoader__barProgress[data-percent="64"] .webpLoader__barCount:before{content:"64%"}.webpLoader__barProgress[data-percent="65"] .webpLoader__barCount:before{content:"65%"}.webpLoader__barProgress[data-percent="66"] .webpLoader__barCount:before{content:"66%"}.webpLoader__barProgress[data-percent="67"] .webpLoader__barCount:before{content:"67%"}.webpLoader__barProgress[data-percent="68"] .webpLoader__barCount:before{content:"68%"}.webpLoader__barProgress[data-percent="69"] .webpLoader__barCount:before{content:"69%"}.webpLoader__barProgress[data-percent="70"] .webpLoader__barCount:before{content:"70%"}.webpLoader__barProgress[data-percent="71"] .webpLoader__barCount:before{content:"71%"}.webpLoader__barProgress[data-percent="72"] .webpLoader__barCount:before{content:"72%"}.webpLoader__barProgress[data-percent="73"] .webpLoader__barCount:before{content:"73%"}.webpLoader__barProgress[data-percent="74"] .webpLoader__barCount:before{content:"74%"}.webpLoader__barProgress[data-percent="75"] .webpLoader__barCount:before{content:"75%"}.webpLoader__barProgress[data-percent="76"] .webpLoader__barCount:before{content:"76%"}.webpLoader__barProgress[data-percent="77"] .webpLoader__barCount:before{content:"77%"}.webpLoader__barProgress[data-percent="78"] .webpLoader__barCount:before{content:"78%"}.webpLoader__barProgress[data-percent="79"] .webpLoader__barCount:before{content:"79%"}.webpLoader__barProgress[data-percent="80"] .webpLoader__barCount:before{content:"80%"}.webpLoader__barProgress[data-percent="81"] .webpLoader__barCount:before{content:"81%"}.webpLoader__barProgress[data-percent="82"] .webpLoader__barCount:before{content:"82%"}.webpLoader__barProgress[data-percent="83"] .webpLoader__barCount:before{content:"83%"}.webpLoader__barProgress[data-percent="84"] .webpLoader__barCount:before{content:"84%"}.webpLoader__barProgress[data-percent="85"] .webpLoader__barCount:before{content:"85%"}.webpLoader__barProgress[data-percent="86"] .webpLoader__barCount:before{content:"86%"}.webpLoader__barProgress[data-percent="87"] .webpLoader__barCount:before{content:"87%"}.webpLoader__barProgress[data-percent="88"] .webpLoader__barCount:before{content:"88%"}.webpLoader__barProgress[data-percent="89"] .webpLoader__barCount:before{content:"89%"}.webpLoader__barProgress[data-percent="90"] .webpLoader__barCount:before{content:"90%"}.webpLoader__barProgress[data-percent="91"] .webpLoader__barCount:before{content:"91%"}.webpLoader__barProgress[data-percent="92"] .webpLoader__barCount:before{content:"92%"}.webpLoader__barProgress[data-percent="93"] .webpLoader__barCount:before{content:"93%"}.webpLoader__barProgress[data-percent="94"] .webpLoader__barCount:before{content:"94%"}.webpLoader__barProgress[data-percent="95"] .webpLoader__barCount:before{content:"95%"}.webpLoader__barProgress[data-percent="96"] .webpLoader__barCount:before{content:"96%"}.webpLoader__barProgress[data-percent="97"] .webpLoader__barCount:before{content:"97%"}.webpLoader__barProgress[data-percent="98"] .webpLoader__barCount:before{content:"98%"}.webpLoader__barProgress[data-percent="99"] .webpLoader__barCount:before{content:"99%"}.webpLoader__barProgress[data-percent="100"] .webpLoader__barCount:before{content:"100%"}.webpLoader__progress{font-size:14px;line-height:1.5714285714;margin-bottom:-10px;padding:4px 0}.webpLoader__progressValue{font-weight:500}.webpLoader__success{margin-top:20px;padding:4px 0 4px 20px;position:relative}.webpLoader__success:before{background-color:#00a32a;content:"";height:100%;left:0;position:absolute;top:0;width:2px}.webpLoader__successContent{color:#00a32a;font-size:14px;font-weight:500;line-height:1.5714285714}.webpLoader__successContent a{color:inherit}.webpLoader__errors{border-left:2px solid #c3c4c7;margin-top:20px}.webpLoader__errorsTitle{background-color:#c3c4c7;color:#fff;display:inline-block;font-size:14px;line-height:1.5714285714;padding:4px 22px}.webpLoader__errorsContent{padding:10px 0 10px 20px}.webpLoader__errorsContent>p{font-size:12px;line-height:1.75;margin:0;max-width:100%}.webpLoader__errorsContent>p.webpLoader__errorsContentError{color:#d63638;font-size:14px;font-weight:500;line-height:1.5714285714}.webpLoader__errorsContent pre{font-size:12px;line-height:1.75;white-space:normal}.webpLoader__button--disabled{opacity:.25!important;pointer-events:none}.webpPopup{margin-top:20px}.webpPopup__inner{background-color:#fff;border:1px solid #c3c4c7;display:flex;flex-wrap:wrap}.webpPopup__image{background-image:url(../../img/author.png);background-position:50%;background-repeat:no-repeat;background-size:cover;width:152px}.webpPopup__content{border-left:1px solid #c3c4c7;flex:1;padding:10px 20px}.webpServerInfo{color:#222;text-align:center}.webpServerInfo pre{font-family:monospace;margin:0}.webpServerInfo h1,.webpServerInfo h2{display:none}.webpServerInfo p{max-width:100%}.webpServerInfo table{border:0;border-collapse:collapse;margin:10px auto;width:100%}.webpServerInfo td,.webpServerInfo th{border:1px solid #666;font-family:monospace;font-size:12px;line-height:1.75;padding:4px 5px;text-align:center;vertical-align:baseline}.webpServerInfo .p{text-align:left}.webpServerInfo .e{background-color:#ccf;font-weight:700;width:300px}.webpServerInfo .h{background-color:#99c;font-weight:700}.webpServerInfo .v{word-wrap:break-word;background-color:#ddd;max-width:300px;overflow-x:auto}.webpServerInfo .v i{color:#999}.webpServerInfo img{border:0;float:right}@media screen and (max-width:1280px){.webpPage__columns{margin:0 -15px}.webpPage__column{padding:0 15px}.webpPage__widget+.webpPage__widget{margin-top:30px}}@media screen and (max-width:1024px){.webpPage__column--large{width:100%}.webpPage__column--small{margin-top:40px;width:100%}.webpPage__widgetColumns{display:block}.webpPage__widgetColumn{width:100%}}@media screen and (max-width:782px){.webpPage{padding-right:0}.webpPage__quality{display:block}.webpPage__qualityItem{border-left:0}.webpPage__qualityItem+.webpPage__qualityItem{border-top:1px solid #c3c4c7}.webpContent--author{background:none;margin-left:0;padding-left:30px}.webpInput{display:block}.webpInput__field{width:100%}.webpInput__button{margin:10px 0 0!important}.webpPopup__inner{border:1px solid #c3c4c7;display:block}.webpPopup__image{height:152px;margin:20px auto 0}.webpPopup__content{border-left:0}}
|
@@ -1 +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,d=e.headers,h=e.responseType;n.isFormData(l)&&delete d["Content-Type"];var p=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",g=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";d.Authorization="Basic "+btoa(m+":"+g)}var v=a(e.baseURL,e.url);function _(){if(p){var n="getAllResponseHeaders"in p?u(p.getAllResponseHeaders()):null,i={data:h&&"text"!==h&&"json"!==h?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(v,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(v))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;b&&(d[e.xsrfHeaderName]=b)}"setRequestHeader"in p&&n.forEach(d,(function(e,t){void 0===l&&"content-type"===t.toLowerCase()?delete d[t]:p.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),h&&"json"!==h&&(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 d=r.shift(),h=r.shift();try{l=d(l)}catch(e){h(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}}},917: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.section=document.querySelector("[data-calculate-widget]"),this.section)return this.button=this.section.querySelector("[data-calculate-widget-button]"),this.loading=this.section.querySelector("[data-calculate-widget-loading]"),this.output=this.section.querySelector("[data-calculate-widget-output]"),this.settings={ajax:{url_calculation:this.section.getAttribute("data-calculate-widget-api")}},!0}},{key:"set_events",value:function(){this.button.addEventListener("click",this.init_calculation.bind(this))}},{key:"init_calculation",value:function(e){e.preventDefault(),this.button.setAttribute("hidden","hidden"),this.output.setAttribute("hidden","hidden"),this.loading.removeAttribute("hidden"),this.send_request_for_calculation()}},{key:"send_request_for_calculation",value:function(){var e=this,t=this.settings.ajax.url_calculation,r=new Date;o()({method:"GET",url:t}).then((function(t){e.loading.setAttribute("hidden","hidden"),e.output.innerText=t.data.value_output,e.output.removeAttribute("hidden","hidden")})).catch((function(t){if(e.button.removeAttribute("hidden"),e.loading.setAttribute("hidden","hidden"),t.response){var n=(new Date-r)/1e3,o=t.response.status,i=JSON.stringify(t.response.data);e.output.innerText="HTTP Error ".concat(o," (").concat(n,"s): ").concat(i),e.output.removeAttribute("hidden","hidden")}}))}}])&&i(t.prototype,r),n&&i(t,n),e}();function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(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 c=function(){function e(t){a(this,e),this.input_toggle=t,this.set_vars()&&this.set_events()}var t,r,n;return t=e,(r=[{key:"set_vars",value:function(){var e=this.input_toggle.getAttribute("data-inputs-group-toggle");return this.inputs=document.querySelectorAll('[data-inputs-group-input="'.concat(e,'"]')),!!this.inputs.length}},{key:"set_events",value:function(){this.input_toggle.addEventListener("change",this.toggle_inputs.bind(this))}},{key:"toggle_inputs",value:function(e){for(var t=this.inputs.length,r=0;r<t;r++)this.input_toggle.checked?this.inputs[r].removeAttribute("readonly"):this.inputs[r].setAttribute("readonly","readonly")}}])&&u(t.prototype,r),n&&u(t,n),e}(),f=function e(){a(this,e);for(var t=document.querySelectorAll("[data-inputs-group-toggle]"),r=t.length,n=0;n<r;n++)new c(t[n])};function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(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 h=function(){function e(t){l(this,e),this.notice=t,this.set_vars()&&this.set_events()}var t,r,n;return t=e,(r=[{key:"set_vars",value:function(){return this.settings={ajax_action:this.notice.getAttribute("data-notice-action"),ajax_url:this.notice.getAttribute("data-notice-url"),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}}])&&d(t.prototype,r),n&&d(t,n),e}(),p=function e(){l(this,e);for(var t=document.querySelectorAll('.notice[data-notice="webp-converter-for-media"][data-notice-action]'),r=t.length,n=0;n<r;n++)new h(t[n])};function m(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 g=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__progressValue--size"),this.progress_successful=this.section.querySelector(".webpLoader__progressValue--successful"),this.progress_failed=this.section.querySelector(".webpLoader__progressValue--failed"),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},files:{all:0,converted:0},errors:0},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"],max_errors:1e3,connection_timeout:6e4},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:{regenerate_force:this.option_force.checked?1:0}}).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:"regenerate_next_images",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(0===this.data.max&&this.update_progress(),!(this.data.count>=this.data.max)){e&&this.data.count--;var t=this.data.items[this.data.count];this.data.count++,this.send_request_for_regeneration(t)}}},{key:"send_request_for_regeneration",value:function(e){var t=this,r=this.settings.ajax.url_regenerate;o()({method:"POST",url:r,data:{regenerate_force:this.option_force.checked?1:0,paths:e},timeout:this.settings.connection_timeout}).then((function(e){var r=e.data.is_fatal_error;t.update_errors(e.data.errors,r),r||(t.update_size(e.data),t.update_files_count(e.data),t.update_progress(),t.regenerate_next_images())})).catch((function(r){r.response?(t.catch_request_error(r,!1,e),setTimeout(t.regenerate_next_images.bind(t),1e3)):setTimeout(t.regenerate_next_images.bind(t,!0),1e3)}))}},{key:"update_errors",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.data.errors>this.settings.max_errors&&(this.data.errors=0,this.errors_inner.innerHTML="");for(var r=this.get_date(),n=0;n<e.length;n++)this.print_error_message(e[n],t,!1,r),this.data.errors++;t&&this.set_fatal_error()}},{key:"get_date",value:function(){var e=new Date,t=("0"+e.getHours()).substr(-2),r=("0"+e.getMinutes()).substr(-2),n=("0"+e.getSeconds()).substr(-2);return"".concat(t,":").concat(r,":").concat(n)}},{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,!1),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,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=document.createElement("p"),i=n||this.get_date();if(r){var s=document.createElement("pre");s.innerText=e,o.appendChild(s)}else o.innerHTML="<strong>".concat(i,"</strong> - ").concat(e);t&&o.classList.add(this.classes.error_message),this.errors.removeAttribute("hidden"),this.errors_inner.appendChild(o)}},{key:"update_size",value:function(e){var t=this.data.size;t.before+=e.size.before,t.after+=e.size.after;var r=t.before-t.after;if(r<0&&(r=0),0!==r){var n=Math.round(100*(1-t.after/t.before));n<0&&(n=0);var o=-1;do{o++,r/=1024}while(r>1024);var i=r.toFixed(2),s=this.settings.units[o];this.progress_size.innerHTML="".concat(i," ").concat(s," (").concat(n,"%)")}}},{key:"update_files_count",value:function(e){var t=this.data.files;t.all+=e.files.all,t.converted+=e.files.converted,this.progress_successful.innerText=t.converted,this.progress_failed.innerText=t.all-t.converted}},{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())}}])&&m(t.prototype,r),n&&m(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 p,new g,new s,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&&d())}function d(){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 h(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 h(e,t)),1!==u.length||c||s(d)},h.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(917)}));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),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,d=e.headers,h=e.responseType;n.isFormData(l)&&delete d["Content-Type"];var p=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",g=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";d.Authorization="Basic "+btoa(m+":"+g)}var v=a(e.baseURL,e.url);function _(){if(p){var n="getAllResponseHeaders"in p?u(p.getAllResponseHeaders()):null,i={data:h&&"text"!==h&&"json"!==h?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(v,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(v))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;b&&(d[e.xsrfHeaderName]=b)}"setRequestHeader"in p&&n.forEach(d,(function(e,t){void 0===l&&"content-type"===t.toLowerCase()?delete d[t]:p.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),h&&"json"!==h&&(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 d=r.shift(),h=r.shift();try{l=d(l)}catch(e){h(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}}},917: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.section=document.querySelector("[data-calculate-widget]"),this.section)return this.button=this.section.querySelector("[data-calculate-widget-button]"),this.loading=this.section.querySelector("[data-calculate-widget-loading]"),this.output=this.section.querySelector("[data-calculate-widget-output]"),this.settings={ajax:{url_calculation:this.section.getAttribute("data-calculate-widget-api")}},!0}},{key:"set_events",value:function(){this.button.addEventListener("click",this.init_calculation.bind(this))}},{key:"init_calculation",value:function(e){e.preventDefault(),this.button.setAttribute("hidden","hidden"),this.output.setAttribute("hidden","hidden"),this.loading.removeAttribute("hidden"),this.send_request_for_calculation()}},{key:"send_request_for_calculation",value:function(){var e=this,t=this.settings.ajax.url_calculation,r=new Date;o()({method:"GET",url:t}).then((function(t){e.loading.setAttribute("hidden","hidden"),e.output.innerText=t.data.value_output,e.output.removeAttribute("hidden","hidden")})).catch((function(t){if(e.button.removeAttribute("hidden"),e.loading.setAttribute("hidden","hidden"),t.response){var n=(new Date-r)/1e3,o=t.response.status,i=JSON.stringify(t.response.data);e.output.innerText="HTTP Error ".concat(o," (").concat(n,"s): ").concat(i),e.output.removeAttribute("hidden","hidden")}}))}}])&&i(t.prototype,r),n&&i(t,n),e}();function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(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 c=function(){function e(t){a(this,e),this.input_toggle=t,this.set_vars()&&this.set_events()}var t,r,n;return t=e,(r=[{key:"set_vars",value:function(){var e=this.input_toggle.getAttribute("data-inputs-group-toggle");return this.inputs=document.querySelectorAll('[data-inputs-group-input="'.concat(e,'"]')),!!this.inputs.length}},{key:"set_events",value:function(){this.input_toggle.addEventListener("change",this.toggle_inputs.bind(this))}},{key:"toggle_inputs",value:function(e){for(var t=this.inputs.length,r=0;r<t;r++)this.input_toggle.checked?this.inputs[r].removeAttribute("readonly"):this.inputs[r].setAttribute("readonly","readonly")}}])&&u(t.prototype,r),n&&u(t,n),e}(),f=function e(){a(this,e);for(var t=document.querySelectorAll("[data-inputs-group-toggle]"),r=t.length,n=0;n<r;n++)new c(t[n])};function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(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 h=function(){function e(t){l(this,e),this.notice=t,this.set_vars()&&this.set_events()}var t,r,n;return t=e,(r=[{key:"set_vars",value:function(){return this.settings={ajax_action:this.notice.getAttribute("data-notice-action"),ajax_url:this.notice.getAttribute("data-notice-url"),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}}])&&d(t.prototype,r),n&&d(t,n),e}(),p=function e(){l(this,e);for(var t=document.querySelectorAll('.notice[data-notice="webp-converter-for-media"][data-notice-action]'),r=t.length,n=0;n<r;n++)new h(t[n])};function m(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 g=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__progressValue--size"),this.progress_successful=this.section.querySelector(".webpLoader__progressValue--successful"),this.progress_failed=this.section.querySelector(".webpLoader__progressValue--failed"),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},files:{all:0,converted:0},errors:0},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"],max_errors:1e3,connection_timeout:6e4},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:{regenerate_force:this.option_force.checked?1:0}}).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:"regenerate_next_images",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(0===this.data.max&&this.update_progress(),!(this.data.count>=this.data.max)){e>3?e=0:e>0&&this.data.count--;var t=this.data.items[this.data.count];this.data.count++,this.send_request_for_regeneration(t,e)}}},{key:"send_request_for_regeneration",value:function(e,t){var r=this,n=this.settings.ajax.url_regenerate;o()({method:"POST",url:n,data:{regenerate_force:this.option_force.checked?1:0,paths:e},timeout:this.settings.connection_timeout}).then((function(e){var t=e.data.is_fatal_error;r.update_errors(e.data.errors,t),t||(r.update_size(e.data),r.update_files_count(e.data),r.update_progress(),r.regenerate_next_images())})).catch((function(n){n.response?(r.catch_request_error(n,!1,e),setTimeout(r.regenerate_next_images.bind(r),1e3)):setTimeout(r.regenerate_next_images.bind(r,t+1),1e3)}))}},{key:"update_errors",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.data.errors>this.settings.max_errors&&(this.data.errors=0,this.errors_inner.innerHTML="");for(var r=this.get_date(),n=0;n<e.length;n++)this.print_error_message(e[n],t,!1,r),this.data.errors++;t&&this.set_fatal_error()}},{key:"get_date",value:function(){var e=new Date,t=("0"+e.getHours()).substr(-2),r=("0"+e.getMinutes()).substr(-2),n=("0"+e.getSeconds()).substr(-2);return"".concat(t,":").concat(r,":").concat(n)}},{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,!1),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,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=document.createElement("p"),i=n||this.get_date();if(r){var s=document.createElement("pre");s.innerText=e,o.appendChild(s)}else o.innerHTML="<strong>".concat(i,"</strong> - ").concat(e);t&&o.classList.add(this.classes.error_message),this.errors.removeAttribute("hidden"),this.errors_inner.appendChild(o)}},{key:"update_size",value:function(e){var t=this.data.size;t.before+=e.size.before,t.after+=e.size.after;var r=t.before-t.after;if(r<0&&(r=0),0!==r){var n=Math.round(100*(1-t.after/t.before));n<0&&(n=0);var o=-1;do{o++,r/=1024}while(r>1024);var i=r.toFixed(2),s=this.settings.units[o];this.progress_size.innerHTML="".concat(i," ").concat(s," (").concat(n,"%)")}}},{key:"update_files_count",value:function(e){var t=this.data.files;t.all+=e.files.all,t.converted+=e.files.converted,this.progress_successful.innerText=t.converted,this.progress_failed.innerText=t.all-t.converted}},{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())}}])&&m(t.prototype,r),n&&m(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 p,new g,new s,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&&d())}function d(){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 h(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 h(e,t)),1!==u.length||c||s(d)},h.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(917)}));var o=n.O(void 0,[505],(function(){return n(694)}));o=n.O(o)}();
|
@@ -1,5 +1,19 @@
|
|
1 |
== Changelog ==
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 4.4.1 (2022-06-30) =
|
4 |
* `[Added]` Inheritance of mod_rewrite rules from parent directories
|
5 |
* `[Added]` Support for custom /wp-content directory name
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 4.5.0 (2022-07-15) =
|
4 |
+
* `[Changed]` Plugin name from "WebP Converter to Media" to "Converter for Media"
|
5 |
+
* `[Removed]` "Browser Caching for files in output formats" option in plugin settings (will be active always)
|
6 |
+
* `[Removed]` "Force redirections to output formats for all domains" option in plugin settings (will be active always)
|
7 |
+
* `[Fixed]` Error handling about unreadable source or output path
|
8 |
+
* `[Changed]` Error message for bypassing_apache error in server configuration
|
9 |
+
* `[Changed]` Error message for rewrites_not_executed error in server configuration
|
10 |
+
* `[Added]` Limit of 3 attempts to image regeneration to avoid infinity loops
|
11 |
+
* `[Added]` Debug information about saved plugin data
|
12 |
+
* `[Added]` Notification asking to clear cache for Cloudways
|
13 |
+
* `[Added]` Action `webpc_after_conversion` to operation on output path after image conversion
|
14 |
+
* `[Added]` Filter `webpc_htaccess_mod_rewrite_inherit` to disable mod_rewrite inheritance
|
15 |
+
* `[Added]` Filter `webpc_htaccess_mod_rewrite_referer` to disable redirections to output formats for other domains
|
16 |
+
|
17 |
= 4.4.1 (2022-06-30) =
|
18 |
* `[Added]` Inheritance of mod_rewrite rules from parent directories
|
19 |
* `[Added]` Support for custom /wp-content directory name
|
@@ -301,7 +301,6 @@ and add this code *(add these lines at the beginning of the `server { ... }` blo
|
|
301 |
``
|
302 |
`location ~ /wp-content/(?<path>.+)\.(?<ext>jpe?g|png|gif|webp)$ {`
|
303 |
` add_header Vary Accept;`
|
304 |
-
` add_header Cache-Control "private" always;`
|
305 |
` expires 365d;`
|
306 |
` try_files`
|
307 |
` /wp-content/uploads-webpc/$path.$ext$ext_avif`
|
@@ -310,7 +309,7 @@ and add this code *(add these lines at the beginning of the `server { ... }` blo
|
|
310 |
`}`
|
311 |
`# END WebP Converter for Media`
|
312 |
|
313 |
-
Then
|
314 |
- `/etc/nginx/mime.types`
|
315 |
|
316 |
and add this code *(add these lines inside the `types { ... }` block)*:
|
@@ -331,14 +330,19 @@ In case of problems, please contact us in [the support forum](https://wordpress.
|
|
331 |
|
332 |
== Changelog ==
|
333 |
|
334 |
-
= 4.
|
335 |
-
* `[
|
336 |
-
* `[
|
337 |
-
|
338 |
-
|
339 |
-
* `[Changed]`
|
340 |
-
* `[
|
341 |
-
* `[Added]`
|
|
|
|
|
|
|
|
|
|
|
342 |
|
343 |
See [changelog.txt](https://plugins.svn.wordpress.org/webp-converter-for-media/trunk/changelog.txt) for previous versions.
|
344 |
|
301 |
``
|
302 |
`location ~ /wp-content/(?<path>.+)\.(?<ext>jpe?g|png|gif|webp)$ {`
|
303 |
` add_header Vary Accept;`
|
|
|
304 |
` expires 365d;`
|
305 |
` try_files`
|
306 |
` /wp-content/uploads-webpc/$path.$ext$ext_avif`
|
309 |
`}`
|
310 |
`# END WebP Converter for Media`
|
311 |
|
312 |
+
**Then add support for the required MIME types**, if they are not supported. Edit the configuration file:
|
313 |
- `/etc/nginx/mime.types`
|
314 |
|
315 |
and add this code *(add these lines inside the `types { ... }` block)*:
|
330 |
|
331 |
== Changelog ==
|
332 |
|
333 |
+
= 4.5.0 (2022-07-15) =
|
334 |
+
* `[Changed]` Plugin name from "WebP Converter to Media" to "Converter for Media"
|
335 |
+
* `[Removed]` "Browser Caching for files in output formats" option in plugin settings (will be active always)
|
336 |
+
* `[Removed]` "Force redirections to output formats for all domains" option in plugin settings (will be active always)
|
337 |
+
* `[Fixed]` Error handling about unreadable source or output path
|
338 |
+
* `[Changed]` Error message for bypassing_apache error in server configuration
|
339 |
+
* `[Changed]` Error message for rewrites_not_executed error in server configuration
|
340 |
+
* `[Added]` Limit of 3 attempts to image regeneration to avoid infinity loops
|
341 |
+
* `[Added]` Debug information about saved plugin data
|
342 |
+
* `[Added]` Notification asking to clear cache for Cloudways
|
343 |
+
* `[Added]` Action `webpc_after_conversion` to operation on output path after image conversion
|
344 |
+
* `[Added]` Filter `webpc_htaccess_mod_rewrite_inherit` to disable mod_rewrite inheritance
|
345 |
+
* `[Added]` Filter `webpc_htaccess_mod_rewrite_referer` to disable redirections to output formats for other domains
|
346 |
|
347 |
See [changelog.txt](https://plugins.svn.wordpress.org/webp-converter-for-media/trunk/changelog.txt) for previous versions.
|
348 |
|
@@ -28,14 +28,21 @@ class CronInitiator {
|
|
28 |
*/
|
29 |
private $cron_status_manager;
|
30 |
|
|
|
|
|
|
|
|
|
|
|
31 |
public function __construct(
|
32 |
PluginData $plugin_data,
|
33 |
TokenRepository $token_repository,
|
34 |
-
CronStatusManager $cron_status_manager = null
|
|
|
35 |
) {
|
36 |
$this->plugin_data = $plugin_data;
|
37 |
$this->token_repository = $token_repository;
|
38 |
$this->cron_status_manager = $cron_status_manager ?: new CronStatusManager();
|
|
|
39 |
}
|
40 |
|
41 |
public function refresh_paths_to_conversion( bool $force_init = false ): bool {
|
@@ -50,7 +57,7 @@ class CronInitiator {
|
|
50 |
|
51 |
$this->cron_status_manager->set_conversion_status_locked( true, true );
|
52 |
|
53 |
-
$paths =
|
54 |
$this->cron_status_manager->set_paths_to_conversion( $paths, $cron_enabled );
|
55 |
$this->cron_status_manager->set_paths_skipped( ( $cron_enabled ) ? $paths : [] );
|
56 |
|
@@ -65,8 +72,10 @@ class CronInitiator {
|
|
65 |
* @return void
|
66 |
*/
|
67 |
public function add_paths_to_conversion( array $new_paths ) {
|
68 |
-
$paths
|
69 |
-
$this->
|
|
|
|
|
70 |
}
|
71 |
|
72 |
/**
|
28 |
*/
|
29 |
private $cron_status_manager;
|
30 |
|
31 |
+
/**
|
32 |
+
* @var PathsFinder
|
33 |
+
*/
|
34 |
+
private $paths_finder;
|
35 |
+
|
36 |
public function __construct(
|
37 |
PluginData $plugin_data,
|
38 |
TokenRepository $token_repository,
|
39 |
+
CronStatusManager $cron_status_manager = null,
|
40 |
+
PathsFinder $paths_finder = null
|
41 |
) {
|
42 |
$this->plugin_data = $plugin_data;
|
43 |
$this->token_repository = $token_repository;
|
44 |
$this->cron_status_manager = $cron_status_manager ?: new CronStatusManager();
|
45 |
+
$this->paths_finder = $paths_finder ?: new PathsFinder( $plugin_data, $token_repository );
|
46 |
}
|
47 |
|
48 |
public function refresh_paths_to_conversion( bool $force_init = false ): bool {
|
57 |
|
58 |
$this->cron_status_manager->set_conversion_status_locked( true, true );
|
59 |
|
60 |
+
$paths = $this->paths_finder->get_paths( true );
|
61 |
$this->cron_status_manager->set_paths_to_conversion( $paths, $cron_enabled );
|
62 |
$this->cron_status_manager->set_paths_skipped( ( $cron_enabled ) ? $paths : [] );
|
63 |
|
72 |
* @return void
|
73 |
*/
|
74 |
public function add_paths_to_conversion( array $new_paths ) {
|
75 |
+
$paths = $this->cron_status_manager->get_paths_to_conversion();
|
76 |
+
$valid_new_paths = $this->paths_finder->skip_converted_paths( $new_paths );
|
77 |
+
|
78 |
+
$this->cron_status_manager->set_paths_to_conversion( array_merge( $valid_new_paths, $paths ) );
|
79 |
}
|
80 |
|
81 |
/**
|
@@ -29,7 +29,7 @@ class CronSchedulesGenerator implements HookableInterface {
|
|
29 |
public function add_cron_interval( array $schedules ): array {
|
30 |
$schedules[ self::CRON_PATHS_SCHEDULE ] = [
|
31 |
'interval' => apply_filters( 'webpc_cron_paths_interval', 3600 ),
|
32 |
-
'display' => '
|
33 |
];
|
34 |
return $schedules;
|
35 |
}
|
29 |
public function add_cron_interval( array $schedules ): array {
|
30 |
$schedules[ self::CRON_PATHS_SCHEDULE ] = [
|
31 |
'interval' => apply_filters( 'webpc_cron_paths_interval', 3600 ),
|
32 |
+
'display' => 'Converter for Media',
|
33 |
];
|
34 |
return $schedules;
|
35 |
}
|
@@ -81,14 +81,14 @@ class FormatFactory {
|
|
81 |
/**
|
82 |
* Returns mime types of output formats.
|
83 |
*
|
84 |
-
* @param string[] $output_formats Extensions of output formats.
|
85 |
*
|
86 |
* @return string[] Mime types of output formats.
|
87 |
*/
|
88 |
-
public function get_mime_types( array $output_formats ): array {
|
89 |
$values = [];
|
90 |
foreach ( $this->formats as $format ) {
|
91 |
-
if ( ! in_array( $format->get_extension(), $output_formats ) ) {
|
92 |
continue;
|
93 |
}
|
94 |
$values[ $format->get_extension() ] = $format->get_mime_type();
|
81 |
/**
|
82 |
* Returns mime types of output formats.
|
83 |
*
|
84 |
+
* @param string[]|null $output_formats Extensions of output formats.
|
85 |
*
|
86 |
* @return string[] Mime types of output formats.
|
87 |
*/
|
88 |
+
public function get_mime_types( array $output_formats = null ): array {
|
89 |
$values = [];
|
90 |
foreach ( $this->formats as $format ) {
|
91 |
+
if ( ( $output_formats !== null ) && ! in_array( $format->get_extension(), $output_formats ) ) {
|
92 |
continue;
|
93 |
}
|
94 |
$values[ $format->get_extension() ] = $format->get_mime_type();
|
@@ -81,6 +81,7 @@ abstract class LibraryMethodAbstract extends MethodAbstract implements LibraryMe
|
|
81 |
|
82 |
$image = $this->create_image_by_path( $source_path, $plugin_settings );
|
83 |
$this->convert_image_to_output( $image, $source_path, $output_path, $format, $plugin_settings );
|
|
|
84 |
|
85 |
$this->skip_crashed->delete_crashed_file( $output_path );
|
86 |
$this->skip_larger->remove_image_if_is_larger( $output_path, $source_path, $plugin_settings );
|
81 |
|
82 |
$image = $this->create_image_by_path( $source_path, $plugin_settings );
|
83 |
$this->convert_image_to_output( $image, $source_path, $output_path, $format, $plugin_settings );
|
84 |
+
do_action( 'webpc_after_conversion', $output_path, $source_path );
|
85 |
|
86 |
$this->skip_crashed->delete_crashed_file( $output_path );
|
87 |
$this->skip_larger->remove_image_if_is_larger( $output_path, $source_path, $plugin_settings );
|
@@ -168,7 +168,7 @@ abstract class MethodAbstract implements MethodInterface {
|
|
168 |
protected function log_conversion_error( string $error_message, array $plugin_settings ) {
|
169 |
$features = $plugin_settings[ ExtraFeaturesOption::OPTION_NAME ];
|
170 |
if ( in_array( ExtraFeaturesOption::OPTION_VALUE_DEBUG_ENABLED, $features ) ) {
|
171 |
-
error_log( sprintf( '
|
172 |
}
|
173 |
}
|
174 |
}
|
168 |
protected function log_conversion_error( string $error_message, array $plugin_settings ) {
|
169 |
$features = $plugin_settings[ ExtraFeaturesOption::OPTION_NAME ];
|
170 |
if ( in_array( ExtraFeaturesOption::OPTION_VALUE_DEBUG_ENABLED, $features ) ) {
|
171 |
+
error_log( sprintf( 'Converter for Media: %s', $error_message ) ); // phpcs:ignore
|
172 |
}
|
173 |
}
|
174 |
}
|
@@ -117,20 +117,24 @@ class RemoteMethod extends MethodAbstract {
|
|
117 |
$this->server_configurator->set_execution_time();
|
118 |
|
119 |
$output_formats = $plugin_settings[ OutputFormatsOption::OPTION_NAME ];
|
120 |
-
$
|
|
|
|
|
121 |
|
122 |
$this->files_to_conversion += ( count( $paths ) * count( $output_formats ) );
|
123 |
-
if ( ! $file_paths ) {
|
124 |
-
return;
|
125 |
-
}
|
126 |
-
|
127 |
-
$source_paths = [];
|
128 |
-
$output_paths = [];
|
129 |
-
$this->token = $this->token_repository->get_token();
|
130 |
|
131 |
foreach ( $output_formats as $output_format ) {
|
132 |
-
|
133 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
}
|
135 |
|
136 |
if ( ! $regenerate_force ) {
|
@@ -154,6 +158,7 @@ class RemoteMethod extends MethodAbstract {
|
|
154 |
$output_path = $output_paths[ $output_format ][ $path_index ];
|
155 |
|
156 |
file_put_contents( $output_path, $converted_file );
|
|
|
157 |
|
158 |
try {
|
159 |
$this->skip_larger->remove_image_if_is_larger( $output_path, $source_path, $plugin_settings );
|
@@ -189,12 +194,13 @@ class RemoteMethod extends MethodAbstract {
|
|
189 |
/**
|
190 |
* @param string[] $paths .
|
191 |
* @param mixed[] $plugin_settings .
|
|
|
192 |
*
|
193 |
* @return string[]
|
194 |
*
|
195 |
* @throws Exception\SourcePathException
|
196 |
*/
|
197 |
-
private function get_source_paths( array $paths, array $plugin_settings ): array {
|
198 |
$source_paths = [];
|
199 |
foreach ( $paths as $path ) {
|
200 |
$source_path = $this->get_image_source_path( $path );
|
@@ -206,6 +212,11 @@ class RemoteMethod extends MethodAbstract {
|
|
206 |
continue;
|
207 |
}
|
208 |
|
|
|
|
|
|
|
|
|
|
|
209 |
$source_paths[] = $this->get_image_source_path( $path );
|
210 |
}
|
211 |
|
117 |
$this->server_configurator->set_execution_time();
|
118 |
|
119 |
$output_formats = $plugin_settings[ OutputFormatsOption::OPTION_NAME ];
|
120 |
+
$source_paths = [];
|
121 |
+
$output_paths = [];
|
122 |
+
$this->token = $this->token_repository->get_token();
|
123 |
|
124 |
$this->files_to_conversion += ( count( $paths ) * count( $output_formats ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
|
126 |
foreach ( $output_formats as $output_format ) {
|
127 |
+
try {
|
128 |
+
$file_paths = $this->get_source_paths( $paths, $plugin_settings, $output_format );
|
129 |
+
if ( ! $file_paths ) {
|
130 |
+
continue;
|
131 |
+
}
|
132 |
+
|
133 |
+
$output_paths[ $output_format ] = $this->get_output_paths( $file_paths, $output_format );
|
134 |
+
$source_paths[ $output_format ] = $file_paths;
|
135 |
+
} catch ( \Exception $e ) {
|
136 |
+
$this->save_conversion_error( $e->getMessage(), $plugin_settings );
|
137 |
+
}
|
138 |
}
|
139 |
|
140 |
if ( ! $regenerate_force ) {
|
158 |
$output_path = $output_paths[ $output_format ][ $path_index ];
|
159 |
|
160 |
file_put_contents( $output_path, $converted_file );
|
161 |
+
do_action( 'webpc_after_conversion', $output_path, $source_path );
|
162 |
|
163 |
try {
|
164 |
$this->skip_larger->remove_image_if_is_larger( $output_path, $source_path, $plugin_settings );
|
194 |
/**
|
195 |
* @param string[] $paths .
|
196 |
* @param mixed[] $plugin_settings .
|
197 |
+
* @param string $output_format .
|
198 |
*
|
199 |
* @return string[]
|
200 |
*
|
201 |
* @throws Exception\SourcePathException
|
202 |
*/
|
203 |
+
private function get_source_paths( array $paths, array $plugin_settings, string $output_format ): array {
|
204 |
$source_paths = [];
|
205 |
foreach ( $paths as $path ) {
|
206 |
$source_path = $this->get_image_source_path( $path );
|
212 |
continue;
|
213 |
}
|
214 |
|
215 |
+
$path_extension = strtolower( pathinfo( $path, PATHINFO_EXTENSION ) );
|
216 |
+
if ( $path_extension === $output_format ) {
|
217 |
+
continue;
|
218 |
+
}
|
219 |
+
|
220 |
$source_paths[] = $this->get_image_source_path( $path );
|
221 |
}
|
222 |
|
@@ -73,12 +73,10 @@ class PathsFinder {
|
|
73 |
}
|
74 |
|
75 |
/**
|
76 |
-
* Returns list of server paths of source images to be converted.
|
77 |
-
*
|
78 |
* @param bool $skip_converted Skip converted images?
|
79 |
* @param string[]|null $allowed_output_formats List of extensions or use selected in plugin settings.
|
80 |
*
|
81 |
-
* @return string[] Server paths of source images.
|
82 |
*/
|
83 |
public function get_paths( bool $skip_converted = false, array $allowed_output_formats = null ): array {
|
84 |
$allowed_output_formats = $allowed_output_formats
|
@@ -89,30 +87,13 @@ class PathsFinder {
|
|
89 |
return $paths;
|
90 |
}
|
91 |
|
92 |
-
|
93 |
-
$is_converted = true;
|
94 |
-
foreach ( $allowed_output_formats as $output_format ) {
|
95 |
-
$output_path = $this->output_path->get_path( $path, false, $output_format );
|
96 |
-
|
97 |
-
if ( $output_path && $this->is_converted_file( $output_path ) ) {
|
98 |
-
$is_converted = false;
|
99 |
-
break;
|
100 |
-
}
|
101 |
-
}
|
102 |
-
if ( $is_converted ) {
|
103 |
-
unset( $paths[ $path_index ] );
|
104 |
-
}
|
105 |
-
}
|
106 |
-
|
107 |
-
return $paths;
|
108 |
}
|
109 |
|
110 |
/**
|
111 |
-
* Returns number of images to be converted to given output formats.
|
112 |
-
*
|
113 |
* @param string[] $allowed_output_formats List of extensions.
|
114 |
*
|
115 |
-
* @return int[]
|
116 |
*/
|
117 |
public function get_paths_count( array $allowed_output_formats ): array {
|
118 |
$paths = $this->find_source_paths( true );
|
@@ -132,6 +113,34 @@ class PathsFinder {
|
|
132 |
return $values;
|
133 |
}
|
134 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
/**
|
136 |
* Returns list of server paths of source images to be converted.
|
137 |
*
|
73 |
}
|
74 |
|
75 |
/**
|
|
|
|
|
76 |
* @param bool $skip_converted Skip converted images?
|
77 |
* @param string[]|null $allowed_output_formats List of extensions or use selected in plugin settings.
|
78 |
*
|
79 |
+
* @return string[] Server paths of source images to be converted.
|
80 |
*/
|
81 |
public function get_paths( bool $skip_converted = false, array $allowed_output_formats = null ): array {
|
82 |
$allowed_output_formats = $allowed_output_formats
|
87 |
return $paths;
|
88 |
}
|
89 |
|
90 |
+
return $this->skip_converted_paths( $paths, $allowed_output_formats );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
}
|
92 |
|
93 |
/**
|
|
|
|
|
94 |
* @param string[] $allowed_output_formats List of extensions.
|
95 |
*
|
96 |
+
* @return int[] Number of images to be converted to given output formats.
|
97 |
*/
|
98 |
public function get_paths_count( array $allowed_output_formats ): array {
|
99 |
$paths = $this->find_source_paths( true );
|
113 |
return $values;
|
114 |
}
|
115 |
|
116 |
+
/**
|
117 |
+
* @param string[] $source_paths Server paths of source images.
|
118 |
+
* @param string[]|null $allowed_output_formats List of extensions or use selected in plugin settings.
|
119 |
+
*
|
120 |
+
* @return string[] Server paths of source images.
|
121 |
+
*/
|
122 |
+
public function skip_converted_paths( array $source_paths, array $allowed_output_formats = null ): array {
|
123 |
+
$allowed_output_formats = $allowed_output_formats
|
124 |
+
?: $this->plugin_data->get_plugin_settings()[ OutputFormatsOption::OPTION_NAME ];
|
125 |
+
|
126 |
+
foreach ( $source_paths as $path_index => $path ) {
|
127 |
+
$is_converted = true;
|
128 |
+
foreach ( $allowed_output_formats as $output_format ) {
|
129 |
+
$output_path = $this->output_path->get_path( $path, false, $output_format );
|
130 |
+
|
131 |
+
if ( $output_path && $this->is_converted_file( $output_path ) ) {
|
132 |
+
$is_converted = false;
|
133 |
+
break;
|
134 |
+
}
|
135 |
+
}
|
136 |
+
if ( $is_converted ) {
|
137 |
+
unset( $source_paths[ $path_index ] );
|
138 |
+
}
|
139 |
+
}
|
140 |
+
|
141 |
+
return $source_paths;
|
142 |
+
}
|
143 |
+
|
144 |
/**
|
145 |
* Returns list of server paths of source images to be converted.
|
146 |
*
|
@@ -21,30 +21,38 @@ class BypassingApacheNotice implements ErrorNotice {
|
|
21 |
*/
|
22 |
public function get_message(): array {
|
23 |
return [
|
24 |
-
__( 'Requests to images are processed by
|
25 |
implode(
|
26 |
-
'<br>
|
27 |
[
|
28 |
-
__( 'Potential settings in the server or hosting configuration (usually you will find them in your hosting control panel) that may be causing this issue:', 'webp-converter-for-media' ),
|
29 |
sprintf(
|
30 |
-
/* translators: %s:
|
31 |
-
__( '
|
32 |
-
'"
|
|
|
|
|
|
|
33 |
),
|
34 |
sprintf(
|
35 |
-
/* translators: %s: setting name */
|
36 |
-
__( '%s or similar in the section related to
|
37 |
-
'"Nginx Direct Delivery"'
|
|
|
38 |
),
|
39 |
sprintf(
|
40 |
/* translators: %s: setting name */
|
41 |
-
__( '%s or similar
|
42 |
-
'"
|
43 |
),
|
44 |
]
|
45 |
),
|
46 |
-
|
47 |
-
|
|
|
|
|
|
|
|
|
|
|
48 |
];
|
49 |
}
|
50 |
}
|
21 |
*/
|
22 |
public function get_message(): array {
|
23 |
return [
|
24 |
+
__( 'Requests to images are processed by Nginx server bypassing Apache. Please log in to your hosting control panel, go to management of this website and try to find one of the following settings:', 'webp-converter-for-media' ),
|
25 |
implode(
|
26 |
+
'<br>',
|
27 |
[
|
|
|
28 |
sprintf(
|
29 |
+
/* translators: %1$s: button label, %2$s: tab name, %3$s: tab name, %4$s: section name */
|
30 |
+
__( '- for SiteGround hosting click %1$s button on the websites list -> click %2$s and %3$s tab -> find %4$s section', 'webp-converter-for-media' ),
|
31 |
+
'"Site Tools"',
|
32 |
+
'"Speed"',
|
33 |
+
'"Caching"',
|
34 |
+
'"Nginx Direct Delivery"'
|
35 |
),
|
36 |
sprintf(
|
37 |
+
/* translators: %1$s: setting name, %2$s: setting name */
|
38 |
+
__( '- %1$s, %2$s or similar in the section related to Speed or Caching', 'webp-converter-for-media' ),
|
39 |
+
'"Nginx Direct Delivery"',
|
40 |
+
'"Nginx Caching"'
|
41 |
),
|
42 |
sprintf(
|
43 |
/* translators: %s: setting name */
|
44 |
+
__( '- %s or similar in the section related to Apache and Nginx configuration', 'webp-converter-for-media' ),
|
45 |
+
'"Smart static files processing", "Serve static files directly by Nginx"'
|
46 |
),
|
47 |
]
|
48 |
),
|
49 |
+
sprintf(
|
50 |
+
/* translators: %1$s: open strong tag, %2$s: close strong tag */
|
51 |
+
__( '%1$sIf you have any of the above settings active, you must disable them for current website.%2$s Wait a few moments after saving the changes. Optionally, instead of disabling this setting you can remove the following extensions from the list of saved to the cache: .jpg, .jpeg, .png, .gif and .webp.', 'webp-converter-for-media' ),
|
52 |
+
'<strong>',
|
53 |
+
'</strong>'
|
54 |
+
),
|
55 |
+
__( 'In case of problems with finding such settings, please contact your hosting support.', 'webp-converter-for-media' ),
|
56 |
];
|
57 |
}
|
58 |
}
|
@@ -21,8 +21,13 @@ class LibsWithoutWebpSupportNotice implements ErrorNotice {
|
|
21 |
*/
|
22 |
public function get_message(): array {
|
23 |
return [
|
24 |
-
__( '
|
25 |
-
|
|
|
|
|
|
|
|
|
|
|
26 |
__( 'This will allow you to convert your images to WebP without any problems and thus speed up your website.', 'webp-converter-for-media' ),
|
27 |
];
|
28 |
}
|
21 |
*/
|
22 |
public function get_message(): array {
|
23 |
return [
|
24 |
+
__( 'Required GD or Imagick library is installed on your server, but it does not support the WebP format. This means that you cannot convert images to WebP format on your server, because it does not meet the technical requirements of the plugin. This issue is plugin-independent.', 'webp-converter-for-media' ),
|
25 |
+
sprintf(
|
26 |
+
/* translators: %1$s: open strong tag, %2$s: close strong tag */
|
27 |
+
__( '%1$sYou can also use "Remote server" in "Conversion method" field in the plugin settings.%2$s This option allows you to convert your images using a remote server, so your server does not have to meet all technical requirements for libraries.', 'webp-converter-for-media' ),
|
28 |
+
'<strong>',
|
29 |
+
'</strong>'
|
30 |
+
),
|
31 |
__( 'This will allow you to convert your images to WebP without any problems and thus speed up your website.', 'webp-converter-for-media' ),
|
32 |
];
|
33 |
}
|
@@ -24,11 +24,13 @@ class RewritesNotExecutedNotice implements ErrorNotice {
|
|
24 |
$message = [
|
25 |
__( 'Your server does not supports using .htaccess files from custom locations. Or your server requires additional configuration for the plugin to function properly.', 'webp-converter-for-media' ),
|
26 |
sprintf(
|
27 |
-
/* translators: %1$s: server name, %2$s: open strong tag, %3$s: anchor tag, %4$s: close strong tag */
|
28 |
-
__( 'If you are using %1$s server, please contact your hosting support (or server administrator) and send them the following message: %2$s"I am trying to configure
|
29 |
$server_name ?: 'Nginx',
|
30 |
'<br><strong>',
|
|
|
31 |
'<a href="https://wordpress.org/plugins/webp-converter-for-media/faq/" target="_blank">https://wordpress.org/plugins/webp-converter-for-media/faq/</a>',
|
|
|
32 |
'</strong>'
|
33 |
),
|
34 |
];
|
@@ -58,6 +60,8 @@ class RewritesNotExecutedNotice implements ErrorNotice {
|
|
58 |
private function get_nginx_server_name() {
|
59 |
if ( getenv( 'IS_WPE' ) ) {
|
60 |
return 'WP Engine';
|
|
|
|
|
61 |
}
|
62 |
|
63 |
return null;
|
24 |
$message = [
|
25 |
__( 'Your server does not supports using .htaccess files from custom locations. Or your server requires additional configuration for the plugin to function properly.', 'webp-converter-for-media' ),
|
26 |
sprintf(
|
27 |
+
/* translators: %1$s: server name, %2$s: open strong tag, %3$s: home URL, %5$s: anchor tag, %4$s: title of question, %6$s: close strong tag */
|
28 |
+
__( 'If you are using %1$s server, please contact your hosting support (or server administrator) and send them the following message: %2$s"I am trying to configure Converter for Media plugin with WebP and AVIF support. In order to do this, I have been asked to contact you for help adding required rules to Nginx configuration of my website - %3$s. More information in the plugin FAQ: %4$s (in the question: %5$s)"%6$s', 'webp-converter-for-media' ),
|
29 |
$server_name ?: 'Nginx',
|
30 |
'<br><strong>',
|
31 |
+
get_home_url(),
|
32 |
'<a href="https://wordpress.org/plugins/webp-converter-for-media/faq/" target="_blank">https://wordpress.org/plugins/webp-converter-for-media/faq/</a>',
|
33 |
+
'Configuration for Nginx',
|
34 |
'</strong>'
|
35 |
),
|
36 |
];
|
60 |
private function get_nginx_server_name() {
|
61 |
if ( getenv( 'IS_WPE' ) ) {
|
62 |
return 'WP Engine';
|
63 |
+
} elseif ( strpos( $_SERVER['SERVER_SOFTWARE'], 'Flywheel' ) !== false ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput
|
64 |
+
return 'Flywheel';
|
65 |
}
|
66 |
|
67 |
return null;
|
@@ -3,9 +3,7 @@
|
|
3 |
namespace WebpConverter\Loader;
|
4 |
|
5 |
use WebpConverter\Service\PathsGenerator;
|
6 |
-
use WebpConverter\Settings\Option\ExtraFeaturesOption;
|
7 |
use WebpConverter\Settings\Option\LoaderTypeOption;
|
8 |
-
use WebpConverter\Settings\Option\OutputFormatsOption;
|
9 |
use WebpConverter\Settings\Option\SupportedExtensionsOption;
|
10 |
|
11 |
/**
|
@@ -138,7 +136,7 @@ class HtaccessLoader extends LoaderAbstract {
|
|
138 |
$content = $this->add_comments_to_rules(
|
139 |
[
|
140 |
$this->get_mod_mime_rules( $settings ),
|
141 |
-
$this->get_mod_expires_rules(
|
142 |
]
|
143 |
);
|
144 |
|
@@ -179,10 +177,13 @@ class HtaccessLoader extends LoaderAbstract {
|
|
179 |
$output_path .= '/' . $output_path_suffix;
|
180 |
}
|
181 |
|
182 |
-
foreach ( $this->format_factory->get_mime_types(
|
183 |
$content .= '<IfModule mod_rewrite.c>' . PHP_EOL;
|
184 |
$content .= ' RewriteEngine On' . PHP_EOL;
|
185 |
-
|
|
|
|
|
|
|
186 |
foreach ( $settings[ SupportedExtensionsOption::OPTION_NAME ] as $ext ) {
|
187 |
$content .= " RewriteCond %{HTTP_ACCEPT} ${mime_type}" . PHP_EOL;
|
188 |
$content .= " RewriteCond %{REQUEST_FILENAME} -f" . PHP_EOL;
|
@@ -192,7 +193,7 @@ class HtaccessLoader extends LoaderAbstract {
|
|
192 |
$content .= " RewriteCond ${document_root}${output_path}/$1.${ext}.${format} -f [OR]" . PHP_EOL;
|
193 |
$content .= " RewriteCond %{DOCUMENT_ROOT}${root_suffix}${output_path}/$1.${ext}.${format} -f" . PHP_EOL;
|
194 |
}
|
195 |
-
if (
|
196 |
$content .= " RewriteCond %{HTTP_HOST}@@%{HTTP_REFERER} ^([^@]*)@@https?://\\1/.*" . PHP_EOL;
|
197 |
}
|
198 |
$content .= " RewriteRule (.+)\.${ext}$ ${root_suffix}${output_path}/$1.${ext}.${format} [NC,T=${mime_type},L]" . PHP_EOL;
|
@@ -233,19 +234,14 @@ class HtaccessLoader extends LoaderAbstract {
|
|
233 |
/**
|
234 |
* Generates rules for mod_expires.
|
235 |
*
|
236 |
-
* @param mixed[] $settings Plugin settings.
|
237 |
-
*
|
238 |
* @return string Rules for .htaccess file.
|
239 |
*/
|
240 |
-
private function get_mod_expires_rules(
|
241 |
$content = '';
|
242 |
-
if ( ! in_array( ExtraFeaturesOption::OPTION_VALUE_MOD_EXPIRES, $settings[ ExtraFeaturesOption::OPTION_NAME ] ) ) {
|
243 |
-
return $content;
|
244 |
-
}
|
245 |
|
246 |
$content .= '<IfModule mod_expires.c>' . PHP_EOL;
|
247 |
$content .= ' ExpiresActive On' . PHP_EOL;
|
248 |
-
foreach ( $this->format_factory->get_mime_types(
|
249 |
$content .= " ExpiresByType ${mime_type} \"access plus 1 year\"" . PHP_EOL;
|
250 |
}
|
251 |
$content .= '</IfModule>';
|
@@ -267,7 +263,7 @@ class HtaccessLoader extends LoaderAbstract {
|
|
267 |
}
|
268 |
|
269 |
$content .= '<IfModule mod_mime.c>' . PHP_EOL;
|
270 |
-
foreach ( $this->format_factory->get_mime_types(
|
271 |
$content .= " AddType ${mime_type} .${format}" . PHP_EOL;
|
272 |
}
|
273 |
$content .= '</IfModule>';
|
3 |
namespace WebpConverter\Loader;
|
4 |
|
5 |
use WebpConverter\Service\PathsGenerator;
|
|
|
6 |
use WebpConverter\Settings\Option\LoaderTypeOption;
|
|
|
7 |
use WebpConverter\Settings\Option\SupportedExtensionsOption;
|
8 |
|
9 |
/**
|
136 |
$content = $this->add_comments_to_rules(
|
137 |
[
|
138 |
$this->get_mod_mime_rules( $settings ),
|
139 |
+
$this->get_mod_expires_rules(),
|
140 |
]
|
141 |
);
|
142 |
|
177 |
$output_path .= '/' . $output_path_suffix;
|
178 |
}
|
179 |
|
180 |
+
foreach ( $this->format_factory->get_mime_types() as $format => $mime_type ) {
|
181 |
$content .= '<IfModule mod_rewrite.c>' . PHP_EOL;
|
182 |
$content .= ' RewriteEngine On' . PHP_EOL;
|
183 |
+
if ( apply_filters( 'webpc_htaccess_mod_rewrite_inherit', true ) === true ) {
|
184 |
+
$content .= ' RewriteOptions Inherit' . PHP_EOL;
|
185 |
+
}
|
186 |
+
|
187 |
foreach ( $settings[ SupportedExtensionsOption::OPTION_NAME ] as $ext ) {
|
188 |
$content .= " RewriteCond %{HTTP_ACCEPT} ${mime_type}" . PHP_EOL;
|
189 |
$content .= " RewriteCond %{REQUEST_FILENAME} -f" . PHP_EOL;
|
193 |
$content .= " RewriteCond ${document_root}${output_path}/$1.${ext}.${format} -f [OR]" . PHP_EOL;
|
194 |
$content .= " RewriteCond %{DOCUMENT_ROOT}${root_suffix}${output_path}/$1.${ext}.${format} -f" . PHP_EOL;
|
195 |
}
|
196 |
+
if ( apply_filters( 'webpc_htaccess_mod_rewrite_referer', false ) === true ) {
|
197 |
$content .= " RewriteCond %{HTTP_HOST}@@%{HTTP_REFERER} ^([^@]*)@@https?://\\1/.*" . PHP_EOL;
|
198 |
}
|
199 |
$content .= " RewriteRule (.+)\.${ext}$ ${root_suffix}${output_path}/$1.${ext}.${format} [NC,T=${mime_type},L]" . PHP_EOL;
|
234 |
/**
|
235 |
* Generates rules for mod_expires.
|
236 |
*
|
|
|
|
|
237 |
* @return string Rules for .htaccess file.
|
238 |
*/
|
239 |
+
private function get_mod_expires_rules(): string {
|
240 |
$content = '';
|
|
|
|
|
|
|
241 |
|
242 |
$content .= '<IfModule mod_expires.c>' . PHP_EOL;
|
243 |
$content .= ' ExpiresActive On' . PHP_EOL;
|
244 |
+
foreach ( $this->format_factory->get_mime_types() as $format => $mime_type ) {
|
245 |
$content .= " ExpiresByType ${mime_type} \"access plus 1 year\"" . PHP_EOL;
|
246 |
}
|
247 |
$content .= '</IfModule>';
|
263 |
}
|
264 |
|
265 |
$content .= '<IfModule mod_mime.c>' . PHP_EOL;
|
266 |
+
foreach ( $this->format_factory->get_mime_types() as $format => $mime_type ) {
|
267 |
$content .= " AddType ${mime_type} .${format}" . PHP_EOL;
|
268 |
}
|
269 |
$content .= '</IfModule>';
|
@@ -10,9 +10,8 @@ use WebpConverter\Service\OptionsAccessManager;
|
|
10 |
*/
|
11 |
class AvifSupportNotice extends NoticeAbstract implements NoticeInterface {
|
12 |
|
13 |
-
const NOTICE_OPTION
|
14 |
-
const NOTICE_VIEW_PATH
|
15 |
-
const NOTICE_ACTION_NAME = 'webpc_notice_avif_support';
|
16 |
|
17 |
/**
|
18 |
* @var TokenRepository
|
@@ -77,7 +76,7 @@ class AvifSupportNotice extends NoticeAbstract implements NoticeInterface {
|
|
77 |
public function get_vars_for_view(): array {
|
78 |
return [
|
79 |
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
80 |
-
'close_action' => self::
|
81 |
];
|
82 |
}
|
83 |
|
@@ -85,6 +84,6 @@ class AvifSupportNotice extends NoticeAbstract implements NoticeInterface {
|
|
85 |
* {@inheritdoc}
|
86 |
*/
|
87 |
public function get_ajax_action_to_disable(): string {
|
88 |
-
return self::
|
89 |
}
|
90 |
}
|
10 |
*/
|
11 |
class AvifSupportNotice extends NoticeAbstract implements NoticeInterface {
|
12 |
|
13 |
+
const NOTICE_OPTION = 'webpc_notice_avif_support';
|
14 |
+
const NOTICE_VIEW_PATH = 'components/notices/avif-support.php';
|
|
|
15 |
|
16 |
/**
|
17 |
* @var TokenRepository
|
76 |
public function get_vars_for_view(): array {
|
77 |
return [
|
78 |
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
79 |
+
'close_action' => self::NOTICE_OPTION,
|
80 |
];
|
81 |
}
|
82 |
|
84 |
* {@inheritdoc}
|
85 |
*/
|
86 |
public function get_ajax_action_to_disable(): string {
|
87 |
+
return self::NOTICE_OPTION;
|
88 |
}
|
89 |
}
|
@@ -10,9 +10,8 @@ use WebpConverter\Settings\Page\PageIntegration;
|
|
10 |
*/
|
11 |
class CloudflareNotice extends NoticeAbstract implements NoticeInterface {
|
12 |
|
13 |
-
const NOTICE_OPTION
|
14 |
-
const NOTICE_VIEW_PATH
|
15 |
-
const NOTICE_ACTION_NAME = 'webpc_notice_cloudflare';
|
16 |
|
17 |
/**
|
18 |
* {@inheritdoc}
|
@@ -33,6 +32,10 @@ class CloudflareNotice extends NoticeAbstract implements NoticeInterface {
|
|
33 |
*/
|
34 |
public function is_available(): bool {
|
35 |
$cdn_server = strtolower( $_SERVER['HTTP_CDN_LOOP'] ?? '' ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput
|
|
|
|
|
|
|
|
|
36 |
if ( ( strpos( $cdn_server, 'cloudflare' ) !== false ) || is_plugin_active( 'cloudflare/cloudflare.php' ) ) {
|
37 |
return ( isset( $_GET['page'] ) && ( $_GET['page'] === PageIntegration::ADMIN_MENU_PAGE ) ); // phpcs:ignore WordPress.Security.NonceVerification
|
38 |
}
|
@@ -68,7 +71,31 @@ class CloudflareNotice extends NoticeAbstract implements NoticeInterface {
|
|
68 |
public function get_vars_for_view(): array {
|
69 |
return [
|
70 |
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
71 |
-
'close_action' => self::
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
];
|
73 |
}
|
74 |
|
@@ -76,6 +103,6 @@ class CloudflareNotice extends NoticeAbstract implements NoticeInterface {
|
|
76 |
* {@inheritdoc}
|
77 |
*/
|
78 |
public function get_ajax_action_to_disable(): string {
|
79 |
-
return self::
|
80 |
}
|
81 |
}
|
10 |
*/
|
11 |
class CloudflareNotice extends NoticeAbstract implements NoticeInterface {
|
12 |
|
13 |
+
const NOTICE_OPTION = 'webpc_notice_cloudflare';
|
14 |
+
const NOTICE_VIEW_PATH = 'components/notices/clear-cache.php';
|
|
|
15 |
|
16 |
/**
|
17 |
* {@inheritdoc}
|
32 |
*/
|
33 |
public function is_available(): bool {
|
34 |
$cdn_server = strtolower( $_SERVER['HTTP_CDN_LOOP'] ?? '' ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput
|
35 |
+
if ( isset( $_SERVER['KINSTA_CACHE_ZONE'] ) ) {
|
36 |
+
$cdn_server = '';
|
37 |
+
}
|
38 |
+
|
39 |
if ( ( strpos( $cdn_server, 'cloudflare' ) !== false ) || is_plugin_active( 'cloudflare/cloudflare.php' ) ) {
|
40 |
return ( isset( $_GET['page'] ) && ( $_GET['page'] === PageIntegration::ADMIN_MENU_PAGE ) ); // phpcs:ignore WordPress.Security.NonceVerification
|
41 |
}
|
71 |
public function get_vars_for_view(): array {
|
72 |
return [
|
73 |
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
74 |
+
'close_action' => self::NOTICE_OPTION,
|
75 |
+
'service_name' => 'Cloudflare',
|
76 |
+
'steps' => [
|
77 |
+
sprintf(
|
78 |
+
/* translators: %1$s: service name */
|
79 |
+
__( 'Log in to your %1$s dashboard.', 'webp-converter-for-media' ),
|
80 |
+
'Cloudflare'
|
81 |
+
),
|
82 |
+
sprintf(
|
83 |
+
/* translators: %1$s: button label */
|
84 |
+
__( 'Click %1$s.', 'webp-converter-for-media' ),
|
85 |
+
'<strong>"Caching > Configuration"</strong>'
|
86 |
+
),
|
87 |
+
sprintf(
|
88 |
+
/* translators: %1$s: section label, %2$s: button label */
|
89 |
+
__( 'Under %1$s, click %2$s. A warning window appears.', 'webp-converter-for-media' ),
|
90 |
+
'<strong>"Purge Cache"</strong>',
|
91 |
+
'<strong>"Purge Everything"</strong>'
|
92 |
+
),
|
93 |
+
sprintf(
|
94 |
+
/* translators: %1$s: button label */
|
95 |
+
__( 'If you agree, click %1$s.', 'webp-converter-for-media' ),
|
96 |
+
'<strong>"Purge Everything"</strong>'
|
97 |
+
),
|
98 |
+
],
|
99 |
];
|
100 |
}
|
101 |
|
103 |
* {@inheritdoc}
|
104 |
*/
|
105 |
public function get_ajax_action_to_disable(): string {
|
106 |
+
return self::NOTICE_OPTION;
|
107 |
}
|
108 |
}
|
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WebpConverter\Notice;
|
4 |
+
|
5 |
+
use WebpConverter\Service\OptionsAccessManager;
|
6 |
+
use WebpConverter\Settings\Page\PageIntegration;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Supports notice asking to clear Cloudflare cache for Cloudways.
|
10 |
+
*/
|
11 |
+
class CloudwaysNotice extends NoticeAbstract implements NoticeInterface {
|
12 |
+
|
13 |
+
const NOTICE_OPTION = 'webpc_notice_cloudways';
|
14 |
+
const NOTICE_VIEW_PATH = 'components/notices/clear-cache.php';
|
15 |
+
|
16 |
+
/**
|
17 |
+
* {@inheritdoc}
|
18 |
+
*/
|
19 |
+
public function get_option_name(): string {
|
20 |
+
return self::NOTICE_OPTION;
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* {@inheritdoc}
|
25 |
+
*/
|
26 |
+
public function get_default_value(): string {
|
27 |
+
return '';
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* {@inheritdoc}
|
32 |
+
*/
|
33 |
+
public function is_available(): bool {
|
34 |
+
$document_root = strtolower( $_SERVER['DOCUMENT_ROOT'] ?? '' ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput
|
35 |
+
if ( ( strpos( $document_root, 'cloudwaysapps.com' ) !== false ) ) {
|
36 |
+
return ( isset( $_GET['page'] ) && ( $_GET['page'] === PageIntegration::ADMIN_MENU_PAGE ) ); // phpcs:ignore WordPress.Security.NonceVerification
|
37 |
+
}
|
38 |
+
|
39 |
+
return false;
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* {@inheritdoc}
|
44 |
+
*/
|
45 |
+
public function is_active(): bool {
|
46 |
+
$option_value = OptionsAccessManager::get_option( $this->get_option_name() );
|
47 |
+
return ( $option_value !== 'yes' );
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* {@inheritdoc}
|
52 |
+
*/
|
53 |
+
public function get_disable_value(): string {
|
54 |
+
return 'yes';
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* {@inheritdoc}
|
59 |
+
*/
|
60 |
+
public function get_output_path(): string {
|
61 |
+
return self::NOTICE_VIEW_PATH;
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* {@inheritdoc}
|
66 |
+
*/
|
67 |
+
public function get_vars_for_view(): array {
|
68 |
+
return [
|
69 |
+
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
70 |
+
'close_action' => self::NOTICE_OPTION,
|
71 |
+
'service_name' => 'Cloudways',
|
72 |
+
'steps' => [
|
73 |
+
sprintf(
|
74 |
+
/* translators: %1$s: service name */
|
75 |
+
__( 'Log in to your %1$s dashboard.', 'webp-converter-for-media' ),
|
76 |
+
'Cloudways'
|
77 |
+
),
|
78 |
+
sprintf(
|
79 |
+
/* translators: %1$s: button label */
|
80 |
+
__( 'Click %1$s, find your website on the list and click on it.', 'webp-converter-for-media' ),
|
81 |
+
'<strong>"Applications"</strong>'
|
82 |
+
),
|
83 |
+
sprintf(
|
84 |
+
/* translators: %1$s: section name, %2$s: tab name, %3$s: button label */
|
85 |
+
__( 'Under %1$s, go to %2$s tab and click %3$s.', 'webp-converter-for-media' ),
|
86 |
+
'<strong>"Cloudflare"</strong>',
|
87 |
+
'<strong>"Overview"</strong>',
|
88 |
+
'<strong>"Purge"</strong>'
|
89 |
+
),
|
90 |
+
],
|
91 |
+
];
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* {@inheritdoc}
|
96 |
+
*/
|
97 |
+
public function get_ajax_action_to_disable(): string {
|
98 |
+
return self::NOTICE_OPTION;
|
99 |
+
}
|
100 |
+
}
|
@@ -10,9 +10,8 @@ use WebpConverter\Settings\Page\PageIntegration;
|
|
10 |
*/
|
11 |
class LitespeedNotice extends NoticeAbstract implements NoticeInterface {
|
12 |
|
13 |
-
const NOTICE_OPTION
|
14 |
-
const NOTICE_VIEW_PATH
|
15 |
-
const NOTICE_ACTION_NAME = 'webpc_notice_cloudflare';
|
16 |
|
17 |
/**
|
18 |
* {@inheritdoc}
|
@@ -67,7 +66,20 @@ class LitespeedNotice extends NoticeAbstract implements NoticeInterface {
|
|
67 |
public function get_vars_for_view(): array {
|
68 |
return [
|
69 |
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
70 |
-
'close_action' => self::
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
];
|
72 |
}
|
73 |
|
@@ -75,6 +87,6 @@ class LitespeedNotice extends NoticeAbstract implements NoticeInterface {
|
|
75 |
* {@inheritdoc}
|
76 |
*/
|
77 |
public function get_ajax_action_to_disable(): string {
|
78 |
-
return self::
|
79 |
}
|
80 |
}
|
10 |
*/
|
11 |
class LitespeedNotice extends NoticeAbstract implements NoticeInterface {
|
12 |
|
13 |
+
const NOTICE_OPTION = 'webpc_notice_litespeed';
|
14 |
+
const NOTICE_VIEW_PATH = 'components/notices/clear-cache.php';
|
|
|
15 |
|
16 |
/**
|
17 |
* {@inheritdoc}
|
66 |
public function get_vars_for_view(): array {
|
67 |
return [
|
68 |
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
69 |
+
'close_action' => self::NOTICE_OPTION,
|
70 |
+
'service_name' => 'LiteSpeed Cache',
|
71 |
+
'steps' => [
|
72 |
+
sprintf(
|
73 |
+
/* translators: %1$s: button label */
|
74 |
+
__( 'Look for the %1$s icon in the admin bar.', 'webp-converter-for-media' ),
|
75 |
+
'<strong>"LiteSpeed Cache Purge All - LSCache"</strong>'
|
76 |
+
),
|
77 |
+
sprintf(
|
78 |
+
/* translators: %1$s: button label */
|
79 |
+
__( 'Click %1$s.', 'webp-converter-for-media' ),
|
80 |
+
'<strong>"Purge All"</strong>'
|
81 |
+
),
|
82 |
+
],
|
83 |
];
|
84 |
}
|
85 |
|
87 |
* {@inheritdoc}
|
88 |
*/
|
89 |
public function get_ajax_action_to_disable(): string {
|
90 |
+
return self::NOTICE_OPTION;
|
91 |
}
|
92 |
}
|
@@ -52,7 +52,7 @@ interface NoticeInterface {
|
|
52 |
/**
|
53 |
* Returns variables with values using in view template.
|
54 |
*
|
55 |
-
* @return string[] Args extract in view template.
|
56 |
*/
|
57 |
public function get_vars_for_view(): array;
|
58 |
|
52 |
/**
|
53 |
* Returns variables with values using in view template.
|
54 |
*
|
55 |
+
* @return string[]|mixed[] Args extract in view template.
|
56 |
*/
|
57 |
public function get_vars_for_view(): array;
|
58 |
|
@@ -9,10 +9,9 @@ use WebpConverter\Service\OptionsAccessManager;
|
|
9 |
*/
|
10 |
class ThanksNotice extends NoticeAbstract implements NoticeInterface {
|
11 |
|
12 |
-
const NOTICE_OPTION
|
13 |
-
const NOTICE_OLD_OPTION
|
14 |
-
const NOTICE_VIEW_PATH
|
15 |
-
const NOTICE_ACTION_NAME = 'webpc_notice_thanks';
|
16 |
|
17 |
/**
|
18 |
* {@inheritdoc}
|
@@ -64,7 +63,7 @@ class ThanksNotice extends NoticeAbstract implements NoticeInterface {
|
|
64 |
public function get_vars_for_view(): array {
|
65 |
return [
|
66 |
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
67 |
-
'close_action' => self::
|
68 |
];
|
69 |
}
|
70 |
|
@@ -72,6 +71,6 @@ class ThanksNotice extends NoticeAbstract implements NoticeInterface {
|
|
72 |
* {@inheritdoc}
|
73 |
*/
|
74 |
public function get_ajax_action_to_disable(): string {
|
75 |
-
return self::
|
76 |
}
|
77 |
}
|
9 |
*/
|
10 |
class ThanksNotice extends NoticeAbstract implements NoticeInterface {
|
11 |
|
12 |
+
const NOTICE_OPTION = 'webpc_notice_thanks';
|
13 |
+
const NOTICE_OLD_OPTION = 'webpc_notice_hidden';
|
14 |
+
const NOTICE_VIEW_PATH = 'components/notices/thanks.php';
|
|
|
15 |
|
16 |
/**
|
17 |
* {@inheritdoc}
|
63 |
public function get_vars_for_view(): array {
|
64 |
return [
|
65 |
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
66 |
+
'close_action' => self::NOTICE_OPTION,
|
67 |
];
|
68 |
}
|
69 |
|
71 |
* {@inheritdoc}
|
72 |
*/
|
73 |
public function get_ajax_action_to_disable(): string {
|
74 |
+
return self::NOTICE_OPTION;
|
75 |
}
|
76 |
}
|
@@ -4,6 +4,7 @@ namespace WebpConverter\Plugin\Deactivation;
|
|
4 |
|
5 |
use WebpConverter\Conversion\Cron\CronStatusManager;
|
6 |
use WebpConverter\Notice\CloudflareNotice;
|
|
|
7 |
use WebpConverter\Notice\LitespeedNotice;
|
8 |
use WebpConverter\Service\OptionsAccessManager;
|
9 |
|
@@ -18,6 +19,7 @@ class PluginSettings {
|
|
18 |
* @return void
|
19 |
*/
|
20 |
public function remove_plugin_settings() {
|
|
|
21 |
OptionsAccessManager::delete_option( CloudflareNotice::NOTICE_OPTION );
|
22 |
OptionsAccessManager::delete_option( LitespeedNotice::NOTICE_OPTION );
|
23 |
|
4 |
|
5 |
use WebpConverter\Conversion\Cron\CronStatusManager;
|
6 |
use WebpConverter\Notice\CloudflareNotice;
|
7 |
+
use WebpConverter\Notice\CloudwaysNotice;
|
8 |
use WebpConverter\Notice\LitespeedNotice;
|
9 |
use WebpConverter\Service\OptionsAccessManager;
|
10 |
|
19 |
* @return void
|
20 |
*/
|
21 |
public function remove_plugin_settings() {
|
22 |
+
OptionsAccessManager::delete_option( CloudwaysNotice::NOTICE_OPTION );
|
23 |
OptionsAccessManager::delete_option( CloudflareNotice::NOTICE_OPTION );
|
24 |
OptionsAccessManager::delete_option( LitespeedNotice::NOTICE_OPTION );
|
25 |
|
@@ -6,6 +6,7 @@ use WebpConverter\Conversion\Cron\CronStatusManager;
|
|
6 |
use WebpConverter\Error\ErrorDetectorAggregator;
|
7 |
use WebpConverter\Notice\AvifSupportNotice;
|
8 |
use WebpConverter\Notice\CloudflareNotice;
|
|
|
9 |
use WebpConverter\Notice\LitespeedNotice;
|
10 |
use WebpConverter\Notice\ThanksNotice;
|
11 |
use WebpConverter\Notice\WelcomeNotice;
|
@@ -30,6 +31,7 @@ class PluginSettings {
|
|
30 |
OptionsAccessManager::delete_option( ThanksNotice::NOTICE_OLD_OPTION );
|
31 |
OptionsAccessManager::delete_option( ThanksNotice::NOTICE_OPTION );
|
32 |
OptionsAccessManager::delete_option( AvifSupportNotice::NOTICE_OPTION );
|
|
|
33 |
OptionsAccessManager::delete_option( CloudflareNotice::NOTICE_OPTION );
|
34 |
OptionsAccessManager::delete_option( LitespeedNotice::NOTICE_OPTION );
|
35 |
|
6 |
use WebpConverter\Error\ErrorDetectorAggregator;
|
7 |
use WebpConverter\Notice\AvifSupportNotice;
|
8 |
use WebpConverter\Notice\CloudflareNotice;
|
9 |
+
use WebpConverter\Notice\CloudwaysNotice;
|
10 |
use WebpConverter\Notice\LitespeedNotice;
|
11 |
use WebpConverter\Notice\ThanksNotice;
|
12 |
use WebpConverter\Notice\WelcomeNotice;
|
31 |
OptionsAccessManager::delete_option( ThanksNotice::NOTICE_OLD_OPTION );
|
32 |
OptionsAccessManager::delete_option( ThanksNotice::NOTICE_OPTION );
|
33 |
OptionsAccessManager::delete_option( AvifSupportNotice::NOTICE_OPTION );
|
34 |
+
OptionsAccessManager::delete_option( CloudwaysNotice::NOTICE_OPTION );
|
35 |
OptionsAccessManager::delete_option( CloudflareNotice::NOTICE_OPTION );
|
36 |
OptionsAccessManager::delete_option( LitespeedNotice::NOTICE_OPTION );
|
37 |
|
@@ -52,7 +52,7 @@ class DeactivationModalGenerator {
|
|
52 |
$this->plugin_info->get_plugin_slug(),
|
53 |
new DeactivationModal\Model\FormTemplate(
|
54 |
sprintf( self::API_URL, $this->plugin_info->get_plugin_slug() ),
|
55 |
-
__( 'We are sorry that you are leaving our plugin
|
56 |
__( 'Can you please take a moment to tell us why you are deactivating this plugin (anonymous answer)?', 'webp-converter-for-media' ),
|
57 |
__( 'Submit and Deactivate', 'webp-converter-for-media' ),
|
58 |
__( 'Skip and Deactivate', 'webp-converter-for-media' )
|
52 |
$this->plugin_info->get_plugin_slug(),
|
53 |
new DeactivationModal\Model\FormTemplate(
|
54 |
sprintf( self::API_URL, $this->plugin_info->get_plugin_slug() ),
|
55 |
+
__( 'We are sorry that you are leaving our plugin Converter for Media', 'webp-converter-for-media' ),
|
56 |
__( 'Can you please take a moment to tell us why you are deactivating this plugin (anonymous answer)?', 'webp-converter-for-media' ),
|
57 |
__( 'Submit and Deactivate', 'webp-converter-for-media' ),
|
58 |
__( 'Skip and Deactivate', 'webp-converter-for-media' )
|
@@ -79,6 +79,11 @@ class FileLoader {
|
|
79 |
return 0;
|
80 |
}
|
81 |
|
|
|
|
|
|
|
|
|
|
|
82 |
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
|
83 |
curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, 0 );
|
84 |
curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, 0 );
|
79 |
return 0;
|
80 |
}
|
81 |
|
82 |
+
if ( isset( $_SERVER['PHP_AUTH_USER'] ) && isset( $_SERVER['PHP_AUTH_PW'] ) ) {
|
83 |
+
curl_setopt( $ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC );
|
84 |
+
curl_setopt( $ch, CURLOPT_USERPWD, sprintf( '%1$s:%2$s', $_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput
|
85 |
+
}
|
86 |
+
|
87 |
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
|
88 |
curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, 0 );
|
89 |
curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, 0 );
|
@@ -3,20 +3,17 @@
|
|
3 |
namespace WebpConverter\Settings\Option;
|
4 |
|
5 |
use WebpConverter\Conversion\Method\GdMethod;
|
6 |
-
use WebpConverter\Loader\PassthruLoader;
|
7 |
|
8 |
/**
|
9 |
* {@inheritdoc}
|
10 |
*/
|
11 |
class ExtraFeaturesOption extends OptionAbstract {
|
12 |
|
13 |
-
const OPTION_NAME
|
14 |
-
const OPTION_VALUE_ONLY_SMALLER
|
15 |
-
const
|
16 |
-
const
|
17 |
-
const
|
18 |
-
const OPTION_VALUE_REFERER_DISABLED = 'referer_disabled';
|
19 |
-
const OPTION_VALUE_DEBUG_ENABLED = 'debug_enabled';
|
20 |
|
21 |
/**
|
22 |
* {@inheritdoc}
|
@@ -60,27 +57,19 @@ class ExtraFeaturesOption extends OptionAbstract {
|
|
60 |
*/
|
61 |
public function get_values( array $settings ): array {
|
62 |
return [
|
63 |
-
self::OPTION_VALUE_ONLY_SMALLER
|
64 |
'Automatic removal of files in output formats larger than original',
|
65 |
'webp-converter-for-media'
|
66 |
),
|
67 |
-
self::
|
68 |
-
'Browser Caching for files in output formats (saving images in browser cache memory)',
|
69 |
-
'webp-converter-for-media'
|
70 |
-
),
|
71 |
-
self::OPTION_VALUE_KEEP_METADATA => __(
|
72 |
'Keep images metadata stored in EXIF or XMP formats (unavailable for GD conversion method)',
|
73 |
'webp-converter-for-media'
|
74 |
),
|
75 |
-
self::OPTION_VALUE_CRON_ENABLED
|
76 |
'Enable cron to automatically convert images from outside Media Library (images from Media Library are converted immediately after upload)',
|
77 |
'webp-converter-for-media'
|
78 |
),
|
79 |
-
self::
|
80 |
-
'Force redirections to output formats for all domains (by default, images in output formats are loaded only in domain of your website - when image is displayed via URL on another domain that original file is loaded)',
|
81 |
-
'webp-converter-for-media'
|
82 |
-
),
|
83 |
-
self::OPTION_VALUE_DEBUG_ENABLED => __(
|
84 |
'Log errors while converting to debug.log file (when debugging in WordPress is active)',
|
85 |
'webp-converter-for-media'
|
86 |
),
|
@@ -97,9 +86,6 @@ class ExtraFeaturesOption extends OptionAbstract {
|
|
97 |
if ( ( $settings[ ConversionMethodOption::OPTION_NAME ] ?? '' ) === GdMethod::METHOD_NAME ) {
|
98 |
$values[] = self::OPTION_VALUE_KEEP_METADATA;
|
99 |
}
|
100 |
-
if ( ( $settings[ LoaderTypeOption::OPTION_NAME ] ?? '' ) === PassthruLoader::LOADER_TYPE ) {
|
101 |
-
$values[] = self::OPTION_VALUE_REFERER_DISABLED;
|
102 |
-
}
|
103 |
return $values;
|
104 |
}
|
105 |
|
@@ -111,23 +97,7 @@ class ExtraFeaturesOption extends OptionAbstract {
|
|
111 |
public function get_default_value( array $settings = null ): array {
|
112 |
return [
|
113 |
self::OPTION_VALUE_ONLY_SMALLER,
|
114 |
-
self::OPTION_VALUE_MOD_EXPIRES,
|
115 |
-
self::OPTION_VALUE_REFERER_DISABLED,
|
116 |
self::OPTION_VALUE_DEBUG_ENABLED,
|
117 |
];
|
118 |
}
|
119 |
-
|
120 |
-
/**
|
121 |
-
* {@inheritdoc}
|
122 |
-
*
|
123 |
-
* @return string[]
|
124 |
-
*/
|
125 |
-
public function get_value_for_debug( array $settings ): array {
|
126 |
-
return array_merge(
|
127 |
-
$settings[ self::OPTION_NAME ] ?? [],
|
128 |
-
[
|
129 |
-
self::OPTION_VALUE_REFERER_DISABLED,
|
130 |
-
]
|
131 |
-
);
|
132 |
-
}
|
133 |
}
|
3 |
namespace WebpConverter\Settings\Option;
|
4 |
|
5 |
use WebpConverter\Conversion\Method\GdMethod;
|
|
|
6 |
|
7 |
/**
|
8 |
* {@inheritdoc}
|
9 |
*/
|
10 |
class ExtraFeaturesOption extends OptionAbstract {
|
11 |
|
12 |
+
const OPTION_NAME = 'features';
|
13 |
+
const OPTION_VALUE_ONLY_SMALLER = 'only_smaller';
|
14 |
+
const OPTION_VALUE_KEEP_METADATA = 'keep_metadata';
|
15 |
+
const OPTION_VALUE_CRON_ENABLED = 'cron_enabled';
|
16 |
+
const OPTION_VALUE_DEBUG_ENABLED = 'debug_enabled';
|
|
|
|
|
17 |
|
18 |
/**
|
19 |
* {@inheritdoc}
|
57 |
*/
|
58 |
public function get_values( array $settings ): array {
|
59 |
return [
|
60 |
+
self::OPTION_VALUE_ONLY_SMALLER => __(
|
61 |
'Automatic removal of files in output formats larger than original',
|
62 |
'webp-converter-for-media'
|
63 |
),
|
64 |
+
self::OPTION_VALUE_KEEP_METADATA => __(
|
|
|
|
|
|
|
|
|
65 |
'Keep images metadata stored in EXIF or XMP formats (unavailable for GD conversion method)',
|
66 |
'webp-converter-for-media'
|
67 |
),
|
68 |
+
self::OPTION_VALUE_CRON_ENABLED => __(
|
69 |
'Enable cron to automatically convert images from outside Media Library (images from Media Library are converted immediately after upload)',
|
70 |
'webp-converter-for-media'
|
71 |
),
|
72 |
+
self::OPTION_VALUE_DEBUG_ENABLED => __(
|
|
|
|
|
|
|
|
|
73 |
'Log errors while converting to debug.log file (when debugging in WordPress is active)',
|
74 |
'webp-converter-for-media'
|
75 |
),
|
86 |
if ( ( $settings[ ConversionMethodOption::OPTION_NAME ] ?? '' ) === GdMethod::METHOD_NAME ) {
|
87 |
$values[] = self::OPTION_VALUE_KEEP_METADATA;
|
88 |
}
|
|
|
|
|
|
|
89 |
return $values;
|
90 |
}
|
91 |
|
97 |
public function get_default_value( array $settings = null ): array {
|
98 |
return [
|
99 |
self::OPTION_VALUE_ONLY_SMALLER,
|
|
|
|
|
100 |
self::OPTION_VALUE_DEBUG_ENABLED,
|
101 |
];
|
102 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
}
|
@@ -28,6 +28,13 @@ abstract class OptionAbstract implements OptionInterface {
|
|
28 |
return null;
|
29 |
}
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
/**
|
32 |
* {@inheritdoc}
|
33 |
*/
|
@@ -36,9 +43,11 @@ abstract class OptionAbstract implements OptionInterface {
|
|
36 |
}
|
37 |
|
38 |
/**
|
39 |
-
*
|
|
|
|
|
40 |
*/
|
41 |
-
public function
|
42 |
-
return $
|
43 |
}
|
44 |
}
|
28 |
return null;
|
29 |
}
|
30 |
|
31 |
+
/**
|
32 |
+
* {@inheritdoc}
|
33 |
+
*/
|
34 |
+
public function get_debug_value( array $settings ) {
|
35 |
+
return $this->get_default_value( $settings );
|
36 |
+
}
|
37 |
+
|
38 |
/**
|
39 |
* {@inheritdoc}
|
40 |
*/
|
43 |
}
|
44 |
|
45 |
/**
|
46 |
+
* @param string|string[] $current_value .
|
47 |
+
*
|
48 |
+
* @return string|string[]
|
49 |
*/
|
50 |
+
public function parse_value( $current_value ) {
|
51 |
+
return $current_value;
|
52 |
}
|
53 |
}
|
@@ -37,7 +37,7 @@ class OptionIntegration {
|
|
37 |
$disabled_values = $this->option->get_disabled_values( $settings );
|
38 |
|
39 |
if ( $is_debug ) {
|
40 |
-
$value = $this->option->
|
41 |
} else {
|
42 |
$value = ( isset( $settings[ $option_name ] ) || $is_save )
|
43 |
? $this->get_option_value( $settings[ $option_name ] ?? '', $option_type, $values, $disabled_values )
|
@@ -52,7 +52,9 @@ class OptionIntegration {
|
|
52 |
'info' => $this->option->get_info(),
|
53 |
'values' => $values,
|
54 |
'disabled' => $disabled_values ?: [],
|
55 |
-
'value' =>
|
|
|
|
|
56 |
];
|
57 |
}
|
58 |
|
37 |
$disabled_values = $this->option->get_disabled_values( $settings );
|
38 |
|
39 |
if ( $is_debug ) {
|
40 |
+
$value = $this->option->get_debug_value( $settings );
|
41 |
} else {
|
42 |
$value = ( isset( $settings[ $option_name ] ) || $is_save )
|
43 |
? $this->get_option_value( $settings[ $option_name ] ?? '', $option_type, $values, $disabled_values )
|
52 |
'info' => $this->option->get_info(),
|
53 |
'values' => $values,
|
54 |
'disabled' => $disabled_values ?: [],
|
55 |
+
'value' => $this->option->parse_value(
|
56 |
+
( $value !== null ) ? $value : $this->option->get_default_value( $settings )
|
57 |
+
),
|
58 |
];
|
59 |
}
|
60 |
|
@@ -65,6 +65,15 @@ interface OptionInterface {
|
|
65 |
*/
|
66 |
public function get_default_value( array $settings = null );
|
67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
/**
|
69 |
* Returns unavailable values for field.
|
70 |
*
|
@@ -75,11 +84,9 @@ interface OptionInterface {
|
|
75 |
public function get_disabled_values( array $settings );
|
76 |
|
77 |
/**
|
78 |
-
*
|
79 |
-
*
|
80 |
-
* @param mixed[] $settings Plugin settings.
|
81 |
*
|
82 |
* @return string|string[]
|
83 |
*/
|
84 |
-
public function
|
85 |
}
|
65 |
*/
|
66 |
public function get_default_value( array $settings = null );
|
67 |
|
68 |
+
/**
|
69 |
+
* Returns default value of field when debugging.
|
70 |
+
*
|
71 |
+
* @param mixed[] $settings Plugin settings.
|
72 |
+
*
|
73 |
+
* @return string|string[]
|
74 |
+
*/
|
75 |
+
public function get_debug_value( array $settings );
|
76 |
+
|
77 |
/**
|
78 |
* Returns unavailable values for field.
|
79 |
*
|
84 |
public function get_disabled_values( array $settings );
|
85 |
|
86 |
/**
|
87 |
+
* @param string|string[] $current_value .
|
|
|
|
|
88 |
*
|
89 |
* @return string|string[]
|
90 |
*/
|
91 |
+
public function parse_value( $current_value );
|
92 |
}
|
@@ -20,7 +20,7 @@ class OptionsAggregator {
|
|
20 |
$token_repository = $token_repository ?: new TokenRepository();
|
21 |
$conversion_method = new ConversionMethodOption( $token_repository );
|
22 |
|
23 |
-
$this->set_option( new SupportedExtensionsOption(
|
24 |
$this->set_option( new SupportedDirectoriesOption() );
|
25 |
$this->set_option( new AccessTokenOption( $token_repository ) );
|
26 |
$this->set_option( new OutputFormatsOption( $token_repository, $conversion_method ) );
|
20 |
$token_repository = $token_repository ?: new TokenRepository();
|
21 |
$conversion_method = new ConversionMethodOption( $token_repository );
|
22 |
|
23 |
+
$this->set_option( new SupportedExtensionsOption() );
|
24 |
$this->set_option( new SupportedDirectoriesOption() );
|
25 |
$this->set_option( new AccessTokenOption( $token_repository ) );
|
26 |
$this->set_option( new OutputFormatsOption( $token_repository, $conversion_method ) );
|
@@ -114,7 +114,7 @@ class OutputFormatsOption extends OptionAbstract {
|
|
114 |
*
|
115 |
* @return string[]
|
116 |
*/
|
117 |
-
public function
|
118 |
return [ WebpFormat::FORMAT_EXTENSION, AvifFormat::FORMAT_EXTENSION ];
|
119 |
}
|
120 |
|
114 |
*
|
115 |
* @return string[]
|
116 |
*/
|
117 |
+
public function get_debug_value( array $settings ): array {
|
118 |
return [ WebpFormat::FORMAT_EXTENSION, AvifFormat::FORMAT_EXTENSION ];
|
119 |
}
|
120 |
|
@@ -69,7 +69,7 @@ class SupportedDirectoriesOption extends OptionAbstract {
|
|
69 |
*
|
70 |
* @return string[]
|
71 |
*/
|
72 |
-
public function
|
73 |
return [ 'uploads' ];
|
74 |
}
|
75 |
}
|
69 |
*
|
70 |
* @return string[]
|
71 |
*/
|
72 |
+
public function get_debug_value( array $settings ): array {
|
73 |
return [ 'uploads' ];
|
74 |
}
|
75 |
}
|
@@ -2,9 +2,6 @@
|
|
2 |
|
3 |
namespace WebpConverter\Settings\Option;
|
4 |
|
5 |
-
use WebpConverter\Conversion\Format\AvifFormat;
|
6 |
-
use WebpConverter\Repository\TokenRepository;
|
7 |
-
|
8 |
/**
|
9 |
* {@inheritdoc}
|
10 |
*/
|
@@ -12,15 +9,6 @@ class SupportedExtensionsOption extends OptionAbstract {
|
|
12 |
|
13 |
const OPTION_NAME = 'extensions';
|
14 |
|
15 |
-
/**
|
16 |
-
* @var TokenRepository
|
17 |
-
*/
|
18 |
-
private $token_repository;
|
19 |
-
|
20 |
-
public function __construct( TokenRepository $token_repository ) {
|
21 |
-
$this->token_repository = $token_repository;
|
22 |
-
}
|
23 |
-
|
24 |
/**
|
25 |
* {@inheritdoc}
|
26 |
*/
|
@@ -63,8 +51,7 @@ class SupportedExtensionsOption extends OptionAbstract {
|
|
63 |
*/
|
64 |
public function get_values( array $settings ): array {
|
65 |
return [
|
66 |
-
'jpg' => '.jpg',
|
67 |
-
'jpeg' => '.jpeg',
|
68 |
'png' => '.png',
|
69 |
'gif' => '.gif',
|
70 |
'webp' => sprintf(
|
@@ -81,7 +68,7 @@ class SupportedExtensionsOption extends OptionAbstract {
|
|
81 |
* @return string[]
|
82 |
*/
|
83 |
public function get_default_value( array $settings = null ): array {
|
84 |
-
return [ 'jpg', '
|
85 |
}
|
86 |
|
87 |
/**
|
@@ -89,21 +76,19 @@ class SupportedExtensionsOption extends OptionAbstract {
|
|
89 |
*
|
90 |
* @return string[]
|
91 |
*/
|
92 |
-
public function
|
93 |
return [ 'png2', 'png' ];
|
94 |
}
|
95 |
|
96 |
/**
|
97 |
-
*
|
98 |
*
|
99 |
* @return string[]
|
100 |
*/
|
101 |
-
public function
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
? [ 'webp' ]
|
107 |
-
: [];
|
108 |
}
|
109 |
}
|
2 |
|
3 |
namespace WebpConverter\Settings\Option;
|
4 |
|
|
|
|
|
|
|
5 |
/**
|
6 |
* {@inheritdoc}
|
7 |
*/
|
9 |
|
10 |
const OPTION_NAME = 'extensions';
|
11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
/**
|
13 |
* {@inheritdoc}
|
14 |
*/
|
51 |
*/
|
52 |
public function get_values( array $settings ): array {
|
53 |
return [
|
54 |
+
'jpg' => '.jpg / .jpeg',
|
|
|
55 |
'png' => '.png',
|
56 |
'gif' => '.gif',
|
57 |
'webp' => sprintf(
|
68 |
* @return string[]
|
69 |
*/
|
70 |
public function get_default_value( array $settings = null ): array {
|
71 |
+
return [ 'jpg', 'png' ];
|
72 |
}
|
73 |
|
74 |
/**
|
76 |
*
|
77 |
* @return string[]
|
78 |
*/
|
79 |
+
public function get_debug_value( array $settings ): array {
|
80 |
return [ 'png2', 'png' ];
|
81 |
}
|
82 |
|
83 |
/**
|
84 |
+
* @param string[] $current_value .
|
85 |
*
|
86 |
* @return string[]
|
87 |
*/
|
88 |
+
public function parse_value( $current_value ): array {
|
89 |
+
if ( in_array( 'jpg', $current_value ) ) {
|
90 |
+
$current_value[] = 'jpeg';
|
91 |
+
}
|
92 |
+
return $current_value;
|
|
|
|
|
93 |
}
|
94 |
}
|
@@ -105,7 +105,7 @@ class PageIntegration implements HookableInterface {
|
|
105 |
private function add_settings_page( string $menu_page ) {
|
106 |
$page = add_submenu_page(
|
107 |
$menu_page,
|
108 |
-
'
|
109 |
'Converter for Media',
|
110 |
'manage_options',
|
111 |
self::ADMIN_MENU_PAGE,
|
105 |
private function add_settings_page( string $menu_page ) {
|
106 |
$page = add_submenu_page(
|
107 |
$menu_page,
|
108 |
+
'Converter for Media',
|
109 |
'Converter for Media',
|
110 |
'manage_options',
|
111 |
self::ADMIN_MENU_PAGE,
|
@@ -41,6 +41,7 @@ class WebpConverter {
|
|
41 |
( new Notice\NoticeIntegration( $plugin_info, new Notice\WelcomeNotice() ) )->init_hooks();
|
42 |
( new Notice\NoticeIntegration( $plugin_info, new Notice\ThanksNotice() ) )->init_hooks();
|
43 |
( new Notice\NoticeIntegration( $plugin_info, new Notice\AvifSupportNotice( $token_repository ) ) )->init_hooks();
|
|
|
44 |
( new Notice\NoticeIntegration( $plugin_info, new Notice\CloudflareNotice() ) )->init_hooks();
|
45 |
( new Notice\NoticeIntegration( $plugin_info, new Notice\LitespeedNotice() ) )->init_hooks();
|
46 |
( new Loader\LoaderIntegration( new Loader\HtaccessLoader( $plugin_info, $plugin_data ) ) )->init_hooks();
|
41 |
( new Notice\NoticeIntegration( $plugin_info, new Notice\WelcomeNotice() ) )->init_hooks();
|
42 |
( new Notice\NoticeIntegration( $plugin_info, new Notice\ThanksNotice() ) )->init_hooks();
|
43 |
( new Notice\NoticeIntegration( $plugin_info, new Notice\AvifSupportNotice( $token_repository ) ) )->init_hooks();
|
44 |
+
( new Notice\NoticeIntegration( $plugin_info, new Notice\CloudwaysNotice() ) )->init_hooks();
|
45 |
( new Notice\NoticeIntegration( $plugin_info, new Notice\CloudflareNotice() ) )->init_hooks();
|
46 |
( new Notice\NoticeIntegration( $plugin_info, new Notice\LitespeedNotice() ) )->init_hooks();
|
47 |
( new Loader\LoaderIntegration( new Loader\HtaccessLoader( $plugin_info, $plugin_data ) ) )->init_hooks();
|
@@ -17,7 +17,7 @@ use WebpConverter\WebpConverterConstants;
|
|
17 |
>
|
18 |
<div class="webpContent webpContent--notice webpContent--author">
|
19 |
<h4>
|
20 |
-
<?php echo esc_html( __( 'Hello, I am glad that you are with us and use our
|
21 |
</h4>
|
22 |
<p>
|
23 |
<?php
|
17 |
>
|
18 |
<div class="webpContent webpContent--notice webpContent--author">
|
19 |
<h4>
|
20 |
+
<?php echo esc_html( __( 'Hello, I am glad that you are with us and use our Converter for Media plugin!', 'webp-converter-for-media' ) ); ?>
|
21 |
</h4>
|
22 |
<p>
|
23 |
<?php
|
@@ -2,8 +2,10 @@
|
|
2 |
/**
|
3 |
* Notice displayed in admin panel.
|
4 |
*
|
5 |
-
* @var string
|
6 |
-
* @var string
|
|
|
|
|
7 |
* @package WebP Converter for Media
|
8 |
*/
|
9 |
|
@@ -20,36 +22,17 @@
|
|
20 |
sprintf(
|
21 |
/* translators: %1$s: service name */
|
22 |
__( 'You are using %1$s, right? Please follow the steps below for the plugin to function properly:', 'webp-converter-for-media' ),
|
23 |
-
|
24 |
)
|
25 |
);
|
26 |
?>
|
27 |
</p>
|
28 |
<ul>
|
|
|
29 |
<li>
|
30 |
-
1.
|
31 |
-
<?php
|
32 |
-
echo wp_kses_post(
|
33 |
-
sprintf(
|
34 |
-
/* translators: %1$s: button label */
|
35 |
-
__( 'Look for the %1$s icon in the admin bar.', 'webp-converter-for-media' ),
|
36 |
-
'<strong>"LiteSpeed Cache Purge All - LSCache"</strong>'
|
37 |
-
)
|
38 |
-
);
|
39 |
-
?>
|
40 |
-
</li>
|
41 |
-
<li>
|
42 |
-
2.
|
43 |
-
<?php
|
44 |
-
echo wp_kses_post(
|
45 |
-
sprintf(
|
46 |
-
/* translators: %1$s: button label */
|
47 |
-
__( 'Click %1$s.', 'webp-converter-for-media' ),
|
48 |
-
'<strong>"Purge All"</strong>'
|
49 |
-
)
|
50 |
-
);
|
51 |
-
?>
|
52 |
</li>
|
|
|
53 |
</ul>
|
54 |
<div class="webpContent__buttons">
|
55 |
<button type="button" data-permanently
|
2 |
/**
|
3 |
* Notice displayed in admin panel.
|
4 |
*
|
5 |
+
* @var string $ajax_url URL of admin-ajax.
|
6 |
+
* @var string $close_action Action using in WP Ajax.
|
7 |
+
* @var string $service_name .
|
8 |
+
* @var string[] $steps Instructions to follow.
|
9 |
* @package WebP Converter for Media
|
10 |
*/
|
11 |
|
22 |
sprintf(
|
23 |
/* translators: %1$s: service name */
|
24 |
__( 'You are using %1$s, right? Please follow the steps below for the plugin to function properly:', 'webp-converter-for-media' ),
|
25 |
+
$service_name
|
26 |
)
|
27 |
);
|
28 |
?>
|
29 |
</p>
|
30 |
<ul>
|
31 |
+
<?php foreach ( $steps as $step_index => $step_message ) : ?>
|
32 |
<li>
|
33 |
+
<?php echo wp_kses_post( ( $step_index + 1 ) . '. ' . $step_message ); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
</li>
|
35 |
+
<?php endforeach; ?>
|
36 |
</ul>
|
37 |
<div class="webpContent__buttons">
|
38 |
<button type="button" data-permanently
|
@@ -1,81 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Notice displayed in admin panel.
|
4 |
-
*
|
5 |
-
* @var string $ajax_url URL of admin-ajax.
|
6 |
-
* @var string $close_action Action using in WP Ajax.
|
7 |
-
* @package WebP Converter for Media
|
8 |
-
*/
|
9 |
-
|
10 |
-
?>
|
11 |
-
<div class="notice notice-success is-dismissible"
|
12 |
-
data-notice="webp-converter-for-media"
|
13 |
-
data-notice-action="<?php echo esc_attr( $close_action ); ?>"
|
14 |
-
data-notice-url="<?php echo esc_url( $ajax_url ); ?>"
|
15 |
-
>
|
16 |
-
<div class="webpContent webpContent--notice">
|
17 |
-
<p>
|
18 |
-
<?php
|
19 |
-
echo esc_html(
|
20 |
-
sprintf(
|
21 |
-
/* translators: %1$s: service name */
|
22 |
-
__( 'You are using %1$s, right? Please follow the steps below for the plugin to function properly:', 'webp-converter-for-media' ),
|
23 |
-
'Cloudflare'
|
24 |
-
)
|
25 |
-
);
|
26 |
-
?>
|
27 |
-
</p>
|
28 |
-
<ul>
|
29 |
-
<li>
|
30 |
-
1.
|
31 |
-
<?php
|
32 |
-
echo wp_kses_post(
|
33 |
-
__( 'Log in to your Cloudflare dashboard.', 'webp-converter-for-media' )
|
34 |
-
);
|
35 |
-
?>
|
36 |
-
</li>
|
37 |
-
<li>
|
38 |
-
2.
|
39 |
-
<?php
|
40 |
-
echo wp_kses_post(
|
41 |
-
sprintf(
|
42 |
-
/* translators: %1$s: button label */
|
43 |
-
__( 'Click %1$s.', 'webp-converter-for-media' ),
|
44 |
-
'<strong>"Caching > Configuration"</strong>'
|
45 |
-
)
|
46 |
-
);
|
47 |
-
?>
|
48 |
-
</li>
|
49 |
-
<li>3.
|
50 |
-
<?php
|
51 |
-
echo wp_kses_post(
|
52 |
-
sprintf(
|
53 |
-
/* translators: %1$s: section label, %2$s: button label */
|
54 |
-
__( 'Under %1$s, click %2$s. A warning window appears.', 'webp-converter-for-media' ),
|
55 |
-
'<strong>"Purge Cache"</strong>',
|
56 |
-
'<strong>"Purge Everything"</strong>'
|
57 |
-
)
|
58 |
-
);
|
59 |
-
?>
|
60 |
-
</li>
|
61 |
-
<li>4.
|
62 |
-
<?php
|
63 |
-
echo wp_kses_post(
|
64 |
-
sprintf(
|
65 |
-
/* translators: %1$s: button label */
|
66 |
-
__( 'If you agree, click %1$s.', 'webp-converter-for-media' ),
|
67 |
-
'<strong>"Purge Everything"</strong>'
|
68 |
-
)
|
69 |
-
);
|
70 |
-
?>
|
71 |
-
</li>
|
72 |
-
</ul>
|
73 |
-
<div class="webpContent__buttons">
|
74 |
-
<button type="button" data-permanently
|
75 |
-
class="webpContent__button webpButton webpButton--blue webpButton--bg"
|
76 |
-
>
|
77 |
-
<?php echo esc_html( __( 'Done', 'webp-converter-for-media' ) ); ?>
|
78 |
-
</button>
|
79 |
-
</div>
|
80 |
-
</div>
|
81 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -15,7 +15,7 @@
|
|
15 |
>
|
16 |
<div class="webpContent webpContent--notice">
|
17 |
<h4>
|
18 |
-
<?php echo esc_html( __( 'Thank you for using our plugin
|
19 |
</h4>
|
20 |
<p>
|
21 |
<?php
|
15 |
>
|
16 |
<div class="webpContent webpContent--notice">
|
17 |
<h4>
|
18 |
+
<?php echo esc_html( __( 'Thank you for using our plugin Converter for Media!', 'webp-converter-for-media' ) ); ?>
|
19 |
</h4>
|
20 |
<p>
|
21 |
<?php
|
@@ -12,7 +12,7 @@
|
|
12 |
>
|
13 |
<div class="webpContent webpContent--notice">
|
14 |
<h4>
|
15 |
-
<?php echo esc_html( __( 'Thank you for installing our plugin
|
16 |
</h4>
|
17 |
<p>
|
18 |
<?php
|
12 |
>
|
13 |
<div class="webpContent webpContent--notice">
|
14 |
<h4>
|
15 |
+
<?php echo esc_html( __( 'Thank you for installing our plugin Converter for Media!', 'webp-converter-for-media' ) ); ?>
|
16 |
</h4>
|
17 |
<p>
|
18 |
<?php
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Information about plugin options displayed in server configuration widget.
|
4 |
+
*
|
5 |
+
* @package WebP Converter for Media
|
6 |
+
*/
|
7 |
+
|
8 |
+
use WebpConverter\Conversion\Cron\CronStatusManager;
|
9 |
+
use WebpConverter\Notice\CloudflareNotice;
|
10 |
+
use WebpConverter\Notice\CloudwaysNotice;
|
11 |
+
use WebpConverter\Notice\LitespeedNotice;
|
12 |
+
use WebpConverter\Service\OptionsAccessManager;
|
13 |
+
|
14 |
+
?>
|
15 |
+
<h4>Options</h4>
|
16 |
+
<table>
|
17 |
+
<tbody>
|
18 |
+
<tr>
|
19 |
+
<td class="e"><?php echo esc_html( CloudwaysNotice::NOTICE_OPTION ); ?></td>
|
20 |
+
<td class="v">
|
21 |
+
<?php echo esc_html( OptionsAccessManager::get_option( CloudwaysNotice::NOTICE_OPTION ) ?: '-' ); ?>
|
22 |
+
</td>
|
23 |
+
</tr>
|
24 |
+
<tr>
|
25 |
+
<td class="e"><?php echo esc_html( CloudflareNotice::NOTICE_OPTION ); ?></td>
|
26 |
+
<td class="v">
|
27 |
+
<?php echo esc_html( OptionsAccessManager::get_option( CloudflareNotice::NOTICE_OPTION ) ?: '-' ); ?>
|
28 |
+
</td>
|
29 |
+
</tr>
|
30 |
+
<tr>
|
31 |
+
<td class="e"><?php echo esc_html( LitespeedNotice::NOTICE_OPTION ); ?></td>
|
32 |
+
<td class="v">
|
33 |
+
<?php echo esc_html( OptionsAccessManager::get_option( LitespeedNotice::NOTICE_OPTION ) ?: '-' ); ?>
|
34 |
+
</td>
|
35 |
+
</tr>
|
36 |
+
<tr>
|
37 |
+
<td class="e"><?php echo esc_html( CronStatusManager::CRON_PATHS_TRANSIENT ); ?></td>
|
38 |
+
<td class="v">
|
39 |
+
<?php echo count( get_site_transient( CronStatusManager::CRON_PATHS_TRANSIENT ) ?: [] ); ?>
|
40 |
+
</td>
|
41 |
+
</tr>
|
42 |
+
<tr>
|
43 |
+
<td class="e"><?php echo esc_html( CronStatusManager::CRON_PATHS_SKIPPED_TRANSIENT ); ?></td>
|
44 |
+
<td class="v">
|
45 |
+
<?php echo esc_html( get_site_transient( CronStatusManager::CRON_PATHS_SKIPPED_TRANSIENT ) ?: '-' ); ?>
|
46 |
+
</td>
|
47 |
+
</tr>
|
48 |
+
<tr>
|
49 |
+
<td class="e"><?php echo esc_html( CronStatusManager::CRON_STATUS_LOCKED_TRANSIENT ); ?></td>
|
50 |
+
<td class="v">
|
51 |
+
<?php echo esc_html( get_site_transient( CronStatusManager::CRON_STATUS_LOCKED_TRANSIENT ) ?: '-' ); ?>
|
52 |
+
</td>
|
53 |
+
</tr>
|
54 |
+
<tr>
|
55 |
+
<td class="e"><?php echo esc_html( CronStatusManager::CRON_REQUEST_ID_TRANSIENT ); ?></td>
|
56 |
+
<td class="v">
|
57 |
+
<?php echo esc_html( get_site_transient( CronStatusManager::CRON_REQUEST_ID_TRANSIENT ) ?: '-' ); ?>
|
58 |
+
</td>
|
59 |
+
</tr>
|
60 |
+
</tbody>
|
61 |
+
</table>
|
@@ -33,5 +33,17 @@
|
|
33 |
<?php echo esc_html( wp_upload_dir()['basedir'] ); ?>
|
34 |
</td>
|
35 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
</tbody>
|
37 |
</table>
|
33 |
<?php echo esc_html( wp_upload_dir()['basedir'] ); ?>
|
34 |
</td>
|
35 |
</tr>
|
36 |
+
<tr>
|
37 |
+
<td class="e">home_url</td>
|
38 |
+
<td class="v">
|
39 |
+
<?php echo esc_html( get_home_url() ); ?>
|
40 |
+
</td>
|
41 |
+
</tr>
|
42 |
+
<tr>
|
43 |
+
<td class="e">site_url</td>
|
44 |
+
<td class="v">
|
45 |
+
<?php echo esc_html( get_site_url() ); ?>
|
46 |
+
</td>
|
47 |
+
</tr>
|
48 |
</tbody>
|
49 |
</table>
|
@@ -41,9 +41,10 @@
|
|
41 |
<div class="webpPage__widgetRow">
|
42 |
<div class="webpServerInfo">
|
43 |
<?php
|
|
|
44 |
require_once dirname( __DIR__ ) . '/server/filters.php';
|
45 |
require_once dirname( __DIR__ ) . '/server/wordpress.php';
|
46 |
-
require_once dirname( __DIR__ ) . '/server/
|
47 |
require_once dirname( __DIR__ ) . '/server/php.php';
|
48 |
require_once dirname( __DIR__ ) . '/server/gd.php';
|
49 |
require_once dirname( __DIR__ ) . '/server/imagick.php';
|
41 |
<div class="webpPage__widgetRow">
|
42 |
<div class="webpServerInfo">
|
43 |
<?php
|
44 |
+
require_once dirname( __DIR__ ) . '/server/debug.php';
|
45 |
require_once dirname( __DIR__ ) . '/server/filters.php';
|
46 |
require_once dirname( __DIR__ ) . '/server/wordpress.php';
|
47 |
+
require_once dirname( __DIR__ ) . '/server/options.php';
|
48 |
require_once dirname( __DIR__ ) . '/server/php.php';
|
49 |
require_once dirname( __DIR__ ) . '/server/gd.php';
|
50 |
require_once dirname( __DIR__ ) . '/server/imagick.php';
|
@@ -17,7 +17,7 @@
|
|
17 |
<div class="wrap">
|
18 |
<hr class="wp-header-end">
|
19 |
<div class="webpPage">
|
20 |
-
<h1 class="webpPage__headline"><?php echo esc_html(
|
21 |
<div class="webpPage__inner">
|
22 |
<ul class="webpPage__columns">
|
23 |
<li class="webpPage__column webpPage__column--large">
|
17 |
<div class="wrap">
|
18 |
<hr class="wp-header-end">
|
19 |
<div class="webpPage">
|
20 |
+
<h1 class="webpPage__headline"><?php echo esc_html( 'Converter for Media' ); ?></h1>
|
21 |
<div class="webpPage__inner">
|
22 |
<ul class="webpPage__columns">
|
23 |
<li class="webpPage__column webpPage__column--large">
|
@@ -23,7 +23,7 @@
|
|
23 |
<div class="wrap">
|
24 |
<hr class="wp-header-end">
|
25 |
<form method="post" action="<?php echo esc_url( $settings_url ); ?>" class="webpPage">
|
26 |
-
<h1 class="webpPage__headline"><?php echo esc_html(
|
27 |
<div class="webpPage__inner">
|
28 |
<ul class="webpPage__columns">
|
29 |
<li class="webpPage__column webpPage__column--large">
|
23 |
<div class="wrap">
|
24 |
<hr class="wp-header-end">
|
25 |
<form method="post" action="<?php echo esc_url( $settings_url ); ?>" class="webpPage">
|
26 |
+
<h1 class="webpPage__headline"><?php echo esc_html( 'Converter for Media' ); ?></h1>
|
27 |
<div class="webpPage__inner">
|
28 |
<ul class="webpPage__columns">
|
29 |
<li class="webpPage__column webpPage__column--large">
|
@@ -123,6 +123,7 @@ return array(
|
|
123 |
'WebpConverter\\Model\\Token' => $baseDir . '/src/Model/Token.php',
|
124 |
'WebpConverter\\Notice\\AvifSupportNotice' => $baseDir . '/src/Notice/AvifSupportNotice.php',
|
125 |
'WebpConverter\\Notice\\CloudflareNotice' => $baseDir . '/src/Notice/CloudflareNotice.php',
|
|
|
126 |
'WebpConverter\\Notice\\LitespeedNotice' => $baseDir . '/src/Notice/LitespeedNotice.php',
|
127 |
'WebpConverter\\Notice\\NoticeAbstract' => $baseDir . '/src/Notice/NoticeAbstract.php',
|
128 |
'WebpConverter\\Notice\\NoticeIntegration' => $baseDir . '/src/Notice/NoticeIntegration.php',
|
123 |
'WebpConverter\\Model\\Token' => $baseDir . '/src/Model/Token.php',
|
124 |
'WebpConverter\\Notice\\AvifSupportNotice' => $baseDir . '/src/Notice/AvifSupportNotice.php',
|
125 |
'WebpConverter\\Notice\\CloudflareNotice' => $baseDir . '/src/Notice/CloudflareNotice.php',
|
126 |
+
'WebpConverter\\Notice\\CloudwaysNotice' => $baseDir . '/src/Notice/CloudwaysNotice.php',
|
127 |
'WebpConverter\\Notice\\LitespeedNotice' => $baseDir . '/src/Notice/LitespeedNotice.php',
|
128 |
'WebpConverter\\Notice\\NoticeAbstract' => $baseDir . '/src/Notice/NoticeAbstract.php',
|
129 |
'WebpConverter\\Notice\\NoticeIntegration' => $baseDir . '/src/Notice/NoticeIntegration.php',
|
@@ -138,6 +138,7 @@ class ComposerStaticInit74037c5a08f9b99adcf3f4137c88ddde
|
|
138 |
'WebpConverter\\Model\\Token' => __DIR__ . '/../..' . '/src/Model/Token.php',
|
139 |
'WebpConverter\\Notice\\AvifSupportNotice' => __DIR__ . '/../..' . '/src/Notice/AvifSupportNotice.php',
|
140 |
'WebpConverter\\Notice\\CloudflareNotice' => __DIR__ . '/../..' . '/src/Notice/CloudflareNotice.php',
|
|
|
141 |
'WebpConverter\\Notice\\LitespeedNotice' => __DIR__ . '/../..' . '/src/Notice/LitespeedNotice.php',
|
142 |
'WebpConverter\\Notice\\NoticeAbstract' => __DIR__ . '/../..' . '/src/Notice/NoticeAbstract.php',
|
143 |
'WebpConverter\\Notice\\NoticeIntegration' => __DIR__ . '/../..' . '/src/Notice/NoticeIntegration.php',
|
138 |
'WebpConverter\\Model\\Token' => __DIR__ . '/../..' . '/src/Model/Token.php',
|
139 |
'WebpConverter\\Notice\\AvifSupportNotice' => __DIR__ . '/../..' . '/src/Notice/AvifSupportNotice.php',
|
140 |
'WebpConverter\\Notice\\CloudflareNotice' => __DIR__ . '/../..' . '/src/Notice/CloudflareNotice.php',
|
141 |
+
'WebpConverter\\Notice\\CloudwaysNotice' => __DIR__ . '/../..' . '/src/Notice/CloudwaysNotice.php',
|
142 |
'WebpConverter\\Notice\\LitespeedNotice' => __DIR__ . '/../..' . '/src/Notice/LitespeedNotice.php',
|
143 |
'WebpConverter\\Notice\\NoticeAbstract' => __DIR__ . '/../..' . '/src/Notice/NoticeAbstract.php',
|
144 |
'WebpConverter\\Notice\\NoticeIntegration' => __DIR__ . '/../..' . '/src/Notice/NoticeIntegration.php',
|
@@ -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 |
'matt-plugins/deactivation-modal' => array(
|
5 |
'type' => 'library',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
+
'reference' => '2fa84f4ea4fdd3bfc0d99ab1b7bca28e0bd991cf',
|
9 |
'name' => 'gbiorczyk/webp-converter-for-media',
|
10 |
'dev' => false,
|
11 |
),
|
16 |
'type' => 'library',
|
17 |
'install_path' => __DIR__ . '/../../',
|
18 |
'aliases' => array(),
|
19 |
+
'reference' => '2fa84f4ea4fdd3bfc0d99ab1b7bca28e0bd991cf',
|
20 |
'dev_requirement' => false,
|
21 |
),
|
22 |
'matt-plugins/deactivation-modal' => array(
|
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
|
3 |
/**
|
4 |
-
* Plugin Name:
|
5 |
-
* Description: Speed up your website by using our WebP & AVIF Converter. Serve WebP and AVIF images instead of standard formats JPEG, PNG and GIF just now!
|
6 |
-
* Version: 4.
|
7 |
* Author: Mateusz Gbiorczyk
|
8 |
* Author URI: https://mattplugins.com/
|
9 |
* Text Domain: webp-converter-for-media
|
@@ -13,5 +13,5 @@
|
|
13 |
require_once __DIR__ . '/vendor/autoload.php';
|
14 |
|
15 |
new WebpConverter\WebpConverter(
|
16 |
-
new WebpConverter\PluginInfo( __FILE__, '4.
|
17 |
);
|
1 |
<?php
|
2 |
|
3 |
/**
|
4 |
+
* Plugin Name: Converter for Media
|
5 |
+
* Description: Speed up your website by using our WebP & AVIF Converter (formerly WebP Converter for Media). Serve WebP and AVIF images instead of standard formats JPEG, PNG and GIF just now!
|
6 |
+
* Version: 4.5.0
|
7 |
* Author: Mateusz Gbiorczyk
|
8 |
* Author URI: https://mattplugins.com/
|
9 |
* Text Domain: webp-converter-for-media
|
13 |
require_once __DIR__ . '/vendor/autoload.php';
|
14 |
|
15 |
new WebpConverter\WebpConverter(
|
16 |
+
new WebpConverter\PluginInfo( __FILE__, '4.5.0' )
|
17 |
);
|