Version Description
(2022-02-13) =
* [Removed]
Action webpc_regenerate_all
* [Fixed]
Issue with plugin settings after changing Gd or Imagick library configuration
* [Fixed]
Server configuration error detection when cURL is disabled
* [Fixed]
URL for the server configuration tab
* [Changed]
Automatically conversion of images after upload
* [Changed]
Automatically conversion of images from outside the Media Library
* [Changed]
Message for conversion error when converted file is larger than original
* [Added]
List of allowed file extensions for cache rules in .htaccess file
* [Added]
Status of automatic image conversion on the top bar in the WordPress Dashboard
* [Added]
Debug information about plugin settings
See changelog.txt for previous versions.
=
Download this release
Release Info
Developer | mateuszgbiorczyk |
Plugin | Converter for Media – Optimize images | Convert WebP & AVIF |
Version | 4.2.0 |
Comparing to | |
See all releases |
Code changes from version 4.1.2 to 4.2.0
- assets/build/css/styles.css +1 -1
- assets/fonts/icons/icomoon.eot +0 -0
- assets/fonts/icons/icomoon.svg +11 -0
- assets/fonts/icons/icomoon.ttf +0 -0
- assets/fonts/icons/icomoon.woff +0 -0
- assets/img/author.jpg +0 -0
- assets/img/author.png +0 -0
- changelog.txt +12 -0
- readme.txt +14 -30
- src/Action/RegenerateAll.php +0 -49
- src/Conversion/Cron/CronEventGenerator.php +68 -0
- src/Conversion/Cron/CronInitiator.php +118 -0
- src/Conversion/Cron/{Schedules.php → CronSchedulesGenerator.php} +6 -6
- src/Conversion/Cron/CronStatusManager.php +94 -0
- src/Conversion/Cron/CronStatusViewer.php +89 -0
- src/Conversion/Cron/Event.php +0 -47
- src/Conversion/Endpoint/CronConversionEndpoint.php +81 -0
- src/Conversion/Endpoint/EndpointAbstract.php +11 -0
- src/Conversion/Endpoint/EndpointIntegration.php +2 -7
- src/Conversion/Endpoint/EndpointInterface.php +9 -0
- src/Conversion/Endpoint/PathsEndpoint.php +16 -3
- src/Conversion/Endpoint/RegenerateEndpoint.php +11 -2
- src/Conversion/Media/Upload.php +29 -22
- src/Error/Detector/RewritesErrorsDetector.php +10 -1
- src/Exception/LargerThanOriginalException.php +1 -1
- src/Loader/HtaccessLoader.php +10 -3
- src/Notice/ThanksNotice.php +1 -1
- src/Plugin/Deactivation/CronReset.php +2 -2
- src/Plugin/Links.php +21 -14
- src/Plugin/Uninstall/PluginSettings.php +6 -0
- src/Settings/Option/ExtraFeaturesOption.php +0 -6
- src/Settings/Option/OutputFormatsOption.php +8 -6
- src/Settings/Page/DebugPage.php +17 -0
- src/Settings/Page/PageIntegration.php +1 -1
- src/Settings/SettingsSave.php +2 -2
- src/WebpConverter.php +7 -5
- templates/components/notices/thanks.php +3 -9
- templates/components/server/debug.php +13 -6
- templates/components/widgets/regenerate.php +6 -4
- templates/components/widgets/server.php +9 -8
- templates/views/settings-debug.php +9 -8
- vendor/autoload.php +1 -1
- vendor/composer/autoload_classmap.php +6 -3
- vendor/composer/autoload_real.php +4 -4
- vendor/composer/autoload_static.php +10 -7
- vendor/composer/installed.php +2 -2
- webp-converter-for-media.php +2 -2
assets/build/css/styles.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
@charset "UTF-8";@keyframes dotsLoading{0%,to{content:"..."}25%{content:" .."}50%{content:". ."}75%{content:".. "}}.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}.notice[data-notice=webp-converter]{margin-top:20px;padding:0}.webpButton{background-color:#fff;border:1px solid transparent;box-shadow:none!important;box-sizing:border-box;cursor:pointer;display:inline-block;font-size:14px;font-weight:500;line-height:1.5714285714;min-width:180px;opacity:1!important;outline:none!important;padding:9px 30px;position:relative;text-align:center;text-decoration:none!important;transition:color .3s!important;z-index:10}p>.webpButton{margin:6px 0}.webpButton:before{float:left;font-family:dashicons;font-size:20px;line-height:1.1;margin-right:10px}.webpButton:after{content:"";height:100%;left:0;position:absolute;top:0;transition:width .3s;width:0;z-index:-1}.webpButton:hover:after{width:100%}.webpButton[disabled]{opacity:.5!important;pointer-events:none}.webpButton--blue:hover,.webpButton--gray:hover,.webpButton--green:hover,.webpButton--red:hover{color:#fff!important}.webpButton--blue{border-color:#2271b1;color:#2271b1!important}.webpButton--blue.webpButton--bg,.webpButton--blue:after{background-color:#2271b1}.webpButton--blue.webpButton--bg:after{background-color:#135e96}.webpButton--green{border-color:#00a32a;color:#00a32a!important}.webpButton--green.webpButton--bg,.webpButton--green:after{background-color:#00a32a}.webpButton--green.webpButton--bg:after{background-color:#008a20}.webpButton--red{border-color:#d63638;color:#d63638!important}.webpButton--red.webpButton--bg,.webpButton--red:after{background-color:#d63638}.webpButton--red.webpButton--bg:after{background-color:#b32d2e}.webpButton--gray{border-color:#c3c4c7;color:#c3c4c7!important}.webpButton--gray.webpButton--bg,.webpButton--gray:after{background-color:#c3c4c7}.webpButton--gray.webpButton--bg:after{background-color:#a7aaad}.webpButton--bg{color:#fff!important}.webpContent{padding:20px 30px}.webpContent p{font-size:14px;line-height:1.5714285714;max-width:800px}.webpContent p.center{text-align:center}.webpContent--wide p{max-width:100%}.webpContent a{box-shadow:none;color:#2271b1;outline:none;text-decoration:underline;transition:opacity .3s}.webpContent a:hover{opacity:.5}.webpContent h1,.webpContent h2,.webpContent h3,.webpContent h4,.webpContent h5,.webpContent h6{font-size:16px;font-weight:500;line-height:1.5}.webpContent h1,.webpContent h2,.webpContent h3,.webpContent h4,.webpContent h5,.webpContent h6,.webpContent p{margin:10px 0 0;padding:4px 0}.webpContent h1:first-child,.webpContent h2:first-child,.webpContent h3:first-child,.webpContent h4:first-child,.webpContent h5:first-child,.webpContent h6:first-child,.webpContent p:first-child,.webpContent p>p,.webpInput+p{margin-top:0}.webpContent h1+p,.webpContent h2+p,.webpContent h3+p,.webpContent h4+p,.webpContent h5+p,.webpContent h6+p{font-size:12px;line-height:1.75;margin-top:0}.webpContent--notice h1+p,.webpContent--notice h2+p,.webpContent--notice h3+p,.webpContent--notice h4+p,.webpContent--notice h5+p,.webpContent--notice h6+p{font-size:14px;line-height:1.5714285714}.webpContent__buttons{margin-top:-10px;overflow:hidden;padding:10px 0}.webpContent__button{float:left;margin:20px 20px 0 0}.webpContent__button:last-child{margin-right:0}.webpField{display:flex;padding:10px 0}.webpField+.webpField{margin-top:-12px}.webpField__input{display:none!important}.webpField__input+label{display:inline-block;position:relative}.webpField__input[disabled]+label{pointer-events:none}.webpField__input[disabled]+label:after,.webpField__input[disabled]+label:before{opacity:.25}.webpField__input--checkbox+label,.webpField__input--radio+label{height:22px;width:22px}.webpField__input--checkbox+label:after,.webpField__input--checkbox+label:before,.webpField__input--radio+label:after,.webpField__input--radio+label:before{align-items:center;content:"";display:flex;height:22px;justify-content:center;left:0;position:absolute;top:0;width:22px}.webpField__input--checkbox+label:before,.webpField__input--radio+label:before{border:1px solid #c3c4c7}.webpField__input--checkbox+label:after,.webpField__input--radio+label:after{position:absolute;transform:scale(0);transition:transform .3s}.webpField__input--checkbox:checked+label:after,.webpField__input--radio:checked+label:after{transform:scale(1)}.webpField__input--checkbox+label:after{color:#00a32a;content:"\f147";font-family:dashicons;font-size:20px;line-height:1}.webpField__input--radio+label:before{border-radius:50%}.webpField__input--radio+label:after{background-color:#00a32a;border-radius:50%;content:"";height:6px;left:8px;top:8px;width:6px}.webpField__input--toggle+label{height:22px;width:44px}.webpField__input--toggle+label:after,.webpField__input--toggle+label:before{content:"";position:absolute}.webpField__input--toggle+label:before{background-color:#dcdcde;border:1px solid #c3c4c7;border-radius:11px;height:22px;left:0;top:0;transition:background-color .3s;width:44px}.webpField__input--toggle+label:after{background-color:#fff;border-radius:50%;height:16px;left:3px;position:absolute;top:3px;transition:transform .3s;width:16px}.webpField__input--toggle:checked+label:before{background-color:#00a32a}.webpField__input--toggle:checked+label:after{transform:translateX(22px)}.webpField__label{display:block;flex:1;font-size:14px;line-height:1.5714285714;margin-left:20px;max-width:650px;position:relative}.webpInput{align-items:center;display:flex;padding:10px 0}.webpInput__field{border:1px solid #c3c4c7!important;border-radius:0!important;box-shadow:none!important;flex:1;font-size:14px!important;line-height:1.5714285714!important;padding:9px 15px!important}.webpInput__field[readonly]{background-color:#f0f0f1}.webpInput__button{margin:0 0 0 10px!important}.webpLoader__status{padding:20px 0 10px;position:relative}.webpLoader__bar--hidden{display:none}.webpLoader__barProgress{font-size:0;height:21px;line-height:0;position:relative}.webpLoader__barProgress:before{background-color:#00a32a;content:"";height:100%;left:0;position:absolute;top:0;transition:width .3s;width:0}.webpLoader__barProgress--error:before{background-color:#d63638}.webpLoader__barProgress[data-percent="0"]:before{width:0}.webpLoader__barProgress[data-percent="1"]:before{width:1%}.webpLoader__barProgress[data-percent="2"]:before{width:2%}.webpLoader__barProgress[data-percent="3"]:before{width:3%}.webpLoader__barProgress[data-percent="4"]:before{width:4%}.webpLoader__barProgress[data-percent="5"]:before{width:5%}.webpLoader__barProgress[data-percent="6"]:before{width:6%}.webpLoader__barProgress[data-percent="7"]:before{width:7%}.webpLoader__barProgress[data-percent="8"]:before{width:8%}.webpLoader__barProgress[data-percent="9"]:before{width:9%}.webpLoader__barProgress[data-percent="10"]:before{width:10%}.webpLoader__barProgress[data-percent="11"]:before{width:11%}.webpLoader__barProgress[data-percent="12"]:before{width:12%}.webpLoader__barProgress[data-percent="13"]:before{width:13%}.webpLoader__barProgress[data-percent="14"]:before{width:14%}.webpLoader__barProgress[data-percent="15"]:before{width:15%}.webpLoader__barProgress[data-percent="16"]:before{width:16%}.webpLoader__barProgress[data-percent="17"]:before{width:17%}.webpLoader__barProgress[data-percent="18"]:before{width:18%}.webpLoader__barProgress[data-percent="19"]:before{width:19%}.webpLoader__barProgress[data-percent="20"]:before{width:20%}.webpLoader__barProgress[data-percent="21"]:before{width:21%}.webpLoader__barProgress[data-percent="22"]:before{width:22%}.webpLoader__barProgress[data-percent="23"]:before{width:23%}.webpLoader__barProgress[data-percent="24"]:before{width:24%}.webpLoader__barProgress[data-percent="25"]:before{width:25%}.webpLoader__barProgress[data-percent="26"]:before{width:26%}.webpLoader__barProgress[data-percent="27"]:before{width:27%}.webpLoader__barProgress[data-percent="28"]:before{width:28%}.webpLoader__barProgress[data-percent="29"]:before{width:29%}.webpLoader__barProgress[data-percent="30"]:before{width:30%}.webpLoader__barProgress[data-percent="31"]:before{width:31%}.webpLoader__barProgress[data-percent="32"]:before{width:32%}.webpLoader__barProgress[data-percent="33"]:before{width:33%}.webpLoader__barProgress[data-percent="34"]:before{width:34%}.webpLoader__barProgress[data-percent="35"]:before{width:35%}.webpLoader__barProgress[data-percent="36"]:before{width:36%}.webpLoader__barProgress[data-percent="37"]:before{width:37%}.webpLoader__barProgress[data-percent="38"]:before{width:38%}.webpLoader__barProgress[data-percent="39"]:before{width:39%}.webpLoader__barProgress[data-percent="40"]:before{width:40%}.webpLoader__barProgress[data-percent="41"]:before{width:41%}.webpLoader__barProgress[data-percent="42"]:before{width:42%}.webpLoader__barProgress[data-percent="43"]:before{width:43%}.webpLoader__barProgress[data-percent="44"]:before{width:44%}.webpLoader__barProgress[data-percent="45"]:before{width:45%}.webpLoader__barProgress[data-percent="46"]:before{width:46%}.webpLoader__barProgress[data-percent="47"]:before{width:47%}.webpLoader__barProgress[data-percent="48"]:before{width:48%}.webpLoader__barProgress[data-percent="49"]:before{width:49%}.webpLoader__barProgress[data-percent="50"]:before{width:50%}.webpLoader__barProgress[data-percent="51"]:before{width:51%}.webpLoader__barProgress[data-percent="52"]:before{width:52%}.webpLoader__barProgress[data-percent="53"]:before{width:53%}.webpLoader__barProgress[data-percent="54"]:before{width:54%}.webpLoader__barProgress[data-percent="55"]:before{width:55%}.webpLoader__barProgress[data-percent="56"]:before{width:56%}.webpLoader__barProgress[data-percent="57"]:before{width:57%}.webpLoader__barProgress[data-percent="58"]:before{width:58%}.webpLoader__barProgress[data-percent="59"]:before{width:59%}.webpLoader__barProgress[data-percent="60"]:before{width:60%}.webpLoader__barProgress[data-percent="61"]:before{width:61%}.webpLoader__barProgress[data-percent="62"]:before{width:62%}.webpLoader__barProgress[data-percent="63"]:before{width:63%}.webpLoader__barProgress[data-percent="64"]:before{width:64%}.webpLoader__barProgress[data-percent="65"]:before{width:65%}.webpLoader__barProgress[data-percent="66"]:before{width:66%}.webpLoader__barProgress[data-percent="67"]:before{width:67%}.webpLoader__barProgress[data-percent="68"]:before{width:68%}.webpLoader__barProgress[data-percent="69"]:before{width:69%}.webpLoader__barProgress[data-percent="70"]:before{width:70%}.webpLoader__barProgress[data-percent="71"]:before{width:71%}.webpLoader__barProgress[data-percent="72"]:before{width:72%}.webpLoader__barProgress[data-percent="73"]:before{width:73%}.webpLoader__barProgress[data-percent="74"]:before{width:74%}.webpLoader__barProgress[data-percent="75"]:before{width:75%}.webpLoader__barProgress[data-percent="76"]:before{width:76%}.webpLoader__barProgress[data-percent="77"]:before{width:77%}.webpLoader__barProgress[data-percent="78"]:before{width:78%}.webpLoader__barProgress[data-percent="79"]:before{width:79%}.webpLoader__barProgress[data-percent="80"]:before{width:80%}.webpLoader__barProgress[data-percent="81"]:before{width:81%}.webpLoader__barProgress[data-percent="82"]:before{width:82%}.webpLoader__barProgress[data-percent="83"]:before{width:83%}.webpLoader__barProgress[data-percent="84"]:before{width:84%}.webpLoader__barProgress[data-percent="85"]:before{width:85%}.webpLoader__barProgress[data-percent="86"]:before{width:86%}.webpLoader__barProgress[data-percent="87"]:before{width:87%}.webpLoader__barProgress[data-percent="88"]:before{width:88%}.webpLoader__barProgress[data-percent="89"]:before{width:89%}.webpLoader__barProgress[data-percent="90"]:before{width:90%}.webpLoader__barProgress[data-percent="91"]:before{width:91%}.webpLoader__barProgress[data-percent="92"]:before{width:92%}.webpLoader__barProgress[data-percent="93"]:before{width:93%}.webpLoader__barProgress[data-percent="94"]:before{width:94%}.webpLoader__barProgress[data-percent="95"]:before{width:95%}.webpLoader__barProgress[data-percent="96"]:before{width:96%}.webpLoader__barProgress[data-percent="97"]:before{width:97%}.webpLoader__barProgress[data-percent="98"]:before{width:98%}.webpLoader__barProgress[data-percent="99"]:before{width:99%}.webpLoader__barProgress[data-percent="100"]:before{width:100%}.webpLoader__barCount{background-color:#00a32a;color:#fff;display:inline-block;font-family:monospace;font-size:12px;line-height:1.75;padding:0 5px;position:relative}.webpLoader__barProgress--error .webpLoader__barCount{background-color:#d63638}.webpLoader__barCount:after{animation:dotsLoading 1s linear infinite;content:"...";margin-left:5px}.webpLoader__barProgress--error .webpLoader__barCount:after,.webpLoader__barProgress[data-percent="100"] .webpLoader__barCount:after{display:none}.webpLoader__barProgress[data-percent="0"] .webpLoader__barCount:before{content:"0%"}.webpLoader__barProgress[data-percent="1"] .webpLoader__barCount:before{content:"1%"}.webpLoader__barProgress[data-percent="2"] .webpLoader__barCount:before{content:"2%"}.webpLoader__barProgress[data-percent="3"] .webpLoader__barCount:before{content:"3%"}.webpLoader__barProgress[data-percent="4"] .webpLoader__barCount:before{content:"4%"}.webpLoader__barProgress[data-percent="5"] .webpLoader__barCount:before{content:"5%"}.webpLoader__barProgress[data-percent="6"] .webpLoader__barCount:before{content:"6%"}.webpLoader__barProgress[data-percent="7"] .webpLoader__barCount:before{content:"7%"}.webpLoader__barProgress[data-percent="8"] .webpLoader__barCount:before{content:"8%"}.webpLoader__barProgress[data-percent="9"] .webpLoader__barCount:before{content:"9%"}.webpLoader__barProgress[data-percent="10"] .webpLoader__barCount:before{content:"10%"}.webpLoader__barProgress[data-percent="11"] .webpLoader__barCount:before{content:"11%"}.webpLoader__barProgress[data-percent="12"] .webpLoader__barCount:before{content:"12%"}.webpLoader__barProgress[data-percent="13"] .webpLoader__barCount:before{content:"13%"}.webpLoader__barProgress[data-percent="14"] .webpLoader__barCount:before{content:"14%"}.webpLoader__barProgress[data-percent="15"] .webpLoader__barCount:before{content:"15%"}.webpLoader__barProgress[data-percent="16"] .webpLoader__barCount:before{content:"16%"}.webpLoader__barProgress[data-percent="17"] .webpLoader__barCount:before{content:"17%"}.webpLoader__barProgress[data-percent="18"] .webpLoader__barCount:before{content:"18%"}.webpLoader__barProgress[data-percent="19"] .webpLoader__barCount:before{content:"19%"}.webpLoader__barProgress[data-percent="20"] .webpLoader__barCount:before{content:"20%"}.webpLoader__barProgress[data-percent="21"] .webpLoader__barCount:before{content:"21%"}.webpLoader__barProgress[data-percent="22"] .webpLoader__barCount:before{content:"22%"}.webpLoader__barProgress[data-percent="23"] .webpLoader__barCount:before{content:"23%"}.webpLoader__barProgress[data-percent="24"] .webpLoader__barCount:before{content:"24%"}.webpLoader__barProgress[data-percent="25"] .webpLoader__barCount:before{content:"25%"}.webpLoader__barProgress[data-percent="26"] .webpLoader__barCount:before{content:"26%"}.webpLoader__barProgress[data-percent="27"] .webpLoader__barCount:before{content:"27%"}.webpLoader__barProgress[data-percent="28"] .webpLoader__barCount:before{content:"28%"}.webpLoader__barProgress[data-percent="29"] .webpLoader__barCount:before{content:"29%"}.webpLoader__barProgress[data-percent="30"] .webpLoader__barCount:before{content:"30%"}.webpLoader__barProgress[data-percent="31"] .webpLoader__barCount:before{content:"31%"}.webpLoader__barProgress[data-percent="32"] .webpLoader__barCount:before{content:"32%"}.webpLoader__barProgress[data-percent="33"] .webpLoader__barCount:before{content:"33%"}.webpLoader__barProgress[data-percent="34"] .webpLoader__barCount:before{content:"34%"}.webpLoader__barProgress[data-percent="35"] .webpLoader__barCount:before{content:"35%"}.webpLoader__barProgress[data-percent="36"] .webpLoader__barCount:before{content:"36%"}.webpLoader__barProgress[data-percent="37"] .webpLoader__barCount:before{content:"37%"}.webpLoader__barProgress[data-percent="38"] .webpLoader__barCount:before{content:"38%"}.webpLoader__barProgress[data-percent="39"] .webpLoader__barCount:before{content:"39%"}.webpLoader__barProgress[data-percent="40"] .webpLoader__barCount:before{content:"40%"}.webpLoader__barProgress[data-percent="41"] .webpLoader__barCount:before{content:"41%"}.webpLoader__barProgress[data-percent="42"] .webpLoader__barCount:before{content:"42%"}.webpLoader__barProgress[data-percent="43"] .webpLoader__barCount:before{content:"43%"}.webpLoader__barProgress[data-percent="44"] .webpLoader__barCount:before{content:"44%"}.webpLoader__barProgress[data-percent="45"] .webpLoader__barCount:before{content:"45%"}.webpLoader__barProgress[data-percent="46"] .webpLoader__barCount:before{content:"46%"}.webpLoader__barProgress[data-percent="47"] .webpLoader__barCount:before{content:"47%"}.webpLoader__barProgress[data-percent="48"] .webpLoader__barCount:before{content:"48%"}.webpLoader__barProgress[data-percent="49"] .webpLoader__barCount:before{content:"49%"}.webpLoader__barProgress[data-percent="50"] .webpLoader__barCount:before{content:"50%"}.webpLoader__barProgress[data-percent="51"] .webpLoader__barCount:before{content:"51%"}.webpLoader__barProgress[data-percent="52"] .webpLoader__barCount:before{content:"52%"}.webpLoader__barProgress[data-percent="53"] .webpLoader__barCount:before{content:"53%"}.webpLoader__barProgress[data-percent="54"] .webpLoader__barCount:before{content:"54%"}.webpLoader__barProgress[data-percent="55"] .webpLoader__barCount:before{content:"55%"}.webpLoader__barProgress[data-percent="56"] .webpLoader__barCount:before{content:"56%"}.webpLoader__barProgress[data-percent="57"] .webpLoader__barCount:before{content:"57%"}.webpLoader__barProgress[data-percent="58"] .webpLoader__barCount:before{content:"58%"}.webpLoader__barProgress[data-percent="59"] .webpLoader__barCount:before{content:"59%"}.webpLoader__barProgress[data-percent="60"] .webpLoader__barCount:before{content:"60%"}.webpLoader__barProgress[data-percent="61"] .webpLoader__barCount:before{content:"61%"}.webpLoader__barProgress[data-percent="62"] .webpLoader__barCount:before{content:"62%"}.webpLoader__barProgress[data-percent="63"] .webpLoader__barCount:before{content:"63%"}.webpLoader__barProgress[data-percent="64"] .webpLoader__barCount:before{content:"64%"}.webpLoader__barProgress[data-percent="65"] .webpLoader__barCount:before{content:"65%"}.webpLoader__barProgress[data-percent="66"] .webpLoader__barCount:before{content:"66%"}.webpLoader__barProgress[data-percent="67"] .webpLoader__barCount:before{content:"67%"}.webpLoader__barProgress[data-percent="68"] .webpLoader__barCount:before{content:"68%"}.webpLoader__barProgress[data-percent="69"] .webpLoader__barCount:before{content:"69%"}.webpLoader__barProgress[data-percent="70"] .webpLoader__barCount:before{content:"70%"}.webpLoader__barProgress[data-percent="71"] .webpLoader__barCount:before{content:"71%"}.webpLoader__barProgress[data-percent="72"] .webpLoader__barCount:before{content:"72%"}.webpLoader__barProgress[data-percent="73"] .webpLoader__barCount:before{content:"73%"}.webpLoader__barProgress[data-percent="74"] .webpLoader__barCount:before{content:"74%"}.webpLoader__barProgress[data-percent="75"] .webpLoader__barCount:before{content:"75%"}.webpLoader__barProgress[data-percent="76"] .webpLoader__barCount:before{content:"76%"}.webpLoader__barProgress[data-percent="77"] .webpLoader__barCount:before{content:"77%"}.webpLoader__barProgress[data-percent="78"] .webpLoader__barCount:before{content:"78%"}.webpLoader__barProgress[data-percent="79"] .webpLoader__barCount:before{content:"79%"}.webpLoader__barProgress[data-percent="80"] .webpLoader__barCount:before{content:"80%"}.webpLoader__barProgress[data-percent="81"] .webpLoader__barCount:before{content:"81%"}.webpLoader__barProgress[data-percent="82"] .webpLoader__barCount:before{content:"82%"}.webpLoader__barProgress[data-percent="83"] .webpLoader__barCount:before{content:"83%"}.webpLoader__barProgress[data-percent="84"] .webpLoader__barCount:before{content:"84%"}.webpLoader__barProgress[data-percent="85"] .webpLoader__barCount:before{content:"85%"}.webpLoader__barProgress[data-percent="86"] .webpLoader__barCount:before{content:"86%"}.webpLoader__barProgress[data-percent="87"] .webpLoader__barCount:before{content:"87%"}.webpLoader__barProgress[data-percent="88"] .webpLoader__barCount:before{content:"88%"}.webpLoader__barProgress[data-percent="89"] .webpLoader__barCount:before{content:"89%"}.webpLoader__barProgress[data-percent="90"] .webpLoader__barCount:before{content:"90%"}.webpLoader__barProgress[data-percent="91"] .webpLoader__barCount:before{content:"91%"}.webpLoader__barProgress[data-percent="92"] .webpLoader__barCount:before{content:"92%"}.webpLoader__barProgress[data-percent="93"] .webpLoader__barCount:before{content:"93%"}.webpLoader__barProgress[data-percent="94"] .webpLoader__barCount:before{content:"94%"}.webpLoader__barProgress[data-percent="95"] .webpLoader__barCount:before{content:"95%"}.webpLoader__barProgress[data-percent="96"] .webpLoader__barCount:before{content:"96%"}.webpLoader__barProgress[data-percent="97"] .webpLoader__barCount:before{content:"97%"}.webpLoader__barProgress[data-percent="98"] .webpLoader__barCount:before{content:"98%"}.webpLoader__barProgress[data-percent="99"] .webpLoader__barCount:before{content:"99%"}.webpLoader__barProgress[data-percent="100"] .webpLoader__barCount:before{content:"100%"}.webpLoader__size{font-size:14px;line-height:1.5714285714;margin-bottom:-10px;padding:4px 0}.webpLoader__sizeProgress{font-weight:500}.webpLoader__success{margin-top:20px;padding:4px 0 4px 20px;position:relative}.webpLoader__success:before{background-color:#00a32a;content:"";height:100%;left:0;position:absolute;top:0;width:2px}.webpLoader__successContent{color:#00a32a;font-size:14px;font-weight:500;line-height:1.5714285714}.webpLoader__successContent a{color:inherit}.webpLoader__errors{border-left:2px solid #c3c4c7;margin-top:20px}.webpLoader__errorsTitle{background-color:#c3c4c7;color:#fff;display:inline-block;font-size:14px;line-height:1.5714285714;padding:4px 22px}.webpLoader__errorsContent{padding:10px 0 10px 20px}.webpLoader__errorsContent>p{font-size:12px;line-height:1.75;margin:0;max-width:100%}.webpLoader__errorsContent>p.webpLoader__errorsContentError{color:#d63638;font-size:14px;font-weight:500;line-height:1.5714285714}.webpLoader__errorsContent pre{font-size:12px;line-height:1.75;white-space:normal}.webpLoader__button--disabled{opacity:.25!important;pointer-events:none}.webpPopup{margin-top:20px}.webpPopup__inner{background-color:#fff;display:flex;flex-wrap:wrap}.webpPopup__image{background-image:url(../../img/author.jpg);background-position:50%;background-repeat:no-repeat;background-size:cover;width:152px}.webpPopup__content{border:1px solid #c3c4c7;border-left:0;flex:1;padding:10px 20px}.webpServerInfo{color:#222;text-align:center}.webpServerInfo pre{font-family:monospace;margin:0}.webpServerInfo h1,.webpServerInfo h2{display:none}.webpServerInfo p{max-width:100%}.webpServerInfo table{border:0;border-collapse:collapse;margin:10px auto;width:100%}.webpServerInfo td,.webpServerInfo th{border:1px solid #666;font-family:monospace;font-size:12px;line-height:1.75;padding:4px 5px;text-align:center;vertical-align:baseline}.webpServerInfo .p{text-align:left}.webpServerInfo .e{background-color:#ccf;font-weight:700;width:300px}.webpServerInfo .h{background-color:#99c;font-weight:700}.webpServerInfo .v{word-wrap:break-word;background-color:#ddd;max-width:300px;overflow-x:auto}.webpServerInfo .v i{color:#999}.webpServerInfo img{border:0;float:right}@media screen and (max-width:1024px){.webpPage__column--large{width:100%}.webpPage__column--small{margin-top:40px;width:100%}.webpPage__widget+.webpPage__widget{margin-top:40px}.webpPage__widgetColumns{display:block}.webpPage__widgetColumn{width:100%}}@media screen and (max-width:782px){.webpPage{padding-right:0}.webpPage__quality{display:block}.webpPage__qualityItem{border-left:0}.webpPage__qualityItem+.webpPage__qualityItem{border-top:1px solid #c3c4c7}.webpInput{display:block}.webpInput__field{width:100%}.webpInput__button{margin:10px 0 0!important}.webpPopup__inner{border:1px solid #c3c4c7;display:block}.webpPopup__image{height:152px;margin:20px auto 0}.webpPopup__content{border: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=11379178);src:url(../../fonts/icons/icomoon.woff?ver=11379178) format("woff"),url(../../fonts/icons/icomoon.eot?ver=11379178#iefix) format("embedded-opentype"),url(../../fonts/icons/icomoon.ttf?ver=11379178) format("truetype"),url(../../fonts/icons/icomoon.svg?ver=11379178#icomoon) format("svg")}.icon-logo:before{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\e900"!important;font-family:webpc-icomoon!important;font-style:normal;font-variant:normal;font-weight:400;text-transform:none}.webpPage{color:#101517;margin:0;overflow:hidden;padding:0 20px 0 0}.webpPage *,.webpPage :after,.webpPage :before{box-sizing:border-box;margin:0;padding:0}.webpPage [hidden]{display:none!important}.webpPage .webpPage__headline{font-size:24px;line-height:1.2083333333;margin:0;padding:15px 0 23px}.webpPage__alert{background-color:#00a32a;color:#fff;font-size:14px;line-height:1.5714285714;margin-bottom:30px;padding:15px 20px}.webpPage__columns{margin:0 -30px;overflow:hidden}.webpPage__column{float:left;padding:0 30px}.webpPage__column--large{width:66.666%}.webpPage__column--small{width:33.333%}.webpPage__widget{background-color:#fff}.webpPage__widget+.webpPage__widget{margin-top:60px}.webpPage__widgetTitle{background-color:#2271b1;color:#fff;font-size:16px;font-weight:400;line-height:1.5;padding:14px 30px}.webpPage__widgetTitle--second{background-color:#a7aaad}.webpPage__widgetTitle--error{background-color:#d63638}.webpPage__widgetRow{padding-bottom:10px}.webpPage__widgetRow:last-child{padding-bottom:0}.webpPage__widgetRow .webpButton{margin:10px 0}.webpPage__widgetColumns{display:flex;flex-wrap:wrap;margin:0 -10px}.webpPage__widgetColumn{padding:0 10px;width:50%}.webpPage__widgetColumn:first-child:last-child{flex:1}.webpPage__widgetColumnNotice{background-color:#2271b1;margin:10px 0;padding:10px 20px}.webpPage__widgetColumnNotice p{color:#fff;font-size:1.2rem}.webpPage__widgetColumnNotice p+p{margin-top:0}.webpPage__widgetColumnNotice p a{color:inherit;font-weight:500;letter-spacing:1px;text-decoration:none;text-transform:uppercase}.webpPage__quality{border:1px solid #c3c4c7;display:flex;flex-wrap:wrap;margin:10px 0}.webpPage__qualityItem{border-left:1px solid #c3c4c7;flex:1;margin-left:-1px;text-align:center}.webpPage__qualityItemInput{display:none!important}.webpPage__qualityItemLabel{display:block;font-size:14px;line-height:1.5714285714;padding:14px 20px;position:relative;transition:color .3s,background-color .3s}.webpPage__qualityItemInput:checked+.webpPage__qualityItemLabel{background-color:#00a32a;color:#fff;margin:-1px;padding:15px 21px}.webpPage__qualityItemInput[disabled]+.webpPage__qualityItemLabel{opacity:0;pointer-events:none}#wp-admin-bar-webpc-menu .ab-icon:before{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\e900"!important;font-family:webpc-icomoon!important;font-style:normal;font-variant:normal;font-weight:400;text-transform:none}.notice[data-notice=webp-converter]{margin-top:20px;padding:0}.webpButton{background-color:#fff;border:1px solid transparent;box-shadow:none!important;box-sizing:border-box;cursor:pointer;display:inline-block;font-size:14px;font-weight:500;line-height:1.5714285714;min-width:180px;opacity:1!important;outline:none!important;padding:9px 30px;position:relative;text-align:center;text-decoration:none!important;transition:color .3s!important;z-index:10}p>.webpButton{margin:6px 0}.webpButton:before{float:left;font-family:dashicons;font-size:20px;line-height:1.1;margin-right:10px}.webpButton:after{content:"";height:100%;left:0;position:absolute;top:0;transition:width .3s;width:0;z-index:-1}.webpButton:hover:after{width:100%}.webpButton[disabled]{opacity:.5!important;pointer-events:none}.webpButton--blue:hover,.webpButton--gray:hover,.webpButton--green:hover,.webpButton--red:hover{color:#fff!important}.webpButton--blue{border-color:#2271b1;color:#2271b1!important}.webpButton--blue.webpButton--bg,.webpButton--blue:after{background-color:#2271b1}.webpButton--blue.webpButton--bg:after{background-color:#135e96}.webpButton--green{border-color:#00a32a;color:#00a32a!important}.webpButton--green.webpButton--bg,.webpButton--green:after{background-color:#00a32a}.webpButton--green.webpButton--bg:after{background-color:#008a20}.webpButton--red{border-color:#d63638;color:#d63638!important}.webpButton--red.webpButton--bg,.webpButton--red:after{background-color:#d63638}.webpButton--red.webpButton--bg:after{background-color:#b32d2e}.webpButton--gray{border-color:#c3c4c7;color:#c3c4c7!important}.webpButton--gray.webpButton--bg,.webpButton--gray:after{background-color:#c3c4c7}.webpButton--gray.webpButton--bg:after{background-color:#a7aaad}.webpButton--bg{color:#fff!important;font-weight:400}.webpContent{padding:20px 30px}.webpContent p{font-size:14px;line-height:1.5714285714;max-width:800px}.webpContent p.center{text-align:center}.webpContent--wide p{max-width:100%}.webpContent a{box-shadow:none;color:#2271b1;outline:none;text-decoration:underline;transition:opacity .3s}.webpContent a:hover{opacity:.5}.webpContent h1,.webpContent h2,.webpContent h3,.webpContent h4,.webpContent h5,.webpContent h6{font-size:16px;font-weight:500;line-height:1.5}.webpContent h1,.webpContent h2,.webpContent h3,.webpContent h4,.webpContent h5,.webpContent h6,.webpContent p{margin:10px 0 0;padding:4px 0}.webpContent h1:first-child,.webpContent h2:first-child,.webpContent h3:first-child,.webpContent h4:first-child,.webpContent h5:first-child,.webpContent h6:first-child,.webpContent p:first-child,.webpContent p>p,.webpInput+p{margin-top:0}.webpContent h1+p,.webpContent h2+p,.webpContent h3+p,.webpContent h4+p,.webpContent h5+p,.webpContent h6+p{font-size:12px;line-height:1.75;margin-top:0}.webpContent--notice h1+p,.webpContent--notice h2+p,.webpContent--notice h3+p,.webpContent--notice h4+p,.webpContent--notice h5+p,.webpContent--notice h6+p{font-size:14px;line-height:1.5714285714}.webpContent__buttons{margin-top:-10px;overflow:hidden;padding:10px 0}.webpContent__button{float:left;margin:20px 20px 0 0}.webpContent__button:last-child{margin-right:0}.webpField{display:flex;padding:10px 0}.webpField+.webpField{margin-top:-12px}.webpField__input{display:none!important}.webpField__input+label{display:inline-block;position:relative}.webpField__input[disabled]+label{pointer-events:none}.webpField__input[disabled]+label:after,.webpField__input[disabled]+label:before{opacity:.25}.webpField__input--checkbox+label,.webpField__input--radio+label{height:22px;width:22px}.webpField__input--checkbox+label:after,.webpField__input--checkbox+label:before,.webpField__input--radio+label:after,.webpField__input--radio+label:before{align-items:center;content:"";display:flex;height:22px;justify-content:center;left:0;position:absolute;top:0;width:22px}.webpField__input--checkbox+label:before,.webpField__input--radio+label:before{border:1px solid #c3c4c7}.webpField__input--checkbox+label:after,.webpField__input--radio+label:after{position:absolute;transform:scale(0);transition:transform .3s}.webpField__input--checkbox:checked+label:after,.webpField__input--radio:checked+label:after{transform:scale(1)}.webpField__input--checkbox+label:after{color:#00a32a;content:"\f147";font-family:dashicons;font-size:20px;line-height:1}.webpField__input--radio+label:before{border-radius:50%}.webpField__input--radio+label:after{background-color:#00a32a;border-radius:50%;content:"";height:6px;left:8px;top:8px;width:6px}.webpField__input--toggle+label{height:22px;width:44px}.webpField__input--toggle+label:after,.webpField__input--toggle+label:before{content:"";position:absolute}.webpField__input--toggle+label:before{background-color:#dcdcde;border:1px solid #c3c4c7;border-radius:11px;height:22px;left:0;top:0;transition:background-color .3s;width:44px}.webpField__input--toggle+label:after{background-color:#fff;border-radius:50%;height:16px;left:3px;position:absolute;top:3px;transition:transform .3s;width:16px}.webpField__input--toggle:checked+label:before{background-color:#00a32a}.webpField__input--toggle:checked+label:after{transform:translateX(22px)}.webpField__label{display:block;flex:1;font-size:14px;line-height:1.5714285714;margin-left:20px;max-width:650px;position:relative}.webpInput{align-items:center;display:flex;padding:10px 0}.webpInput__field{border:1px solid #c3c4c7!important;border-radius:0!important;box-shadow:none!important;flex:1;font-size:14px!important;line-height:1.5714285714!important;padding:9px 15px!important}.webpInput__field[readonly]{background-color:#f0f0f1}.webpInput__button{margin:0 0 0 10px!important}.webpLoader__status{padding:20px 0 10px;position:relative}.webpLoader__bar--hidden{display:none}.webpLoader__barProgress{font-size:0;height:21px;line-height:0;position:relative}.webpLoader__barProgress:before{background-color:#00a32a;content:"";height:100%;left:0;position:absolute;top:0;transition:width .3s;width:0}.webpLoader__barProgress--error:before{background-color:#d63638}.webpLoader__barProgress[data-percent="0"]:before{width:0}.webpLoader__barProgress[data-percent="1"]:before{width:1%}.webpLoader__barProgress[data-percent="2"]:before{width:2%}.webpLoader__barProgress[data-percent="3"]:before{width:3%}.webpLoader__barProgress[data-percent="4"]:before{width:4%}.webpLoader__barProgress[data-percent="5"]:before{width:5%}.webpLoader__barProgress[data-percent="6"]:before{width:6%}.webpLoader__barProgress[data-percent="7"]:before{width:7%}.webpLoader__barProgress[data-percent="8"]:before{width:8%}.webpLoader__barProgress[data-percent="9"]:before{width:9%}.webpLoader__barProgress[data-percent="10"]:before{width:10%}.webpLoader__barProgress[data-percent="11"]:before{width:11%}.webpLoader__barProgress[data-percent="12"]:before{width:12%}.webpLoader__barProgress[data-percent="13"]:before{width:13%}.webpLoader__barProgress[data-percent="14"]:before{width:14%}.webpLoader__barProgress[data-percent="15"]:before{width:15%}.webpLoader__barProgress[data-percent="16"]:before{width:16%}.webpLoader__barProgress[data-percent="17"]:before{width:17%}.webpLoader__barProgress[data-percent="18"]:before{width:18%}.webpLoader__barProgress[data-percent="19"]:before{width:19%}.webpLoader__barProgress[data-percent="20"]:before{width:20%}.webpLoader__barProgress[data-percent="21"]:before{width:21%}.webpLoader__barProgress[data-percent="22"]:before{width:22%}.webpLoader__barProgress[data-percent="23"]:before{width:23%}.webpLoader__barProgress[data-percent="24"]:before{width:24%}.webpLoader__barProgress[data-percent="25"]:before{width:25%}.webpLoader__barProgress[data-percent="26"]:before{width:26%}.webpLoader__barProgress[data-percent="27"]:before{width:27%}.webpLoader__barProgress[data-percent="28"]:before{width:28%}.webpLoader__barProgress[data-percent="29"]:before{width:29%}.webpLoader__barProgress[data-percent="30"]:before{width:30%}.webpLoader__barProgress[data-percent="31"]:before{width:31%}.webpLoader__barProgress[data-percent="32"]:before{width:32%}.webpLoader__barProgress[data-percent="33"]:before{width:33%}.webpLoader__barProgress[data-percent="34"]:before{width:34%}.webpLoader__barProgress[data-percent="35"]:before{width:35%}.webpLoader__barProgress[data-percent="36"]:before{width:36%}.webpLoader__barProgress[data-percent="37"]:before{width:37%}.webpLoader__barProgress[data-percent="38"]:before{width:38%}.webpLoader__barProgress[data-percent="39"]:before{width:39%}.webpLoader__barProgress[data-percent="40"]:before{width:40%}.webpLoader__barProgress[data-percent="41"]:before{width:41%}.webpLoader__barProgress[data-percent="42"]:before{width:42%}.webpLoader__barProgress[data-percent="43"]:before{width:43%}.webpLoader__barProgress[data-percent="44"]:before{width:44%}.webpLoader__barProgress[data-percent="45"]:before{width:45%}.webpLoader__barProgress[data-percent="46"]:before{width:46%}.webpLoader__barProgress[data-percent="47"]:before{width:47%}.webpLoader__barProgress[data-percent="48"]:before{width:48%}.webpLoader__barProgress[data-percent="49"]:before{width:49%}.webpLoader__barProgress[data-percent="50"]:before{width:50%}.webpLoader__barProgress[data-percent="51"]:before{width:51%}.webpLoader__barProgress[data-percent="52"]:before{width:52%}.webpLoader__barProgress[data-percent="53"]:before{width:53%}.webpLoader__barProgress[data-percent="54"]:before{width:54%}.webpLoader__barProgress[data-percent="55"]:before{width:55%}.webpLoader__barProgress[data-percent="56"]:before{width:56%}.webpLoader__barProgress[data-percent="57"]:before{width:57%}.webpLoader__barProgress[data-percent="58"]:before{width:58%}.webpLoader__barProgress[data-percent="59"]:before{width:59%}.webpLoader__barProgress[data-percent="60"]:before{width:60%}.webpLoader__barProgress[data-percent="61"]:before{width:61%}.webpLoader__barProgress[data-percent="62"]:before{width:62%}.webpLoader__barProgress[data-percent="63"]:before{width:63%}.webpLoader__barProgress[data-percent="64"]:before{width:64%}.webpLoader__barProgress[data-percent="65"]:before{width:65%}.webpLoader__barProgress[data-percent="66"]:before{width:66%}.webpLoader__barProgress[data-percent="67"]:before{width:67%}.webpLoader__barProgress[data-percent="68"]:before{width:68%}.webpLoader__barProgress[data-percent="69"]:before{width:69%}.webpLoader__barProgress[data-percent="70"]:before{width:70%}.webpLoader__barProgress[data-percent="71"]:before{width:71%}.webpLoader__barProgress[data-percent="72"]:before{width:72%}.webpLoader__barProgress[data-percent="73"]:before{width:73%}.webpLoader__barProgress[data-percent="74"]:before{width:74%}.webpLoader__barProgress[data-percent="75"]:before{width:75%}.webpLoader__barProgress[data-percent="76"]:before{width:76%}.webpLoader__barProgress[data-percent="77"]:before{width:77%}.webpLoader__barProgress[data-percent="78"]:before{width:78%}.webpLoader__barProgress[data-percent="79"]:before{width:79%}.webpLoader__barProgress[data-percent="80"]:before{width:80%}.webpLoader__barProgress[data-percent="81"]:before{width:81%}.webpLoader__barProgress[data-percent="82"]:before{width:82%}.webpLoader__barProgress[data-percent="83"]:before{width:83%}.webpLoader__barProgress[data-percent="84"]:before{width:84%}.webpLoader__barProgress[data-percent="85"]:before{width:85%}.webpLoader__barProgress[data-percent="86"]:before{width:86%}.webpLoader__barProgress[data-percent="87"]:before{width:87%}.webpLoader__barProgress[data-percent="88"]:before{width:88%}.webpLoader__barProgress[data-percent="89"]:before{width:89%}.webpLoader__barProgress[data-percent="90"]:before{width:90%}.webpLoader__barProgress[data-percent="91"]:before{width:91%}.webpLoader__barProgress[data-percent="92"]:before{width:92%}.webpLoader__barProgress[data-percent="93"]:before{width:93%}.webpLoader__barProgress[data-percent="94"]:before{width:94%}.webpLoader__barProgress[data-percent="95"]:before{width:95%}.webpLoader__barProgress[data-percent="96"]:before{width:96%}.webpLoader__barProgress[data-percent="97"]:before{width:97%}.webpLoader__barProgress[data-percent="98"]:before{width:98%}.webpLoader__barProgress[data-percent="99"]:before{width:99%}.webpLoader__barProgress[data-percent="100"]:before{width:100%}.webpLoader__barCount{background-color:#00a32a;color:#fff;display:inline-block;font-family:monospace;font-size:12px;line-height:1.75;padding:0 5px;position:relative}.webpLoader__barProgress--error .webpLoader__barCount{background-color:#d63638}.webpLoader__barCount:after{animation:dotsLoading 1s linear infinite;content:"...";margin-left:5px}.webpLoader__barProgress--error .webpLoader__barCount:after,.webpLoader__barProgress[data-percent="100"] .webpLoader__barCount:after{display:none}.webpLoader__barProgress[data-percent="0"] .webpLoader__barCount:before{content:"0%"}.webpLoader__barProgress[data-percent="1"] .webpLoader__barCount:before{content:"1%"}.webpLoader__barProgress[data-percent="2"] .webpLoader__barCount:before{content:"2%"}.webpLoader__barProgress[data-percent="3"] .webpLoader__barCount:before{content:"3%"}.webpLoader__barProgress[data-percent="4"] .webpLoader__barCount:before{content:"4%"}.webpLoader__barProgress[data-percent="5"] .webpLoader__barCount:before{content:"5%"}.webpLoader__barProgress[data-percent="6"] .webpLoader__barCount:before{content:"6%"}.webpLoader__barProgress[data-percent="7"] .webpLoader__barCount:before{content:"7%"}.webpLoader__barProgress[data-percent="8"] .webpLoader__barCount:before{content:"8%"}.webpLoader__barProgress[data-percent="9"] .webpLoader__barCount:before{content:"9%"}.webpLoader__barProgress[data-percent="10"] .webpLoader__barCount:before{content:"10%"}.webpLoader__barProgress[data-percent="11"] .webpLoader__barCount:before{content:"11%"}.webpLoader__barProgress[data-percent="12"] .webpLoader__barCount:before{content:"12%"}.webpLoader__barProgress[data-percent="13"] .webpLoader__barCount:before{content:"13%"}.webpLoader__barProgress[data-percent="14"] .webpLoader__barCount:before{content:"14%"}.webpLoader__barProgress[data-percent="15"] .webpLoader__barCount:before{content:"15%"}.webpLoader__barProgress[data-percent="16"] .webpLoader__barCount:before{content:"16%"}.webpLoader__barProgress[data-percent="17"] .webpLoader__barCount:before{content:"17%"}.webpLoader__barProgress[data-percent="18"] .webpLoader__barCount:before{content:"18%"}.webpLoader__barProgress[data-percent="19"] .webpLoader__barCount:before{content:"19%"}.webpLoader__barProgress[data-percent="20"] .webpLoader__barCount:before{content:"20%"}.webpLoader__barProgress[data-percent="21"] .webpLoader__barCount:before{content:"21%"}.webpLoader__barProgress[data-percent="22"] .webpLoader__barCount:before{content:"22%"}.webpLoader__barProgress[data-percent="23"] .webpLoader__barCount:before{content:"23%"}.webpLoader__barProgress[data-percent="24"] .webpLoader__barCount:before{content:"24%"}.webpLoader__barProgress[data-percent="25"] .webpLoader__barCount:before{content:"25%"}.webpLoader__barProgress[data-percent="26"] .webpLoader__barCount:before{content:"26%"}.webpLoader__barProgress[data-percent="27"] .webpLoader__barCount:before{content:"27%"}.webpLoader__barProgress[data-percent="28"] .webpLoader__barCount:before{content:"28%"}.webpLoader__barProgress[data-percent="29"] .webpLoader__barCount:before{content:"29%"}.webpLoader__barProgress[data-percent="30"] .webpLoader__barCount:before{content:"30%"}.webpLoader__barProgress[data-percent="31"] .webpLoader__barCount:before{content:"31%"}.webpLoader__barProgress[data-percent="32"] .webpLoader__barCount:before{content:"32%"}.webpLoader__barProgress[data-percent="33"] .webpLoader__barCount:before{content:"33%"}.webpLoader__barProgress[data-percent="34"] .webpLoader__barCount:before{content:"34%"}.webpLoader__barProgress[data-percent="35"] .webpLoader__barCount:before{content:"35%"}.webpLoader__barProgress[data-percent="36"] .webpLoader__barCount:before{content:"36%"}.webpLoader__barProgress[data-percent="37"] .webpLoader__barCount:before{content:"37%"}.webpLoader__barProgress[data-percent="38"] .webpLoader__barCount:before{content:"38%"}.webpLoader__barProgress[data-percent="39"] .webpLoader__barCount:before{content:"39%"}.webpLoader__barProgress[data-percent="40"] .webpLoader__barCount:before{content:"40%"}.webpLoader__barProgress[data-percent="41"] .webpLoader__barCount:before{content:"41%"}.webpLoader__barProgress[data-percent="42"] .webpLoader__barCount:before{content:"42%"}.webpLoader__barProgress[data-percent="43"] .webpLoader__barCount:before{content:"43%"}.webpLoader__barProgress[data-percent="44"] .webpLoader__barCount:before{content:"44%"}.webpLoader__barProgress[data-percent="45"] .webpLoader__barCount:before{content:"45%"}.webpLoader__barProgress[data-percent="46"] .webpLoader__barCount:before{content:"46%"}.webpLoader__barProgress[data-percent="47"] .webpLoader__barCount:before{content:"47%"}.webpLoader__barProgress[data-percent="48"] .webpLoader__barCount:before{content:"48%"}.webpLoader__barProgress[data-percent="49"] .webpLoader__barCount:before{content:"49%"}.webpLoader__barProgress[data-percent="50"] .webpLoader__barCount:before{content:"50%"}.webpLoader__barProgress[data-percent="51"] .webpLoader__barCount:before{content:"51%"}.webpLoader__barProgress[data-percent="52"] .webpLoader__barCount:before{content:"52%"}.webpLoader__barProgress[data-percent="53"] .webpLoader__barCount:before{content:"53%"}.webpLoader__barProgress[data-percent="54"] .webpLoader__barCount:before{content:"54%"}.webpLoader__barProgress[data-percent="55"] .webpLoader__barCount:before{content:"55%"}.webpLoader__barProgress[data-percent="56"] .webpLoader__barCount:before{content:"56%"}.webpLoader__barProgress[data-percent="57"] .webpLoader__barCount:before{content:"57%"}.webpLoader__barProgress[data-percent="58"] .webpLoader__barCount:before{content:"58%"}.webpLoader__barProgress[data-percent="59"] .webpLoader__barCount:before{content:"59%"}.webpLoader__barProgress[data-percent="60"] .webpLoader__barCount:before{content:"60%"}.webpLoader__barProgress[data-percent="61"] .webpLoader__barCount:before{content:"61%"}.webpLoader__barProgress[data-percent="62"] .webpLoader__barCount:before{content:"62%"}.webpLoader__barProgress[data-percent="63"] .webpLoader__barCount:before{content:"63%"}.webpLoader__barProgress[data-percent="64"] .webpLoader__barCount:before{content:"64%"}.webpLoader__barProgress[data-percent="65"] .webpLoader__barCount:before{content:"65%"}.webpLoader__barProgress[data-percent="66"] .webpLoader__barCount:before{content:"66%"}.webpLoader__barProgress[data-percent="67"] .webpLoader__barCount:before{content:"67%"}.webpLoader__barProgress[data-percent="68"] .webpLoader__barCount:before{content:"68%"}.webpLoader__barProgress[data-percent="69"] .webpLoader__barCount:before{content:"69%"}.webpLoader__barProgress[data-percent="70"] .webpLoader__barCount:before{content:"70%"}.webpLoader__barProgress[data-percent="71"] .webpLoader__barCount:before{content:"71%"}.webpLoader__barProgress[data-percent="72"] .webpLoader__barCount:before{content:"72%"}.webpLoader__barProgress[data-percent="73"] .webpLoader__barCount:before{content:"73%"}.webpLoader__barProgress[data-percent="74"] .webpLoader__barCount:before{content:"74%"}.webpLoader__barProgress[data-percent="75"] .webpLoader__barCount:before{content:"75%"}.webpLoader__barProgress[data-percent="76"] .webpLoader__barCount:before{content:"76%"}.webpLoader__barProgress[data-percent="77"] .webpLoader__barCount:before{content:"77%"}.webpLoader__barProgress[data-percent="78"] .webpLoader__barCount:before{content:"78%"}.webpLoader__barProgress[data-percent="79"] .webpLoader__barCount:before{content:"79%"}.webpLoader__barProgress[data-percent="80"] .webpLoader__barCount:before{content:"80%"}.webpLoader__barProgress[data-percent="81"] .webpLoader__barCount:before{content:"81%"}.webpLoader__barProgress[data-percent="82"] .webpLoader__barCount:before{content:"82%"}.webpLoader__barProgress[data-percent="83"] .webpLoader__barCount:before{content:"83%"}.webpLoader__barProgress[data-percent="84"] .webpLoader__barCount:before{content:"84%"}.webpLoader__barProgress[data-percent="85"] .webpLoader__barCount:before{content:"85%"}.webpLoader__barProgress[data-percent="86"] .webpLoader__barCount:before{content:"86%"}.webpLoader__barProgress[data-percent="87"] .webpLoader__barCount:before{content:"87%"}.webpLoader__barProgress[data-percent="88"] .webpLoader__barCount:before{content:"88%"}.webpLoader__barProgress[data-percent="89"] .webpLoader__barCount:before{content:"89%"}.webpLoader__barProgress[data-percent="90"] .webpLoader__barCount:before{content:"90%"}.webpLoader__barProgress[data-percent="91"] .webpLoader__barCount:before{content:"91%"}.webpLoader__barProgress[data-percent="92"] .webpLoader__barCount:before{content:"92%"}.webpLoader__barProgress[data-percent="93"] .webpLoader__barCount:before{content:"93%"}.webpLoader__barProgress[data-percent="94"] .webpLoader__barCount:before{content:"94%"}.webpLoader__barProgress[data-percent="95"] .webpLoader__barCount:before{content:"95%"}.webpLoader__barProgress[data-percent="96"] .webpLoader__barCount:before{content:"96%"}.webpLoader__barProgress[data-percent="97"] .webpLoader__barCount:before{content:"97%"}.webpLoader__barProgress[data-percent="98"] .webpLoader__barCount:before{content:"98%"}.webpLoader__barProgress[data-percent="99"] .webpLoader__barCount:before{content:"99%"}.webpLoader__barProgress[data-percent="100"] .webpLoader__barCount:before{content:"100%"}.webpLoader__size{font-size:14px;line-height:1.5714285714;margin-bottom:-10px;padding:4px 0}.webpLoader__sizeProgress{font-weight:500}.webpLoader__success{margin-top:20px;padding:4px 0 4px 20px;position:relative}.webpLoader__success:before{background-color:#00a32a;content:"";height:100%;left:0;position:absolute;top:0;width:2px}.webpLoader__successContent{color:#00a32a;font-size:14px;font-weight:500;line-height:1.5714285714}.webpLoader__successContent a{color:inherit}.webpLoader__errors{border-left:2px solid #c3c4c7;margin-top:20px}.webpLoader__errorsTitle{background-color:#c3c4c7;color:#fff;display:inline-block;font-size:14px;line-height:1.5714285714;padding:4px 22px}.webpLoader__errorsContent{padding:10px 0 10px 20px}.webpLoader__errorsContent>p{font-size:12px;line-height:1.75;margin:0;max-width:100%}.webpLoader__errorsContent>p.webpLoader__errorsContentError{color:#d63638;font-size:14px;font-weight:500;line-height:1.5714285714}.webpLoader__errorsContent pre{font-size:12px;line-height:1.75;white-space:normal}.webpLoader__button--disabled{opacity:.25!important;pointer-events:none}.webpPopup{margin-top:20px}.webpPopup__inner{background-color:#fff;border:1px solid #c3c4c7;display:flex;flex-wrap:wrap}.webpPopup__image{background-image:url(../../img/author.png);background-position:50%;background-repeat:no-repeat;background-size:cover;width:152px}.webpPopup__content{border-left:1px solid #c3c4c7;flex:1;padding:10px 20px}.webpServerInfo{color:#222;text-align:center}.webpServerInfo pre{font-family:monospace;margin:0}.webpServerInfo h1,.webpServerInfo h2{display:none}.webpServerInfo p{max-width:100%}.webpServerInfo table{border:0;border-collapse:collapse;margin:10px auto;width:100%}.webpServerInfo td,.webpServerInfo th{border:1px solid #666;font-family:monospace;font-size:12px;line-height:1.75;padding:4px 5px;text-align:center;vertical-align:baseline}.webpServerInfo .p{text-align:left}.webpServerInfo .e{background-color:#ccf;font-weight:700;width:300px}.webpServerInfo .h{background-color:#99c;font-weight:700}.webpServerInfo .v{word-wrap:break-word;background-color:#ddd;max-width:300px;overflow-x:auto}.webpServerInfo .v i{color:#999}.webpServerInfo img{border:0;float:right}@media screen and (max-width:1024px){.webpPage__column--large{width:100%}.webpPage__column--small{margin-top:40px;width:100%}.webpPage__widget+.webpPage__widget{margin-top:40px}.webpPage__widgetColumns{display:block}.webpPage__widgetColumn{width:100%}}@media screen and (max-width:782px){.webpPage{padding-right:0}.webpPage__quality{display:block}.webpPage__qualityItem{border-left:0}.webpPage__qualityItem+.webpPage__qualityItem{border-top:1px solid #c3c4c7}.webpInput{display:block}.webpInput__field{width:100%}.webpInput__button{margin:10px 0 0!important}.webpPopup__inner{border:1px solid #c3c4c7;display:block}.webpPopup__image{height:152px;margin:20px auto 0}.webpPopup__content{border-left:0}}
|
assets/fonts/icons/icomoon.eot
ADDED
Binary file
|
assets/fonts/icons/icomoon.svg
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" standalone="no"?>
|
2 |
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
3 |
+
<svg xmlns="http://www.w3.org/2000/svg">
|
4 |
+
<metadata>Generated by IcoMoon</metadata>
|
5 |
+
<defs>
|
6 |
+
<font id="icomoon" horiz-adv-x="1024">
|
7 |
+
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
8 |
+
<missing-glyph horiz-adv-x="1024" />
|
9 |
+
<glyph unicode=" " horiz-adv-x="512" d="" />
|
10 |
+
<glyph unicode="" glyph-name="logo" d="M1016.041 915.411v0c-7.975 9.114-19.594 12.531-25.974 13.67-1.367 0.228-2.506 0.455-3.874 0.455h-0.684c-59.238 4.101-267.938 6.836-460.69-128.045-34.86-24.378-73.136-53.314-114.375-86.351-0.911 0.228-1.823 0.684-2.734 0.684l-186.828 28.479c-5.468 0.911-10.937-0.684-15.037-4.329l-198.903-171.79c-7.975-6.607-9.341-18.455-2.734-26.429s18.455-9.341 26.429-2.734c0.228 0.228 0.684 0.455 0.911 0.911l192.296 166.094 147.639-22.556c-115.059-95.237-219.637-194.346-260.875-233.762-7.063-6.836-7.746-18.228-1.139-25.746l40.1-46.935 0.455-0.455 23.923-27.797-78.605-67.895c-7.746-6.836-8.658-18.683-1.823-26.429 3.646-4.101 8.658-6.607 14.126-6.607 4.556 0 8.886 1.595 12.303 4.556l142.171 122.805c7.975 6.607 9.341 18.455 2.734 26.429s-18.455 9.341-26.429 2.734c-0.228-0.228-0.684-0.455-0.911-0.911l-35.543-30.302-23.468 27.34-0.455 0.455-28.936 33.72c49.897 47.391 153.336 144.222 263.609 234.218 48.53 39.644 93.186 73.82 133.058 101.616 182.727 127.817 380.49 125.083 436.767 121.21h1.367c0.911-0.228 1.595-0.455 2.506-0.911 0.228-1.367 0.228-2.962 0-4.329-4.329-56.96-30.075-254.952-184.322-415.806-127.817-133.514-318.974-282.976-393.477-339.707l-61.516 71.997 33.948 29.391c8.202 6.152 10.025 17.999 3.646 26.429-6.152 8.202-17.999 10.025-26.429 3.646-0.684-0.455-1.367-1.139-1.823-1.595l-142.171-122.805c-7.518-7.063-8.202-18.91-1.139-26.657 6.607-7.291 17.999-8.202 25.518-1.823l79.744 68.807 72.908-85.212c6.379-7.518 17.771-8.658 25.518-2.734 43.061 32.581 159.487 121.893 273.178 222.37l0.911-148.778-192.296-166.094c-7.518-7.063-8.202-18.91-1.139-26.657 6.607-7.291 17.999-8.202 25.518-1.823l198.903 171.79c4.101 3.646 6.607 8.886 6.607 14.354l-1.139 188.878c0 0.455-0.228 1.139-0.228 1.595 35.999 32.809 70.63 66.074 101.844 98.654 162.905 169.74 190.017 378.896 194.574 438.817 1.595 13.67-1.139 24.378-7.518 31.898v0zM250.731 269.261c-6.836 7.746-18.683 8.658-26.429 2.051v0l-142.171-122.805c-7.746-6.836-8.43-18.683-1.595-26.429s18.455-8.43 26.201-1.823l142.171 122.805c7.746 6.379 8.658 18.228 1.823 26.201v0zM809.162 580.944l-150.146 177.942c-5.696 6.607-15.493 7.518-22.1 1.823l-235.585-198.903c-6.607-5.696-7.518-15.493-1.823-22.1l150.146-177.942c5.696-6.607 15.493-7.518 22.1-1.823l235.585 198.903c6.607 5.696 7.518 15.493 1.823 22.1v0zM774.987 572.742l-211.435-178.625-129.868 153.791 211.435 178.625 129.868-153.791zM488.594 570.008c-14.126-12.076-15.948-33.264-4.101-47.391 5.696-6.836 13.898-11.164 22.784-11.847 0.911 0 2.051-0.228 2.962-0.228 18.683 0 33.72 15.037 33.72 33.72s-15.037 33.72-33.72 33.72c-7.975 0-15.721-2.734-21.645-7.975v0zM499.758 545.174c0.455 5.696 5.696 10.025 11.392 9.569s10.025-5.696 9.569-11.392-5.696-10.025-11.392-9.569c-2.734 0.228-5.468 1.595-7.063 3.646-1.823 2.278-2.734 5.013-2.506 7.746v0zM611.171 663.65c-3.19-2.734-5.24-6.607-5.696-10.937-2.734-33.037-4.329-53.998-5.24-67.668l-17.544 4.329c-4.556 1.139-9.341 0.228-12.987-2.506-4.101-2.962-6.379-7.518-6.379-12.531l-0.684-137.386c0-8.658 6.836-15.721 15.721-15.721v0 0c3.646 0 7.291 1.367 10.253 3.646v0c3.417 2.962 5.468 7.291 5.696 11.847l0.684 117.337 52.402-12.759c8.43-2.051 16.86 3.19 18.91 11.392v0c2.051 8.43-2.962 16.86-11.392 18.91v0l-23.012 5.696c0.684 11.847 2.278 32.353 4.101 56.048l47.391-6.836c8.658-1.139 16.632 4.785 17.771 13.443s-4.785 16.632-13.443 17.771l-63.794 9.114c-4.785 0.911-9.341-0.228-12.759-3.19v0z" />
|
11 |
+
</font></defs></svg>
|
assets/fonts/icons/icomoon.ttf
ADDED
Binary file
|
assets/fonts/icons/icomoon.woff
ADDED
Binary file
|
assets/img/author.jpg
DELETED
Binary file
|
assets/img/author.png
ADDED
Binary file
|
changelog.txt
CHANGED
@@ -1,5 +1,17 @@
|
|
1 |
== Changelog ==
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 4.1.2 (2022-01-29) =
|
4 |
* `[Fixed]` Validation of authorization token when images regeneration
|
5 |
* `[Fixed]` Validation of loaded images using Pass Thru method
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 4.2.0 (2022-02-13) =
|
4 |
+
* `[Removed]` Action `webpc_regenerate_all`
|
5 |
+
* `[Fixed]` Issue with plugin settings after changing Gd or Imagick library configuration
|
6 |
+
* `[Fixed]` Server configuration error detection when cURL is disabled
|
7 |
+
* `[Fixed]` URL for the server configuration tab
|
8 |
+
* `[Changed]` Automatically conversion of images after upload
|
9 |
+
* `[Changed]` Automatically conversion of images from outside the Media Library
|
10 |
+
* `[Changed]` Message for conversion error when converted file is larger than original
|
11 |
+
* `[Added]` List of allowed file extensions for cache rules in .htaccess file
|
12 |
+
* `[Added]` Status of automatic image conversion on the top bar in the WordPress Dashboard
|
13 |
+
* `[Added]` Debug information about plugin settings
|
14 |
+
|
15 |
= 4.1.2 (2022-01-29) =
|
16 |
* `[Fixed]` Validation of authorization token when images regeneration
|
17 |
* `[Fixed]` Validation of loaded images using Pass Thru method
|
readme.txt
CHANGED
@@ -23,7 +23,7 @@ This will be a profit both for your users who will not have to download so much
|
|
23 |
|
24 |
#### AVIF support
|
25 |
|
26 |
-
Now you can use AVIF as the output format for your images. The AVIF format is a new extension - is the successor to WebP. It allows you to achieve even higher levels of image compression, and the quality of the converted images is better than in WebP.
|
27 |
|
28 |
#### How does this work?
|
29 |
|
@@ -108,7 +108,7 @@ If you get an error: `File "%s" is unreadable. Please check file permissions.` m
|
|
108 |
|
109 |
If you get an error: `"%s" is not a valid image file.` means that the file is damaged in some way. Download the file to disk, save it again using any graphics program and add again to the page. If the error applies to individual images then you can ignore it - just the original images will load, not WebP.
|
110 |
|
111 |
-
If you get an error: `"%s" converted to .webp is larger than original and has been deleted.` means the original image weighed less than WebP. This happens when images have been compressed before. Disable the *"Automatic removal of files in output formats larger than original"* option in plugin settings to force always using WebP.
|
112 |
|
113 |
In the case of the above problems, **contacting the support forum will be useless**. Unfortunately, we are unable to help you if your files are damaged. You have to fix it yourself. If you have previously used other tools that changed the original files and damaged them, you will do nothing more.
|
114 |
|
@@ -242,17 +242,7 @@ If you would like to integrate with your plugin, which generates images by yours
|
|
242 |
|
243 |
It is a solution for advanced users. If you would like to integrate with another plugin, it's best to contact the author of that plugin and give him information about the actions available in our plugin. This will help you find a solution faster.
|
244 |
|
245 |
-
You can
|
246 |
-
|
247 |
-
`do_action( 'webpc_regenerate_all', $paths );`
|
248 |
-
|
249 |
-
Below is an example of how to use this action to automatically regenerate images after changing the theme:
|
250 |
-
|
251 |
-
`add_action('init', function() {
|
252 |
-
do_action( 'webpc_regenerate_all' );
|
253 |
-
});`
|
254 |
-
|
255 |
-
To manually start converting selected files, you can use the action to which you will pass an array with a list of paths *(they must be absolute server paths)*:
|
256 |
|
257 |
`do_action( 'webpc_convert_paths', $paths );`
|
258 |
|
@@ -392,23 +382,17 @@ This is all very important to us and allows us to do even better things for you!
|
|
392 |
|
393 |
== Changelog ==
|
394 |
|
395 |
-
= 4.
|
396 |
-
* `[
|
397 |
-
* `[Fixed]`
|
398 |
-
|
399 |
-
|
400 |
-
* `[
|
401 |
-
* `[Changed]`
|
402 |
-
* `[
|
403 |
-
|
404 |
-
|
405 |
-
* `[
|
406 |
-
* `[Fixed]` Detection of server configuration error related to non-working rewrites
|
407 |
-
* `[Fixed]` URL validation for Pass Thru loading mode
|
408 |
-
* `[Fixed]` Verification of supported formats by Imagick
|
409 |
-
* `[Changed]` Error messages on plugin settings page
|
410 |
-
* `[Changed]` Styles for plugin settings page
|
411 |
-
* `[Added]` Debug information about PHP configuration
|
412 |
|
413 |
See [changelog.txt](https://plugins.svn.wordpress.org/webp-converter-for-media/trunk/changelog.txt) for previous versions.
|
414 |
|
23 |
|
24 |
#### AVIF support
|
25 |
|
26 |
+
Now in the PRO version you can use AVIF as the output format for your images. The AVIF format is a new extension - is the successor to WebP. It allows you to achieve even higher levels of image compression, and the quality of the converted images is better than in WebP.
|
27 |
|
28 |
#### How does this work?
|
29 |
|
108 |
|
109 |
If you get an error: `"%s" is not a valid image file.` means that the file is damaged in some way. Download the file to disk, save it again using any graphics program and add again to the page. If the error applies to individual images then you can ignore it - just the original images will load, not WebP.
|
110 |
|
111 |
+
If you get an error: `Image "%s" converted to .webp is larger than original and converted .webp file has been deleted.` means the original image weighed less than WebP. This happens when images have been compressed before. Disable the *"Automatic removal of files in output formats larger than original"* option in plugin settings to force always using WebP.
|
112 |
|
113 |
In the case of the above problems, **contacting the support forum will be useless**. Unfortunately, we are unable to help you if your files are damaged. You have to fix it yourself. If you have previously used other tools that changed the original files and damaged them, you will do nothing more.
|
114 |
|
242 |
|
243 |
It is a solution for advanced users. If you would like to integrate with another plugin, it's best to contact the author of that plugin and give him information about the actions available in our plugin. This will help you find a solution faster.
|
244 |
|
245 |
+
You can manually run converting selected files, you can use the action to which you will pass an array with a list of paths *(they must be absolute server paths)*:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
246 |
|
247 |
`do_action( 'webpc_convert_paths', $paths );`
|
248 |
|
382 |
|
383 |
== Changelog ==
|
384 |
|
385 |
+
= 4.2.0 (2022-02-13) =
|
386 |
+
* `[Removed]` Action `webpc_regenerate_all`
|
387 |
+
* `[Fixed]` Issue with plugin settings after changing Gd or Imagick library configuration
|
388 |
+
* `[Fixed]` Server configuration error detection when cURL is disabled
|
389 |
+
* `[Fixed]` URL for the server configuration tab
|
390 |
+
* `[Changed]` Automatically conversion of images after upload
|
391 |
+
* `[Changed]` Automatically conversion of images from outside the Media Library
|
392 |
+
* `[Changed]` Message for conversion error when converted file is larger than original
|
393 |
+
* `[Added]` List of allowed file extensions for cache rules in .htaccess file
|
394 |
+
* `[Added]` Status of automatic image conversion on the top bar in the WordPress Dashboard
|
395 |
+
* `[Added]` Debug information about plugin settings
|
|
|
|
|
|
|
|
|
|
|
|
|
396 |
|
397 |
See [changelog.txt](https://plugins.svn.wordpress.org/webp-converter-for-media/trunk/changelog.txt) for previous versions.
|
398 |
|
src/Action/RegenerateAll.php
DELETED
@@ -1,49 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace WebpConverter\Action;
|
4 |
-
|
5 |
-
use WebpConverter\Conversion\Endpoint\PathsEndpoint;
|
6 |
-
use WebpConverter\HookableInterface;
|
7 |
-
use WebpConverter\PluginData;
|
8 |
-
use WebpConverter\Repository\TokenRepository;
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Initializes conversion of all image sizes in all directories.
|
12 |
-
*/
|
13 |
-
class RegenerateAll implements HookableInterface {
|
14 |
-
|
15 |
-
/**
|
16 |
-
* @var PluginData
|
17 |
-
*/
|
18 |
-
private $plugin_data;
|
19 |
-
|
20 |
-
/**
|
21 |
-
* @var TokenRepository
|
22 |
-
*/
|
23 |
-
private $token_repository;
|
24 |
-
|
25 |
-
public function __construct( PluginData $plugin_data, TokenRepository $token_repository ) {
|
26 |
-
$this->plugin_data = $plugin_data;
|
27 |
-
$this->token_repository = $token_repository;
|
28 |
-
}
|
29 |
-
|
30 |
-
/**
|
31 |
-
* {@inheritdoc}
|
32 |
-
*/
|
33 |
-
public function init_hooks() {
|
34 |
-
add_action( 'webpc_regenerate_all', [ $this, 'regenerate_all_images' ] );
|
35 |
-
}
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Converts all images in directories set in options to output formats.
|
39 |
-
*
|
40 |
-
* @return void
|
41 |
-
* @internal
|
42 |
-
*/
|
43 |
-
public function regenerate_all_images() {
|
44 |
-
do_action(
|
45 |
-
'webpc_convert_paths',
|
46 |
-
( new PathsEndpoint( $this->plugin_data, $this->token_repository ) )->get_paths( true )
|
47 |
-
);
|
48 |
-
}
|
49 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/Conversion/Cron/CronEventGenerator.php
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WebpConverter\Conversion\Cron;
|
4 |
+
|
5 |
+
use WebpConverter\HookableInterface;
|
6 |
+
use WebpConverter\PluginData;
|
7 |
+
use WebpConverter\Repository\TokenRepository;
|
8 |
+
use WebpConverter\Settings\Option\ExtraFeaturesOption;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Adds cron event that converts images.
|
12 |
+
*/
|
13 |
+
class CronEventGenerator implements HookableInterface {
|
14 |
+
|
15 |
+
const CRON_PATHS_ACTION = 'webpc_cron_paths';
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @var PluginData
|
19 |
+
*/
|
20 |
+
private $plugin_data;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* @var CronInitiator
|
24 |
+
*/
|
25 |
+
private $cron_initiator;
|
26 |
+
|
27 |
+
public function __construct(
|
28 |
+
PluginData $plugin_data,
|
29 |
+
TokenRepository $token_repository,
|
30 |
+
CronInitiator $cron_initiator = null
|
31 |
+
) {
|
32 |
+
$this->plugin_data = $plugin_data;
|
33 |
+
$this->cron_initiator = $cron_initiator ?: new CronInitiator( $plugin_data, $token_repository );
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* {@inheritdoc}
|
38 |
+
*/
|
39 |
+
public function init_hooks() {
|
40 |
+
add_action( 'init', [ $this, 'add_cron_event' ] );
|
41 |
+
add_action( self::CRON_PATHS_ACTION, [ $this, 'get_paths_to_conversion' ] );
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Initializes cron event to convert all images.
|
46 |
+
*
|
47 |
+
* @return void
|
48 |
+
* @internal
|
49 |
+
*/
|
50 |
+
public function add_cron_event() {
|
51 |
+
if ( wp_next_scheduled( self::CRON_PATHS_ACTION )
|
52 |
+
|| ! ( $settings = $this->plugin_data->get_plugin_settings() )
|
53 |
+
|| ! in_array( ExtraFeaturesOption::OPTION_VALUE_CRON_ENABLED, $settings[ ExtraFeaturesOption::OPTION_NAME ] ) ) {
|
54 |
+
return;
|
55 |
+
}
|
56 |
+
|
57 |
+
wp_schedule_event( time(), CronSchedulesGenerator::CRON_PATHS_SCHEDULE, self::CRON_PATHS_ACTION );
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* @return void
|
62 |
+
* @internal
|
63 |
+
*/
|
64 |
+
public function get_paths_to_conversion() {
|
65 |
+
$this->cron_initiator->refresh_paths_to_conversion();
|
66 |
+
$this->cron_initiator->init_conversion();
|
67 |
+
}
|
68 |
+
}
|
src/Conversion/Cron/CronInitiator.php
ADDED
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WebpConverter\Conversion\Cron;
|
4 |
+
|
5 |
+
use WebpConverter\Conversion\Endpoint\CronConversionEndpoint;
|
6 |
+
use WebpConverter\Conversion\Endpoint\PathsEndpoint;
|
7 |
+
use WebpConverter\PluginData;
|
8 |
+
use WebpConverter\Repository\TokenRepository;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Manages automatic conversion of images.
|
12 |
+
*/
|
13 |
+
class CronInitiator {
|
14 |
+
|
15 |
+
/**
|
16 |
+
* @var PluginData
|
17 |
+
*/
|
18 |
+
private $plugin_data;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* @var TokenRepository
|
22 |
+
*/
|
23 |
+
private $token_repository;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @var CronStatusManager
|
27 |
+
*/
|
28 |
+
private $cron_status_manager;
|
29 |
+
|
30 |
+
public function __construct(
|
31 |
+
PluginData $plugin_data,
|
32 |
+
TokenRepository $token_repository,
|
33 |
+
CronStatusManager $cron_status_manager = null
|
34 |
+
) {
|
35 |
+
$this->plugin_data = $plugin_data;
|
36 |
+
$this->token_repository = $token_repository;
|
37 |
+
$this->cron_status_manager = $cron_status_manager ?: new CronStatusManager();
|
38 |
+
}
|
39 |
+
|
40 |
+
public function refresh_paths_to_conversion( bool $force_init = false ): bool {
|
41 |
+
$saved_request_id = $this->cron_status_manager->get_conversion_request_id();
|
42 |
+
if ( $this->cron_status_manager->is_conversion_locked()
|
43 |
+
|| ( ! $force_init && ( $saved_request_id !== null ) ) ) {
|
44 |
+
return false;
|
45 |
+
}
|
46 |
+
|
47 |
+
$this->cron_status_manager->set_conversion_status_locked( true, true );
|
48 |
+
|
49 |
+
$paths = ( new PathsEndpoint( $this->plugin_data, $this->token_repository ) )->get_paths( true );
|
50 |
+
$this->cron_status_manager->set_paths_to_conversion( $paths );
|
51 |
+
$this->cron_status_manager->set_paths_skipped( $paths );
|
52 |
+
|
53 |
+
$this->cron_status_manager->set_conversion_status_locked( false );
|
54 |
+
|
55 |
+
return (bool) $paths;
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* @param string[] $new_paths .
|
60 |
+
*
|
61 |
+
* @return void
|
62 |
+
*/
|
63 |
+
public function add_paths_to_conversion( array $new_paths ) {
|
64 |
+
$paths = $this->cron_status_manager->get_paths_to_conversion();
|
65 |
+
$this->cron_status_manager->set_paths_to_conversion( array_merge( $new_paths, $paths ) );
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* @param string|null $request_id .
|
70 |
+
*
|
71 |
+
* @return void
|
72 |
+
*/
|
73 |
+
public function init_conversion( string $request_id = null ) {
|
74 |
+
$saved_request_id = $this->cron_status_manager->get_conversion_request_id();
|
75 |
+
if ( $this->cron_status_manager->is_conversion_locked()
|
76 |
+
|| ( ( $saved_request_id !== null ) && ( $request_id !== $saved_request_id ) ) ) {
|
77 |
+
return;
|
78 |
+
}
|
79 |
+
|
80 |
+
$paths = $this->cron_status_manager->get_paths_to_conversion();
|
81 |
+
if ( ! $paths ) {
|
82 |
+
$this->try_restart_conversion();
|
83 |
+
return;
|
84 |
+
}
|
85 |
+
|
86 |
+
$this->cron_status_manager->set_paths_to_conversion( array_slice( $paths, 1 ) );
|
87 |
+
do_action( 'webpc_convert_paths', array_slice( $paths, 0, 1 ) );
|
88 |
+
|
89 |
+
$this->init_async_conversion();
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* @return void
|
94 |
+
*/
|
95 |
+
public function init_async_conversion() {
|
96 |
+
wp_remote_post(
|
97 |
+
( new CronConversionEndpoint( $this->plugin_data, $this->token_repository ) )->get_route_url(),
|
98 |
+
[
|
99 |
+
'timeout' => 0.01,
|
100 |
+
'blocking' => false,
|
101 |
+
'sslverify' => apply_filters( 'https_local_ssl_verify', false ),
|
102 |
+
]
|
103 |
+
);
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* @return void
|
108 |
+
*/
|
109 |
+
private function try_restart_conversion() {
|
110 |
+
$this->cron_status_manager->reset_conversion_request_id();
|
111 |
+
if ( ! $this->cron_status_manager->get_paths_counter() ) {
|
112 |
+
return;
|
113 |
+
}
|
114 |
+
|
115 |
+
$this->refresh_paths_to_conversion( true );
|
116 |
+
$this->init_async_conversion();
|
117 |
+
}
|
118 |
+
}
|
src/Conversion/Cron/{Schedules.php → CronSchedulesGenerator.php}
RENAMED
@@ -5,11 +5,11 @@ namespace WebpConverter\Conversion\Cron;
|
|
5 |
use WebpConverter\HookableInterface;
|
6 |
|
7 |
/**
|
8 |
-
* Adds time
|
9 |
*/
|
10 |
-
class
|
11 |
|
12 |
-
const
|
13 |
|
14 |
/**
|
15 |
* {@inheritdoc}
|
@@ -19,7 +19,7 @@ class Schedules implements HookableInterface {
|
|
19 |
}
|
20 |
|
21 |
/**
|
22 |
-
* Adds new cron
|
23 |
*
|
24 |
* @param mixed[] $schedules Cron schedules.
|
25 |
*
|
@@ -27,8 +27,8 @@ class Schedules implements HookableInterface {
|
|
27 |
* @internal
|
28 |
*/
|
29 |
public function add_cron_interval( array $schedules ): array {
|
30 |
-
$schedules[ self::
|
31 |
-
'interval' => apply_filters( '
|
32 |
'display' => 'WebP Converter for Media',
|
33 |
];
|
34 |
return $schedules;
|
5 |
use WebpConverter\HookableInterface;
|
6 |
|
7 |
/**
|
8 |
+
* Adds time intervals to cron event.
|
9 |
*/
|
10 |
+
class CronSchedulesGenerator implements HookableInterface {
|
11 |
|
12 |
+
const CRON_PATHS_SCHEDULE = 'webpc_cron_paths';
|
13 |
|
14 |
/**
|
15 |
* {@inheritdoc}
|
19 |
}
|
20 |
|
21 |
/**
|
22 |
+
* Adds new cron schedules.
|
23 |
*
|
24 |
* @param mixed[] $schedules Cron schedules.
|
25 |
*
|
27 |
* @internal
|
28 |
*/
|
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' => 'WebP Converter for Media',
|
33 |
];
|
34 |
return $schedules;
|
src/Conversion/Cron/CronStatusManager.php
ADDED
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WebpConverter\Conversion\Cron;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Stores data related to automatic image conversion.
|
7 |
+
*/
|
8 |
+
class CronStatusManager {
|
9 |
+
|
10 |
+
const CRON_PATHS_TRANSIENT = 'webpc_cron_paths';
|
11 |
+
const CRON_PATHS_SKIPPED_TRANSIENT = 'webpc_cron_paths_skipped';
|
12 |
+
const CRON_STATUS_LOCKED_TRANSIENT = 'webpc_cron_locked';
|
13 |
+
const CRON_REQUEST_ID_TRANSIENT = 'webpc_cron_request_id';
|
14 |
+
const CRON_PATHS_LIMIT = 1000;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* @param string[] $paths .
|
18 |
+
*
|
19 |
+
* @return void
|
20 |
+
*/
|
21 |
+
public function set_paths_to_conversion( array $paths ) {
|
22 |
+
set_site_transient(
|
23 |
+
self::CRON_PATHS_TRANSIENT,
|
24 |
+
array_slice( $paths, 0, self::CRON_PATHS_LIMIT ),
|
25 |
+
3600
|
26 |
+
);
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* @param string[] $paths .
|
31 |
+
*
|
32 |
+
* @return void
|
33 |
+
*/
|
34 |
+
public function set_paths_skipped( array $paths ) {
|
35 |
+
$counter = max( ( count( $paths ) - self::CRON_PATHS_LIMIT ), 0 );
|
36 |
+
set_site_transient( self::CRON_PATHS_SKIPPED_TRANSIENT, $counter, 3600 );
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* @return string[]
|
41 |
+
*/
|
42 |
+
public function get_paths_to_conversion(): array {
|
43 |
+
$paths = get_site_transient( self::CRON_PATHS_TRANSIENT );
|
44 |
+
return $paths ?: [];
|
45 |
+
}
|
46 |
+
|
47 |
+
public function get_paths_counter(): int {
|
48 |
+
$paths_count = count( $this->get_paths_to_conversion() );
|
49 |
+
$paths_skipped = get_site_transient( self::CRON_PATHS_SKIPPED_TRANSIENT ) ?: 0;
|
50 |
+
return ( $paths_count + $paths_skipped );
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* @param bool $new_status .
|
55 |
+
* @param bool $is_long_expiration .
|
56 |
+
*
|
57 |
+
* @return void
|
58 |
+
*/
|
59 |
+
public function set_conversion_status_locked( bool $new_status = true, bool $is_long_expiration = false ) {
|
60 |
+
set_site_transient(
|
61 |
+
self::CRON_STATUS_LOCKED_TRANSIENT,
|
62 |
+
( $new_status ) ? 'yes' : null,
|
63 |
+
( $is_long_expiration ) ? 900 : 60
|
64 |
+
);
|
65 |
+
if ( $new_status === true ) {
|
66 |
+
$this->reset_conversion_request_id();
|
67 |
+
}
|
68 |
+
}
|
69 |
+
|
70 |
+
public function is_conversion_locked(): bool {
|
71 |
+
return ( get_site_transient( self::CRON_STATUS_LOCKED_TRANSIENT ) === 'yes' );
|
72 |
+
}
|
73 |
+
|
74 |
+
public function refresh_conversion_request_id(): string {
|
75 |
+
$request_id = uniqid( '', true );
|
76 |
+
set_site_transient( self::CRON_REQUEST_ID_TRANSIENT, $request_id, 60 );
|
77 |
+
return $request_id;
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* @return void
|
82 |
+
*/
|
83 |
+
public function reset_conversion_request_id() {
|
84 |
+
set_site_transient( self::CRON_REQUEST_ID_TRANSIENT, null );
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* @return string|null
|
89 |
+
*/
|
90 |
+
public function get_conversion_request_id() {
|
91 |
+
$request_id = get_site_transient( self::CRON_REQUEST_ID_TRANSIENT );
|
92 |
+
return $request_id ?: null;
|
93 |
+
}
|
94 |
+
}
|
src/Conversion/Cron/CronStatusViewer.php
ADDED
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WebpConverter\Conversion\Cron;
|
4 |
+
|
5 |
+
use WebpConverter\HookableInterface;
|
6 |
+
use WebpConverter\PluginInfo;
|
7 |
+
use WebpConverter\Settings\AdminAssets;
|
8 |
+
use WebpConverter\Settings\Page\PageIntegration;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Displays converting status on top menu bar in the WordPress Dashboard.
|
12 |
+
*/
|
13 |
+
class CronStatusViewer implements HookableInterface {
|
14 |
+
|
15 |
+
/**
|
16 |
+
* @var PluginInfo
|
17 |
+
*/
|
18 |
+
private $plugin_info;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* @var CronStatusManager
|
22 |
+
*/
|
23 |
+
private $cron_status_manager;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @var int
|
27 |
+
*/
|
28 |
+
private $paths_preview_count = 0;
|
29 |
+
|
30 |
+
public function __construct( PluginInfo $plugin_info, CronStatusManager $cron_status_manager = null ) {
|
31 |
+
$this->plugin_info = $plugin_info;
|
32 |
+
$this->cron_status_manager = $cron_status_manager ?: new CronStatusManager();
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* {@inheritdoc}
|
37 |
+
*/
|
38 |
+
public function init_hooks() {
|
39 |
+
add_action( 'admin_init', [ $this, 'init_status_preview' ] );
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* @return void
|
44 |
+
* @internal
|
45 |
+
*/
|
46 |
+
public function init_status_preview() {
|
47 |
+
if ( $this->cron_status_manager->get_conversion_request_id() === null ) {
|
48 |
+
return;
|
49 |
+
}
|
50 |
+
|
51 |
+
$this->paths_preview_count = $this->cron_status_manager->get_paths_counter();
|
52 |
+
if ( ! $this->paths_preview_count ) {
|
53 |
+
return;
|
54 |
+
}
|
55 |
+
|
56 |
+
add_action( 'admin_bar_menu', [ $this, 'add_menu_to_top_bar' ], 1000 );
|
57 |
+
( new AdminAssets( $this->plugin_info ) )->init_hooks();
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* @param \WP_Admin_Bar $wp_admin_bar .
|
62 |
+
*
|
63 |
+
* @return void
|
64 |
+
* @internal
|
65 |
+
*/
|
66 |
+
public function add_menu_to_top_bar( \WP_Admin_Bar $wp_admin_bar ) {
|
67 |
+
$count = number_format( $this->paths_preview_count, 0, '', ' ' );
|
68 |
+
$menu_parent = [
|
69 |
+
'id' => 'webpc-menu',
|
70 |
+
'href' => PageIntegration::get_settings_page_url(),
|
71 |
+
'title' => sprintf(
|
72 |
+
'<span class="ab-icon"></span><span class="ab-label">%1$s</span>',
|
73 |
+
$count
|
74 |
+
),
|
75 |
+
];
|
76 |
+
$menu_child = [
|
77 |
+
'id' => 'webpc-menu-message',
|
78 |
+
'title' => sprintf(
|
79 |
+
/* translators: %1$s: images count */
|
80 |
+
__( 'Converting images (%s) is in progress.', 'webp-converter-for-media' ),
|
81 |
+
$count
|
82 |
+
),
|
83 |
+
'parent' => $menu_parent['id'],
|
84 |
+
];
|
85 |
+
|
86 |
+
$wp_admin_bar->add_menu( $menu_parent );
|
87 |
+
$wp_admin_bar->add_menu( $menu_child );
|
88 |
+
}
|
89 |
+
}
|
src/Conversion/Cron/Event.php
DELETED
@@ -1,47 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace WebpConverter\Conversion\Cron;
|
4 |
-
|
5 |
-
use WebpConverter\HookableInterface;
|
6 |
-
use WebpConverter\PluginData;
|
7 |
-
use WebpConverter\Settings\Option\ExtraFeaturesOption;
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Adds cron event that converts images.
|
11 |
-
*/
|
12 |
-
class Event implements HookableInterface {
|
13 |
-
|
14 |
-
/**
|
15 |
-
* @var PluginData
|
16 |
-
*/
|
17 |
-
private $plugin_data;
|
18 |
-
|
19 |
-
public function __construct( PluginData $plugin_data ) {
|
20 |
-
$this->plugin_data = $plugin_data;
|
21 |
-
}
|
22 |
-
|
23 |
-
const CRON_ACTION = 'webpc_regenerate_all';
|
24 |
-
|
25 |
-
/**
|
26 |
-
* {@inheritdoc}
|
27 |
-
*/
|
28 |
-
public function init_hooks() {
|
29 |
-
add_action( 'init', [ $this, 'add_cron_event' ] );
|
30 |
-
}
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Initializes cron event to convert all images.
|
34 |
-
*
|
35 |
-
* @return void
|
36 |
-
* @internal
|
37 |
-
*/
|
38 |
-
public function add_cron_event() {
|
39 |
-
if ( wp_next_scheduled( self::CRON_ACTION )
|
40 |
-
|| ! ( $settings = $this->plugin_data->get_plugin_settings() )
|
41 |
-
|| ! in_array( ExtraFeaturesOption::OPTION_VALUE_CRON_ENABLED, $settings[ ExtraFeaturesOption::OPTION_NAME ] ) ) {
|
42 |
-
return;
|
43 |
-
}
|
44 |
-
|
45 |
-
wp_schedule_event( time(), Schedules::CRON_SCHEDULE, self::CRON_ACTION );
|
46 |
-
}
|
47 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/Conversion/Endpoint/CronConversionEndpoint.php
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WebpConverter\Conversion\Endpoint;
|
4 |
+
|
5 |
+
use WebpConverter\Conversion\Cron\CronInitiator;
|
6 |
+
use WebpConverter\Conversion\Cron\CronStatusManager;
|
7 |
+
use WebpConverter\PluginData;
|
8 |
+
use WebpConverter\Repository\TokenRepository;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* .
|
12 |
+
*/
|
13 |
+
class CronConversionEndpoint extends EndpointAbstract {
|
14 |
+
|
15 |
+
/**
|
16 |
+
* @var CronInitiator
|
17 |
+
*/
|
18 |
+
private $cron_initiator;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* @var CronStatusManager
|
22 |
+
*/
|
23 |
+
private $cron_status_manager;
|
24 |
+
|
25 |
+
public function __construct(
|
26 |
+
PluginData $plugin_data,
|
27 |
+
TokenRepository $token_repository,
|
28 |
+
CronInitiator $cron_initiator = null,
|
29 |
+
CronStatusManager $cron_status_manager = null
|
30 |
+
) {
|
31 |
+
$this->cron_initiator = $cron_initiator ?: new CronInitiator( $plugin_data, $token_repository );
|
32 |
+
$this->cron_status_manager = $cron_status_manager ?: new CronStatusManager();
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* {@inheritdoc}
|
37 |
+
*/
|
38 |
+
public function get_route_name(): string {
|
39 |
+
return 'cron-conversion';
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* {@inheritdoc}
|
44 |
+
*/
|
45 |
+
public function is_valid_request( \WP_REST_Request $request ): bool {
|
46 |
+
$nonce_value = $this->cron_status_manager->get_conversion_request_id();
|
47 |
+
if ( $nonce_value === null ) {
|
48 |
+
return false;
|
49 |
+
}
|
50 |
+
|
51 |
+
return ( $request->get_param( EndpointIntegration::ROUTE_NONCE_PARAM ) === $nonce_value );
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* {@inheritdoc}
|
56 |
+
*/
|
57 |
+
public function get_route_url(): string {
|
58 |
+
$nonce_value = $this->cron_status_manager->refresh_conversion_request_id();
|
59 |
+
|
60 |
+
return get_rest_url(
|
61 |
+
null,
|
62 |
+
sprintf(
|
63 |
+
'%1$s/%2$s?%3$s=%4$s',
|
64 |
+
EndpointIntegration::ROUTE_NAMESPACE,
|
65 |
+
$this->get_route_name(),
|
66 |
+
EndpointIntegration::ROUTE_NONCE_PARAM,
|
67 |
+
$nonce_value
|
68 |
+
)
|
69 |
+
);
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* {@inheritdoc}
|
74 |
+
*/
|
75 |
+
public function get_route_response( \WP_REST_Request $request ) {
|
76 |
+
$request_id = $request->get_param( EndpointIntegration::ROUTE_NONCE_PARAM );
|
77 |
+
$this->cron_initiator->init_conversion( $request_id );
|
78 |
+
|
79 |
+
return new \WP_REST_Response( null, 200 );
|
80 |
+
}
|
81 |
+
}
|
src/Conversion/Endpoint/EndpointAbstract.php
CHANGED
@@ -16,6 +16,17 @@ abstract class EndpointAbstract implements EndpointInterface {
|
|
16 |
return ( 24 * 60 * 60 );
|
17 |
}
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
/**
|
20 |
* {@inheritdoc}
|
21 |
*/
|
16 |
return ( 24 * 60 * 60 );
|
17 |
}
|
18 |
|
19 |
+
/**
|
20 |
+
* {@inheritdoc}
|
21 |
+
*/
|
22 |
+
public function is_valid_request( \WP_REST_Request $request ): bool {
|
23 |
+
return ( new NonceManager( $this->get_url_lifetime(), false ) )
|
24 |
+
->verify_nonce(
|
25 |
+
$request->get_param( EndpointIntegration::ROUTE_NONCE_PARAM ),
|
26 |
+
sprintf( EndpointIntegration::ROUTE_NONCE_ACTION, $this->get_route_name() )
|
27 |
+
);
|
28 |
+
}
|
29 |
+
|
30 |
/**
|
31 |
* {@inheritdoc}
|
32 |
*/
|
src/Conversion/Endpoint/EndpointIntegration.php
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
namespace WebpConverter\Conversion\Endpoint;
|
4 |
|
5 |
use WebpConverter\HookableInterface;
|
6 |
-
use WebpConverter\Service\NonceManager;
|
7 |
|
8 |
/**
|
9 |
* Integrates endpoint class by registering REST API route.
|
@@ -44,12 +43,8 @@ class EndpointIntegration implements HookableInterface {
|
|
44 |
$this->endpoint_object->get_route_name(),
|
45 |
[
|
46 |
'methods' => \WP_REST_Server::ALLMETHODS,
|
47 |
-
'permission_callback' => function () {
|
48 |
-
return
|
49 |
-
->verify_nonce(
|
50 |
-
$_REQUEST[ self::ROUTE_NONCE_PARAM ] ?? '', // phpcs:ignore WordPress.Security
|
51 |
-
sprintf( self::ROUTE_NONCE_ACTION, $this->endpoint_object->get_route_name() )
|
52 |
-
);
|
53 |
},
|
54 |
'callback' => [ $this->endpoint_object, 'get_route_response' ],
|
55 |
'args' => $this->endpoint_object->get_route_args(),
|
3 |
namespace WebpConverter\Conversion\Endpoint;
|
4 |
|
5 |
use WebpConverter\HookableInterface;
|
|
|
6 |
|
7 |
/**
|
8 |
* Integrates endpoint class by registering REST API route.
|
43 |
$this->endpoint_object->get_route_name(),
|
44 |
[
|
45 |
'methods' => \WP_REST_Server::ALLMETHODS,
|
46 |
+
'permission_callback' => function ( \WP_REST_Request $request ) {
|
47 |
+
return $this->endpoint_object->is_valid_request( $request );
|
|
|
|
|
|
|
|
|
48 |
},
|
49 |
'callback' => [ $this->endpoint_object, 'get_route_response' ],
|
50 |
'args' => $this->endpoint_object->get_route_args(),
|
src/Conversion/Endpoint/EndpointInterface.php
CHANGED
@@ -21,6 +21,15 @@ interface EndpointInterface {
|
|
21 |
*/
|
22 |
public function get_url_lifetime(): int;
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
/**
|
25 |
* Returns list of params for endpoint.
|
26 |
*
|
21 |
*/
|
22 |
public function get_url_lifetime(): int;
|
23 |
|
24 |
+
/**
|
25 |
+
* Returns whether request can be executed.
|
26 |
+
*
|
27 |
+
* @param \WP_REST_Request $request .
|
28 |
+
*
|
29 |
+
* @return bool
|
30 |
+
*/
|
31 |
+
public function is_valid_request( \WP_REST_Request $request ): bool;
|
32 |
+
|
33 |
/**
|
34 |
* Returns list of params for endpoint.
|
35 |
*
|
src/Conversion/Endpoint/PathsEndpoint.php
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
|
3 |
namespace WebpConverter\Conversion\Endpoint;
|
4 |
|
|
|
5 |
use WebpConverter\Conversion\Method\RemoteMethod;
|
6 |
use WebpConverter\PluginData;
|
7 |
use WebpConverter\Repository\TokenRepository;
|
@@ -30,9 +31,15 @@ class PathsEndpoint extends EndpointAbstract {
|
|
30 |
*/
|
31 |
private $token_repository;
|
32 |
|
33 |
-
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
}
|
37 |
|
38 |
/**
|
@@ -62,12 +69,18 @@ class PathsEndpoint extends EndpointAbstract {
|
|
62 |
* {@inheritdoc}
|
63 |
*/
|
64 |
public function get_route_response( \WP_REST_Request $request ) {
|
|
|
|
|
65 |
$params = $request->get_params();
|
66 |
$skip_converted = ( $params['regenerate_force'] !== true );
|
67 |
|
68 |
$paths = $this->get_paths( $skip_converted );
|
69 |
$paths = array_chunk( $paths, $this->get_paths_chunk_size( count( $paths ) ) );
|
70 |
|
|
|
|
|
|
|
|
|
71 |
return new \WP_REST_Response(
|
72 |
$paths,
|
73 |
200
|
2 |
|
3 |
namespace WebpConverter\Conversion\Endpoint;
|
4 |
|
5 |
+
use WebpConverter\Conversion\Cron\CronStatusManager;
|
6 |
use WebpConverter\Conversion\Method\RemoteMethod;
|
7 |
use WebpConverter\PluginData;
|
8 |
use WebpConverter\Repository\TokenRepository;
|
31 |
*/
|
32 |
private $token_repository;
|
33 |
|
34 |
+
/**
|
35 |
+
* @var CronStatusManager
|
36 |
+
*/
|
37 |
+
private $cron_status_manager;
|
38 |
+
|
39 |
+
public function __construct( PluginData $plugin_data, TokenRepository $token_repository, CronStatusManager $cron_status_manager = null ) {
|
40 |
+
$this->plugin_data = $plugin_data;
|
41 |
+
$this->token_repository = $token_repository;
|
42 |
+
$this->cron_status_manager = $cron_status_manager ?: new CronStatusManager();
|
43 |
}
|
44 |
|
45 |
/**
|
69 |
* {@inheritdoc}
|
70 |
*/
|
71 |
public function get_route_response( \WP_REST_Request $request ) {
|
72 |
+
$this->cron_status_manager->set_conversion_status_locked( true, true );
|
73 |
+
|
74 |
$params = $request->get_params();
|
75 |
$skip_converted = ( $params['regenerate_force'] !== true );
|
76 |
|
77 |
$paths = $this->get_paths( $skip_converted );
|
78 |
$paths = array_chunk( $paths, $this->get_paths_chunk_size( count( $paths ) ) );
|
79 |
|
80 |
+
if ( ! $paths ) {
|
81 |
+
$this->cron_status_manager->set_conversion_status_locked( false );
|
82 |
+
}
|
83 |
+
|
84 |
return new \WP_REST_Response(
|
85 |
$paths,
|
86 |
200
|
src/Conversion/Endpoint/RegenerateEndpoint.php
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
|
3 |
namespace WebpConverter\Conversion\Endpoint;
|
4 |
|
|
|
5 |
use WebpConverter\Conversion\Method\MethodIntegrator;
|
6 |
use WebpConverter\PluginData;
|
7 |
|
@@ -15,8 +16,14 @@ class RegenerateEndpoint extends EndpointAbstract {
|
|
15 |
*/
|
16 |
private $plugin_data;
|
17 |
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
}
|
21 |
|
22 |
/**
|
@@ -61,6 +68,8 @@ class RegenerateEndpoint extends EndpointAbstract {
|
|
61 |
* {@inheritdoc}
|
62 |
*/
|
63 |
public function get_route_response( \WP_REST_Request $request ) {
|
|
|
|
|
64 |
$params = $request->get_params();
|
65 |
$data = $this->convert_images( $params['paths'], $params['regenerate_force'] );
|
66 |
|
2 |
|
3 |
namespace WebpConverter\Conversion\Endpoint;
|
4 |
|
5 |
+
use WebpConverter\Conversion\Cron\CronStatusManager;
|
6 |
use WebpConverter\Conversion\Method\MethodIntegrator;
|
7 |
use WebpConverter\PluginData;
|
8 |
|
16 |
*/
|
17 |
private $plugin_data;
|
18 |
|
19 |
+
/**
|
20 |
+
* @var CronStatusManager
|
21 |
+
*/
|
22 |
+
private $cron_status_manager;
|
23 |
+
|
24 |
+
public function __construct( PluginData $plugin_data, CronStatusManager $cron_status_manager = null ) {
|
25 |
+
$this->plugin_data = $plugin_data;
|
26 |
+
$this->cron_status_manager = $cron_status_manager ?: new CronStatusManager();
|
27 |
}
|
28 |
|
29 |
/**
|
68 |
* {@inheritdoc}
|
69 |
*/
|
70 |
public function get_route_response( \WP_REST_Request $request ) {
|
71 |
+
$this->cron_status_manager->set_conversion_status_locked();
|
72 |
+
|
73 |
$params = $request->get_params();
|
74 |
$data = $this->convert_images( $params['paths'], $params['regenerate_force'] );
|
75 |
|
src/Conversion/Media/Upload.php
CHANGED
@@ -2,9 +2,10 @@
|
|
2 |
|
3 |
namespace WebpConverter\Conversion\Media;
|
4 |
|
|
|
5 |
use WebpConverter\HookableInterface;
|
6 |
use WebpConverter\PluginData;
|
7 |
-
use WebpConverter\
|
8 |
use WebpConverter\Settings\Option\SupportedExtensionsOption;
|
9 |
|
10 |
/**
|
@@ -17,15 +18,25 @@ class Upload implements HookableInterface {
|
|
17 |
*/
|
18 |
private $plugin_data;
|
19 |
|
|
|
|
|
|
|
|
|
|
|
20 |
/**
|
21 |
* Paths of converted images.
|
22 |
*
|
23 |
* @var string[]
|
24 |
*/
|
25 |
-
private $
|
26 |
-
|
27 |
-
public function __construct(
|
28 |
-
|
|
|
|
|
|
|
|
|
|
|
29 |
}
|
30 |
|
31 |
/**
|
@@ -56,13 +67,11 @@ class Upload implements HookableInterface {
|
|
56 |
return $data;
|
57 |
}
|
58 |
|
59 |
-
$paths
|
60 |
-
$paths
|
61 |
-
|
62 |
-
$paths = array_diff( $paths, $this->converted_paths );
|
63 |
-
$this->converted_paths = array_merge( $this->converted_paths, $paths );
|
64 |
|
65 |
-
|
66 |
|
67 |
return $data;
|
68 |
}
|
@@ -104,19 +113,17 @@ class Upload implements HookableInterface {
|
|
104 |
}
|
105 |
|
106 |
/**
|
107 |
-
* Initializes conversion of attachment image sizes.
|
108 |
-
*
|
109 |
-
* @param string[] $paths Server paths of source images.
|
110 |
-
*
|
111 |
* @return void
|
|
|
|
|
112 |
*/
|
113 |
-
|
114 |
-
$
|
115 |
-
|
116 |
-
|
117 |
-
wp_schedule_single_event( ( time() + 1 ), 'webpc_convert_paths', [ $paths ] );
|
118 |
-
} else {
|
119 |
-
do_action( 'webpc_convert_paths', $paths );
|
120 |
}
|
|
|
|
|
|
|
121 |
}
|
122 |
}
|
2 |
|
3 |
namespace WebpConverter\Conversion\Media;
|
4 |
|
5 |
+
use WebpConverter\Conversion\Cron\CronInitiator;
|
6 |
use WebpConverter\HookableInterface;
|
7 |
use WebpConverter\PluginData;
|
8 |
+
use WebpConverter\Repository\TokenRepository;
|
9 |
use WebpConverter\Settings\Option\SupportedExtensionsOption;
|
10 |
|
11 |
/**
|
18 |
*/
|
19 |
private $plugin_data;
|
20 |
|
21 |
+
/**
|
22 |
+
* @var CronInitiator
|
23 |
+
*/
|
24 |
+
private $cron_initiator;
|
25 |
+
|
26 |
/**
|
27 |
* Paths of converted images.
|
28 |
*
|
29 |
* @var string[]
|
30 |
*/
|
31 |
+
private $uploaded_paths = [];
|
32 |
+
|
33 |
+
public function __construct(
|
34 |
+
PluginData $plugin_data,
|
35 |
+
TokenRepository $token_repository,
|
36 |
+
CronInitiator $cron_initiator = null
|
37 |
+
) {
|
38 |
+
$this->plugin_data = $plugin_data;
|
39 |
+
$this->cron_initiator = $cron_initiator ?: new CronInitiator( $plugin_data, $token_repository );
|
40 |
}
|
41 |
|
42 |
/**
|
67 |
return $data;
|
68 |
}
|
69 |
|
70 |
+
$paths = $this->get_sizes_paths( $data );
|
71 |
+
$paths = apply_filters( 'webpc_attachment_paths', $paths, $attachment_id );
|
72 |
+
$this->uploaded_paths = array_merge( $this->uploaded_paths, $paths );
|
|
|
|
|
73 |
|
74 |
+
add_action( 'shutdown', [ $this, 'save_paths_to_conversion' ] );
|
75 |
|
76 |
return $data;
|
77 |
}
|
113 |
}
|
114 |
|
115 |
/**
|
|
|
|
|
|
|
|
|
116 |
* @return void
|
117 |
+
*
|
118 |
+
* @internal
|
119 |
*/
|
120 |
+
public function save_paths_to_conversion() {
|
121 |
+
$paths = array_unique( $this->uploaded_paths );
|
122 |
+
if ( ! $paths ) {
|
123 |
+
return;
|
|
|
|
|
|
|
124 |
}
|
125 |
+
|
126 |
+
$this->cron_initiator->add_paths_to_conversion( $paths );
|
127 |
+
$this->cron_initiator->init_async_conversion();
|
128 |
}
|
129 |
}
|
src/Error/Detector/RewritesErrorsDetector.php
CHANGED
@@ -154,7 +154,16 @@ class RewritesErrorsDetector implements ErrorDetector {
|
|
154 |
$ver_param
|
155 |
);
|
156 |
|
157 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
}
|
159 |
|
160 |
/**
|
154 |
$ver_param
|
155 |
);
|
156 |
|
157 |
+
if ( $file_webp === 0 ) {
|
158 |
+
$file_original = $this->file_loader->get_file_size_by_url(
|
159 |
+
$uploads_url . self::PATH_OUTPUT_FILE_PNG,
|
160 |
+
false,
|
161 |
+
$ver_param
|
162 |
+
);
|
163 |
+
return ( $file_original === 0 );
|
164 |
+
}
|
165 |
+
|
166 |
+
return ( $file_webp < $file_size );
|
167 |
}
|
168 |
|
169 |
/**
|
src/Exception/LargerThanOriginalException.php
CHANGED
@@ -7,7 +7,7 @@ namespace WebpConverter\Exception;
|
|
7 |
*/
|
8 |
class LargerThanOriginalException extends ExceptionAbstract {
|
9 |
|
10 |
-
const ERROR_MESSAGE = 'Image "%1$s" converted to .%2$s is larger than original and has been deleted.';
|
11 |
const ERROR_CODE = 'larger_than_original';
|
12 |
|
13 |
/**
|
7 |
*/
|
8 |
class LargerThanOriginalException extends ExceptionAbstract {
|
9 |
|
10 |
+
const ERROR_MESSAGE = 'Image "%1$s" converted to .%2$s is larger than original and converted .%2$s file has been deleted.';
|
11 |
const ERROR_CODE = 'larger_than_original';
|
12 |
|
13 |
/**
|
src/Loader/HtaccessLoader.php
CHANGED
@@ -168,11 +168,18 @@ class HtaccessLoader extends LoaderAbstract {
|
|
168 |
* @return string Rules for .htaccess file.
|
169 |
*/
|
170 |
private function get_mod_headers_rules( array $settings ): string {
|
171 |
-
$content
|
|
|
172 |
|
173 |
$content .= '<IfModule mod_headers.c>' . PHP_EOL;
|
174 |
-
|
175 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
$content .= '</IfModule>';
|
177 |
|
178 |
return apply_filters( 'webpc_htaccess_mod_headers', $content );
|
168 |
* @return string Rules for .htaccess file.
|
169 |
*/
|
170 |
private function get_mod_headers_rules( array $settings ): string {
|
171 |
+
$content = '';
|
172 |
+
$extensions = implode( '|', $settings[ SupportedExtensionsOption::OPTION_NAME ] );
|
173 |
|
174 |
$content .= '<IfModule mod_headers.c>' . PHP_EOL;
|
175 |
+
if ( $extensions ) {
|
176 |
+
$content .= ' <FilesMatch "(?i)\.(' . $extensions . ')$">' . PHP_EOL;
|
177 |
+
}
|
178 |
+
$content .= ' Header always set Cache-Control "private"' . PHP_EOL;
|
179 |
+
$content .= ' Header append Vary "Accept"' . PHP_EOL;
|
180 |
+
if ( $extensions ) {
|
181 |
+
$content .= ' </FilesMatch>' . PHP_EOL;
|
182 |
+
}
|
183 |
$content .= '</IfModule>';
|
184 |
|
185 |
return apply_filters( 'webpc_htaccess_mod_headers', $content );
|
src/Notice/ThanksNotice.php
CHANGED
@@ -47,7 +47,7 @@ class ThanksNotice extends NoticeAbstract implements NoticeInterface {
|
|
47 |
*/
|
48 |
public function get_disable_value(): string {
|
49 |
$is_permanent = ( isset( $_REQUEST['is_permanently'] ) && $_REQUEST['is_permanently'] ); // phpcs:ignore
|
50 |
-
return (string) strtotime( ( $is_permanent ) ? '+
|
51 |
}
|
52 |
|
53 |
/**
|
47 |
*/
|
48 |
public function get_disable_value(): string {
|
49 |
$is_permanent = ( isset( $_REQUEST['is_permanently'] ) && $_REQUEST['is_permanently'] ); // phpcs:ignore
|
50 |
+
return (string) strtotime( ( $is_permanent ) ? '+1 year' : '+ 1 month' );
|
51 |
}
|
52 |
|
53 |
/**
|
src/Plugin/Deactivation/CronReset.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
namespace WebpConverter\Plugin\Deactivation;
|
4 |
|
5 |
-
use WebpConverter\Conversion\Cron\
|
6 |
|
7 |
/**
|
8 |
* Removes cron event that starts converting all images.
|
@@ -15,6 +15,6 @@ class CronReset {
|
|
15 |
* @return void
|
16 |
*/
|
17 |
public function reset_cron_event() {
|
18 |
-
wp_clear_scheduled_hook(
|
19 |
}
|
20 |
}
|
2 |
|
3 |
namespace WebpConverter\Plugin\Deactivation;
|
4 |
|
5 |
+
use WebpConverter\Conversion\Cron\CronEventGenerator;
|
6 |
|
7 |
/**
|
8 |
* Removes cron event that starts converting all images.
|
15 |
* @return void
|
16 |
*/
|
17 |
public function reset_cron_event() {
|
18 |
+
wp_clear_scheduled_hook( CronEventGenerator::CRON_PATHS_ACTION );
|
19 |
}
|
20 |
}
|
src/Plugin/Links.php
CHANGED
@@ -4,22 +4,28 @@ namespace WebpConverter\Plugin;
|
|
4 |
|
5 |
use WebpConverter\HookableInterface;
|
6 |
use WebpConverter\PluginInfo;
|
|
|
7 |
use WebpConverter\Settings\Page\PageIntegration;
|
|
|
8 |
|
9 |
/**
|
10 |
* Adds links to plugin in list of plugins in panel.
|
11 |
*/
|
12 |
class Links implements HookableInterface {
|
13 |
|
14 |
-
const DONATION_URL = 'https://ko-fi.com/gbiorczyk/?utm_source=webp-converter-for-media&utm_medium=plugin-links';
|
15 |
-
|
16 |
/**
|
17 |
* @var PluginInfo
|
18 |
*/
|
19 |
private $plugin_info;
|
20 |
|
21 |
-
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
}
|
24 |
|
25 |
/**
|
@@ -44,7 +50,7 @@ class Links implements HookableInterface {
|
|
44 |
}
|
45 |
|
46 |
$links = $this->add_link_to_settings( $links );
|
47 |
-
return $this->
|
48 |
}
|
49 |
|
50 |
/**
|
@@ -57,12 +63,10 @@ class Links implements HookableInterface {
|
|
57 |
*/
|
58 |
public function add_plugin_links_for_network( array $links ): array {
|
59 |
$links = $this->add_link_to_settings( $links );
|
60 |
-
return $this->
|
61 |
}
|
62 |
|
63 |
/**
|
64 |
-
* Adds link to plugin settings page.
|
65 |
-
*
|
66 |
* @param string[] $links Plugin action links.
|
67 |
*
|
68 |
* @return string[] Plugin action links.
|
@@ -81,18 +85,21 @@ class Links implements HookableInterface {
|
|
81 |
}
|
82 |
|
83 |
/**
|
84 |
-
* Adds link to donation.
|
85 |
-
*
|
86 |
* @param string[] $links Plugin action links.
|
87 |
*
|
88 |
* @return string[] Plugin action links.
|
89 |
* @internal
|
90 |
*/
|
91 |
-
private function
|
92 |
-
$
|
|
|
|
|
|
|
|
|
|
|
93 |
/* translators: %1$s: open anchor tag, %2$s: close anchor tag */
|
94 |
-
esc_html( __( '%1$
|
95 |
-
'<a href="' .
|
96 |
'</a>'
|
97 |
);
|
98 |
return $links;
|
4 |
|
5 |
use WebpConverter\HookableInterface;
|
6 |
use WebpConverter\PluginInfo;
|
7 |
+
use WebpConverter\Repository\TokenRepository;
|
8 |
use WebpConverter\Settings\Page\PageIntegration;
|
9 |
+
use WebpConverter\WebpConverterConstants;
|
10 |
|
11 |
/**
|
12 |
* Adds links to plugin in list of plugins in panel.
|
13 |
*/
|
14 |
class Links implements HookableInterface {
|
15 |
|
|
|
|
|
16 |
/**
|
17 |
* @var PluginInfo
|
18 |
*/
|
19 |
private $plugin_info;
|
20 |
|
21 |
+
/**
|
22 |
+
* @var TokenRepository
|
23 |
+
*/
|
24 |
+
private $token_repository;
|
25 |
+
|
26 |
+
public function __construct( PluginInfo $plugin_info, TokenRepository $token_repository ) {
|
27 |
+
$this->plugin_info = $plugin_info;
|
28 |
+
$this->token_repository = $token_repository;
|
29 |
}
|
30 |
|
31 |
/**
|
50 |
}
|
51 |
|
52 |
$links = $this->add_link_to_settings( $links );
|
53 |
+
return $this->add_link_to_pro_upgrade( $links );
|
54 |
}
|
55 |
|
56 |
/**
|
63 |
*/
|
64 |
public function add_plugin_links_for_network( array $links ): array {
|
65 |
$links = $this->add_link_to_settings( $links );
|
66 |
+
return $this->add_link_to_pro_upgrade( $links );
|
67 |
}
|
68 |
|
69 |
/**
|
|
|
|
|
70 |
* @param string[] $links Plugin action links.
|
71 |
*
|
72 |
* @return string[] Plugin action links.
|
85 |
}
|
86 |
|
87 |
/**
|
|
|
|
|
88 |
* @param string[] $links Plugin action links.
|
89 |
*
|
90 |
* @return string[] Plugin action links.
|
91 |
* @internal
|
92 |
*/
|
93 |
+
private function add_link_to_pro_upgrade( array $links ): array {
|
94 |
+
if ( $this->token_repository->get_token()->get_valid_status() ) {
|
95 |
+
return $links;
|
96 |
+
}
|
97 |
+
|
98 |
+
$upgrade_url = sprintf( WebpConverterConstants::UPGRADE_PRO_PREFIX_URL, 'plugin-links-upgrade' );
|
99 |
+
$links[] = sprintf(
|
100 |
/* translators: %1$s: open anchor tag, %2$s: close anchor tag */
|
101 |
+
esc_html( __( '%1$sUpgrade to PRO%2$s', 'webp-converter-for-media' ) ),
|
102 |
+
'<a href="' . esc_url( $upgrade_url ) . '" target="_blank" style="font-weight: bold;">',
|
103 |
'</a>'
|
104 |
);
|
105 |
return $links;
|
src/Plugin/Uninstall/PluginSettings.php
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
|
3 |
namespace WebpConverter\Plugin\Uninstall;
|
4 |
|
|
|
5 |
use WebpConverter\Error\ErrorDetectorAggregator;
|
6 |
use WebpConverter\Notice\ThanksNotice;
|
7 |
use WebpConverter\Notice\WelcomeNotice;
|
@@ -28,5 +29,10 @@ class PluginSettings {
|
|
28 |
OptionsAccessManager::delete_option( SettingsSave::SETTINGS_OPTION );
|
29 |
OptionsAccessManager::delete_option( Update::VERSION_OPTION );
|
30 |
OptionsAccessManager::delete_option( TokenRepository::TOKEN_OPTION );
|
|
|
|
|
|
|
|
|
|
|
31 |
}
|
32 |
}
|
2 |
|
3 |
namespace WebpConverter\Plugin\Uninstall;
|
4 |
|
5 |
+
use WebpConverter\Conversion\Cron\CronStatusManager;
|
6 |
use WebpConverter\Error\ErrorDetectorAggregator;
|
7 |
use WebpConverter\Notice\ThanksNotice;
|
8 |
use WebpConverter\Notice\WelcomeNotice;
|
29 |
OptionsAccessManager::delete_option( SettingsSave::SETTINGS_OPTION );
|
30 |
OptionsAccessManager::delete_option( Update::VERSION_OPTION );
|
31 |
OptionsAccessManager::delete_option( TokenRepository::TOKEN_OPTION );
|
32 |
+
|
33 |
+
delete_site_transient( CronStatusManager::CRON_PATHS_TRANSIENT );
|
34 |
+
delete_site_transient( CronStatusManager::CRON_PATHS_SKIPPED_TRANSIENT );
|
35 |
+
delete_site_transient( CronStatusManager::CRON_STATUS_LOCKED_TRANSIENT );
|
36 |
+
delete_site_transient( CronStatusManager::CRON_REQUEST_ID_TRANSIENT );
|
37 |
}
|
38 |
}
|
src/Settings/Option/ExtraFeaturesOption.php
CHANGED
@@ -15,7 +15,6 @@ class ExtraFeaturesOption extends OptionAbstract {
|
|
15 |
const OPTION_VALUE_MOD_EXPIRES = 'mod_expires';
|
16 |
const OPTION_VALUE_KEEP_METADATA = 'keep_metadata';
|
17 |
const OPTION_VALUE_CRON_ENABLED = 'cron_enabled';
|
18 |
-
const OPTION_VALUE_CRON_CONVERSION = 'cron_conversion';
|
19 |
const OPTION_VALUE_REFERER_DISABLED = 'referer_disabled';
|
20 |
const OPTION_VALUE_DEBUG_ENABLED = 'debug_enabled';
|
21 |
|
@@ -77,10 +76,6 @@ class ExtraFeaturesOption extends OptionAbstract {
|
|
77 |
'Enable cron to automatically convert images from outside Media Library (images from Media Library are converted immediately after upload)',
|
78 |
'webp-converter-for-media'
|
79 |
),
|
80 |
-
self::OPTION_VALUE_CRON_CONVERSION => __(
|
81 |
-
'Enable cron to convert images uploaded to Media Library to speed up process of adding images (deactivate this option if images added to Media Library are not automatically converted)',
|
82 |
-
'webp-converter-for-media'
|
83 |
-
),
|
84 |
self::OPTION_VALUE_REFERER_DISABLED => __(
|
85 |
'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)',
|
86 |
'webp-converter-for-media'
|
@@ -117,7 +112,6 @@ class ExtraFeaturesOption extends OptionAbstract {
|
|
117 |
return [
|
118 |
self::OPTION_VALUE_ONLY_SMALLER,
|
119 |
self::OPTION_VALUE_MOD_EXPIRES,
|
120 |
-
self::OPTION_VALUE_CRON_CONVERSION,
|
121 |
self::OPTION_VALUE_REFERER_DISABLED,
|
122 |
self::OPTION_VALUE_DEBUG_ENABLED,
|
123 |
];
|
15 |
const OPTION_VALUE_MOD_EXPIRES = 'mod_expires';
|
16 |
const OPTION_VALUE_KEEP_METADATA = 'keep_metadata';
|
17 |
const OPTION_VALUE_CRON_ENABLED = 'cron_enabled';
|
|
|
18 |
const OPTION_VALUE_REFERER_DISABLED = 'referer_disabled';
|
19 |
const OPTION_VALUE_DEBUG_ENABLED = 'debug_enabled';
|
20 |
|
76 |
'Enable cron to automatically convert images from outside Media Library (images from Media Library are converted immediately after upload)',
|
77 |
'webp-converter-for-media'
|
78 |
),
|
|
|
|
|
|
|
|
|
79 |
self::OPTION_VALUE_REFERER_DISABLED => __(
|
80 |
'Force redirections to output formats for all domains (by default, images in output formats are loaded only in domain of your website - when image is displayed via URL on another domain that original file is loaded)',
|
81 |
'webp-converter-for-media'
|
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 |
];
|
src/Settings/Option/OutputFormatsOption.php
CHANGED
@@ -89,9 +89,10 @@ class OutputFormatsOption extends OptionAbstract {
|
|
89 |
* @return string[]
|
90 |
*/
|
91 |
public function get_default_value( array $settings = null ): array {
|
92 |
-
$method
|
93 |
-
|
94 |
-
|
|
|
95 |
$formats = array_keys( $this->formats_integration->get_available_formats( $method ) );
|
96 |
|
97 |
return ( in_array( WebpFormat::FORMAT_EXTENSION, $formats ) ) ? [ WebpFormat::FORMAT_EXTENSION ] : [];
|
@@ -103,9 +104,10 @@ class OutputFormatsOption extends OptionAbstract {
|
|
103 |
* @return string[]
|
104 |
*/
|
105 |
public function get_disabled_values( array $settings ): array {
|
106 |
-
$method
|
107 |
-
|
108 |
-
|
|
|
109 |
$formats = $this->formats_integration->get_formats();
|
110 |
$formats_available = $this->formats_integration->get_available_formats( $method );
|
111 |
|
89 |
* @return string[]
|
90 |
*/
|
91 |
public function get_default_value( array $settings = null ): array {
|
92 |
+
$method = $settings[ ConversionMethodOption::OPTION_NAME ] ?? null;
|
93 |
+
if ( ! $method ) {
|
94 |
+
$method = $this->conversion_method_option->get_default_value( $settings );
|
95 |
+
}
|
96 |
$formats = array_keys( $this->formats_integration->get_available_formats( $method ) );
|
97 |
|
98 |
return ( in_array( WebpFormat::FORMAT_EXTENSION, $formats ) ) ? [ WebpFormat::FORMAT_EXTENSION ] : [];
|
104 |
* @return string[]
|
105 |
*/
|
106 |
public function get_disabled_values( array $settings ): array {
|
107 |
+
$method = $settings[ ConversionMethodOption::OPTION_NAME ] ?? null;
|
108 |
+
if ( ! $method || in_array( $method, $this->conversion_method_option->get_disabled_values( $settings ) ) ) {
|
109 |
+
$method = $this->conversion_method_option->get_default_value( $settings );
|
110 |
+
}
|
111 |
$formats = $this->formats_integration->get_formats();
|
112 |
$formats_available = $this->formats_integration->get_available_formats( $method );
|
113 |
|
src/Settings/Page/DebugPage.php
CHANGED
@@ -9,7 +9,10 @@ use WebpConverter\Loader\LoaderAbstract;
|
|
9 |
use WebpConverter\PluginData;
|
10 |
use WebpConverter\PluginInfo;
|
11 |
use WebpConverter\Service\FileLoader;
|
|
|
12 |
use WebpConverter\Service\ViewLoader;
|
|
|
|
|
13 |
|
14 |
/**
|
15 |
* Supports debug tab in plugin settings page.
|
@@ -92,9 +95,23 @@ class DebugPage extends PageAbstract {
|
|
92 |
true,
|
93 |
$ver_param
|
94 |
),
|
|
|
95 |
]
|
96 |
);
|
97 |
|
98 |
do_action( LoaderAbstract::ACTION_NAME, true );
|
99 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
}
|
9 |
use WebpConverter\PluginData;
|
10 |
use WebpConverter\PluginInfo;
|
11 |
use WebpConverter\Service\FileLoader;
|
12 |
+
use WebpConverter\Service\OptionsAccessManager;
|
13 |
use WebpConverter\Service\ViewLoader;
|
14 |
+
use WebpConverter\Settings\Option\AccessTokenOption;
|
15 |
+
use WebpConverter\Settings\SettingsSave;
|
16 |
|
17 |
/**
|
18 |
* Supports debug tab in plugin settings page.
|
95 |
true,
|
96 |
$ver_param
|
97 |
),
|
98 |
+
'plugin_settings' => $this->get_plugin_settings(),
|
99 |
]
|
100 |
);
|
101 |
|
102 |
do_action( LoaderAbstract::ACTION_NAME, true );
|
103 |
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* @return mixed[]
|
107 |
+
*/
|
108 |
+
private function get_plugin_settings(): array {
|
109 |
+
$plugin_settings = OptionsAccessManager::get_option( SettingsSave::SETTINGS_OPTION, [] );
|
110 |
+
$access_token = $plugin_settings[ AccessTokenOption::OPTION_NAME ] ?? '';
|
111 |
+
if ( $access_token ) {
|
112 |
+
$plugin_settings[ AccessTokenOption::OPTION_NAME ] = substr( $access_token, 0, 32 ) . str_repeat( '*', 32 );
|
113 |
+
}
|
114 |
+
|
115 |
+
return $plugin_settings;
|
116 |
+
}
|
117 |
}
|
src/Settings/Page/PageIntegration.php
CHANGED
@@ -67,7 +67,7 @@ class PageIntegration implements HookableInterface {
|
|
67 |
}
|
68 |
|
69 |
if ( $action !== null ) {
|
70 |
-
$page_url .= 'action=' . $action;
|
71 |
}
|
72 |
return $page_url;
|
73 |
}
|
67 |
}
|
68 |
|
69 |
if ( $action !== null ) {
|
70 |
+
$page_url .= '&action=' . $action;
|
71 |
}
|
72 |
return $page_url;
|
73 |
}
|
src/Settings/SettingsSave.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
namespace WebpConverter\Settings;
|
4 |
|
5 |
-
use WebpConverter\Conversion\Cron\
|
6 |
use WebpConverter\Conversion\Directory\DirectoryFactory;
|
7 |
use WebpConverter\Conversion\Format\AvifFormat;
|
8 |
use WebpConverter\Conversion\Format\WebpFormat;
|
@@ -105,7 +105,7 @@ class SettingsSave {
|
|
105 |
*/
|
106 |
private function init_actions_after_save() {
|
107 |
do_action( LoaderAbstract::ACTION_NAME, true );
|
108 |
-
wp_clear_scheduled_hook(
|
109 |
|
110 |
$settings = $this->plugin_data->get_plugin_settings();
|
111 |
( new DirectoryFactory() )->remove_unused_output_directories( $settings[ SupportedDirectoriesOption::OPTION_NAME ] );
|
2 |
|
3 |
namespace WebpConverter\Settings;
|
4 |
|
5 |
+
use WebpConverter\Conversion\Cron\CronEventGenerator;
|
6 |
use WebpConverter\Conversion\Directory\DirectoryFactory;
|
7 |
use WebpConverter\Conversion\Format\AvifFormat;
|
8 |
use WebpConverter\Conversion\Format\WebpFormat;
|
105 |
*/
|
106 |
private function init_actions_after_save() {
|
107 |
do_action( LoaderAbstract::ACTION_NAME, true );
|
108 |
+
wp_clear_scheduled_hook( CronEventGenerator::CRON_PATHS_ACTION );
|
109 |
|
110 |
$settings = $this->plugin_data->get_plugin_settings();
|
111 |
( new DirectoryFactory() )->remove_unused_output_directories( $settings[ SupportedDirectoriesOption::OPTION_NAME ] );
|
src/WebpConverter.php
CHANGED
@@ -27,25 +27,26 @@ class WebpConverter {
|
|
27 |
( new Action\ConvertDir() )->init_hooks();
|
28 |
( new Action\ConvertPaths( $plugin_data ) )->init_hooks();
|
29 |
( new Action\DeletePaths() )->init_hooks();
|
30 |
-
( new Action\RegenerateAll( $plugin_data, $token_repository ) )->init_hooks();
|
31 |
( new Conversion\Directory\DirectoryFactory() )->init_hooks();
|
32 |
( new Conversion\DirectoryFiles( $plugin_data ) )->init_hooks();
|
33 |
( new Endpoint\EndpointIntegration( new Endpoint\ImagesCounterEndpoint( $plugin_data, $token_repository ) ) )->init_hooks();
|
34 |
( new Endpoint\EndpointIntegration( new Endpoint\PathsEndpoint( $plugin_data, $token_repository ) ) )->init_hooks();
|
35 |
( new Endpoint\EndpointIntegration( new Endpoint\RegenerateEndpoint( $plugin_data ) ) )->init_hooks();
|
|
|
36 |
( new Conversion\SkipConvertedPaths( $plugin_data ) )->init_hooks();
|
37 |
( new Conversion\SkipExcludedPaths() )->init_hooks();
|
38 |
-
( new Cron\
|
39 |
-
( new Cron\
|
|
|
40 |
( new ErrorDetectorAggregator( $plugin_info, $plugin_data ) )->init_hooks();
|
41 |
( new Notice\NoticeFactory( $plugin_info ) )->init_hooks();
|
42 |
( new Loader\LoaderIntegration( new Loader\HtaccessLoader( $plugin_info, $plugin_data ) ) )->init_hooks();
|
43 |
( new Loader\LoaderIntegration( new Loader\PassthruLoader( $plugin_info, $plugin_data ) ) )->init_hooks();
|
44 |
( new Media\Delete() )->init_hooks();
|
45 |
-
( new Media\Upload( $plugin_data ) )->init_hooks();
|
46 |
( new Plugin\Activation( $plugin_info ) )->init_hooks();
|
47 |
( new Plugin\Deactivation( $plugin_info ) )->init_hooks();
|
48 |
-
( new Plugin\Links( $plugin_info ) )->init_hooks();
|
49 |
( new Plugin\Uninstall( $plugin_info ) )->init_hooks();
|
50 |
( new Plugin\Update( $plugin_info ) )->init_hooks();
|
51 |
( new Page\PageIntegration( $plugin_info ) )
|
@@ -53,5 +54,6 @@ class WebpConverter {
|
|
53 |
->set_page_integration( new Page\DebugPage( $plugin_info, $plugin_data ) )
|
54 |
->init_hooks();
|
55 |
( new Service\DeactivationModalGenerator( $plugin_info, $plugin_data ) )->load_modal();
|
|
|
56 |
}
|
57 |
}
|
27 |
( new Action\ConvertDir() )->init_hooks();
|
28 |
( new Action\ConvertPaths( $plugin_data ) )->init_hooks();
|
29 |
( new Action\DeletePaths() )->init_hooks();
|
|
|
30 |
( new Conversion\Directory\DirectoryFactory() )->init_hooks();
|
31 |
( new Conversion\DirectoryFiles( $plugin_data ) )->init_hooks();
|
32 |
( new Endpoint\EndpointIntegration( new Endpoint\ImagesCounterEndpoint( $plugin_data, $token_repository ) ) )->init_hooks();
|
33 |
( new Endpoint\EndpointIntegration( new Endpoint\PathsEndpoint( $plugin_data, $token_repository ) ) )->init_hooks();
|
34 |
( new Endpoint\EndpointIntegration( new Endpoint\RegenerateEndpoint( $plugin_data ) ) )->init_hooks();
|
35 |
+
( new Endpoint\EndpointIntegration( new Endpoint\CronConversionEndpoint( $plugin_data, $token_repository ) ) )->init_hooks();
|
36 |
( new Conversion\SkipConvertedPaths( $plugin_data ) )->init_hooks();
|
37 |
( new Conversion\SkipExcludedPaths() )->init_hooks();
|
38 |
+
( new Cron\CronEventGenerator( $plugin_data, $token_repository ) )->init_hooks();
|
39 |
+
( new Cron\CronSchedulesGenerator() )->init_hooks();
|
40 |
+
( new Cron\CronStatusViewer( $plugin_info ) )->init_hooks();
|
41 |
( new ErrorDetectorAggregator( $plugin_info, $plugin_data ) )->init_hooks();
|
42 |
( new Notice\NoticeFactory( $plugin_info ) )->init_hooks();
|
43 |
( new Loader\LoaderIntegration( new Loader\HtaccessLoader( $plugin_info, $plugin_data ) ) )->init_hooks();
|
44 |
( new Loader\LoaderIntegration( new Loader\PassthruLoader( $plugin_info, $plugin_data ) ) )->init_hooks();
|
45 |
( new Media\Delete() )->init_hooks();
|
46 |
+
( new Media\Upload( $plugin_data, $token_repository ) )->init_hooks();
|
47 |
( new Plugin\Activation( $plugin_info ) )->init_hooks();
|
48 |
( new Plugin\Deactivation( $plugin_info ) )->init_hooks();
|
49 |
+
( new Plugin\Links( $plugin_info, $token_repository ) )->init_hooks();
|
50 |
( new Plugin\Uninstall( $plugin_info ) )->init_hooks();
|
51 |
( new Plugin\Update( $plugin_info ) )->init_hooks();
|
52 |
( new Page\PageIntegration( $plugin_info ) )
|
54 |
->set_page_integration( new Page\DebugPage( $plugin_info, $plugin_data ) )
|
55 |
->init_hooks();
|
56 |
( new Service\DeactivationModalGenerator( $plugin_info, $plugin_data ) )->load_modal();
|
57 |
+
( new Settings\AdminAssets( $plugin_info ) )->init_hooks();
|
58 |
}
|
59 |
}
|
templates/components/notices/thanks.php
CHANGED
@@ -18,25 +18,19 @@
|
|
18 |
<p>
|
19 |
<?php
|
20 |
echo wp_kses_post(
|
21 |
-
__( 'We are glad that you are using our plugin and we hope you are satisfied with it. If you want, you can support us in the development of the plugin by
|
22 |
);
|
23 |
?>
|
24 |
</p>
|
25 |
<div class="webpContent__buttons">
|
26 |
-
<a href="https://ko-fi.com/gbiorczyk/?utm_source=webp-converter-for-media&utm_medium=notice-thanks"
|
27 |
-
target="_blank"
|
28 |
-
class="webpContent__button webpButton webpButton--green dashicons-heart"
|
29 |
-
>
|
30 |
-
<?php echo esc_html( __( 'Provide us a coffee', 'webp-converter-for-media' ) ); ?>
|
31 |
-
</a>
|
32 |
<a href="https://wordpress.org/support/plugin/webp-converter-for-media/reviews/?rate=5#new-post"
|
33 |
target="_blank"
|
34 |
-
class="webpContent__button webpButton webpButton--
|
35 |
>
|
36 |
<?php echo esc_html( __( 'Add plugin review', 'webp-converter-for-media' ) ); ?>
|
37 |
</a>
|
38 |
<button type="button" data-permanently
|
39 |
-
class="webpContent__button webpButton webpButton--
|
40 |
>
|
41 |
<?php echo esc_html( __( 'Hide, do not show again', 'webp-converter-for-media' ) ); ?>
|
42 |
</button>
|
18 |
<p>
|
19 |
<?php
|
20 |
echo wp_kses_post(
|
21 |
+
__( 'We are glad that you are using our plugin and we hope you are satisfied with it. If you want, you can support us in the development of the plugin by adding a plugin review. This is very important and gives us the opportunity to create even better tools for you. Thank you to everyone.', 'webp-converter-for-media' )
|
22 |
);
|
23 |
?>
|
24 |
</p>
|
25 |
<div class="webpContent__buttons">
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
<a href="https://wordpress.org/support/plugin/webp-converter-for-media/reviews/?rate=5#new-post"
|
27 |
target="_blank"
|
28 |
+
class="webpContent__button webpButton webpButton--blue webpButton--bg"
|
29 |
>
|
30 |
<?php echo esc_html( __( 'Add plugin review', 'webp-converter-for-media' ) ); ?>
|
31 |
</a>
|
32 |
<button type="button" data-permanently
|
33 |
+
class="webpContent__button webpButton webpButton--gray webpButton--bg"
|
34 |
>
|
35 |
<?php echo esc_html( __( 'Hide, do not show again', 'webp-converter-for-media' ) ); ?>
|
36 |
</button>
|
templates/components/server/debug.php
CHANGED
@@ -2,12 +2,13 @@
|
|
2 |
/**
|
3 |
* Information about debugging displayed in server configuration widget.
|
4 |
*
|
5 |
-
* @var string
|
6 |
-
* @var string
|
7 |
-
* @var string
|
8 |
-
* @var string
|
9 |
-
* @var string
|
10 |
-
* @var string
|
|
|
11 |
* @package WebP Converter for Media
|
12 |
*/
|
13 |
|
@@ -51,5 +52,11 @@
|
|
51 |
<?php echo esc_html( $size_png2_url ); ?>
|
52 |
</td>
|
53 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
</tbody>
|
55 |
</table>
|
2 |
/**
|
3 |
* Information about debugging displayed in server configuration widget.
|
4 |
*
|
5 |
+
* @var string $size_png_path Size of file.
|
6 |
+
* @var string $size_png2_path Size of file.
|
7 |
+
* @var string $size_png_url Size of file.
|
8 |
+
* @var string $size_png2_url Size of file.
|
9 |
+
* @var string $size_png_as_webp_url Size of file.
|
10 |
+
* @var string $size_png2_as_webp_url Size of file.
|
11 |
+
* @var mixed[] $plugin_settings .
|
12 |
* @package WebP Converter for Media
|
13 |
*/
|
14 |
|
52 |
<?php echo esc_html( $size_png2_url ); ?>
|
53 |
</td>
|
54 |
</tr>
|
55 |
+
<tr>
|
56 |
+
<td class="e">Plugin settings</td>
|
57 |
+
<td class="v">
|
58 |
+
<?php echo esc_html( json_encode( $plugin_settings ) ?: '-' ); ?>
|
59 |
+
</td>
|
60 |
+
</tr>
|
61 |
</tbody>
|
62 |
</table>
|
templates/components/widgets/regenerate.php
CHANGED
@@ -8,6 +8,8 @@
|
|
8 |
* @package WebP Converter for Media
|
9 |
*/
|
10 |
|
|
|
|
|
11 |
?>
|
12 |
<div class="webpPage__widget">
|
13 |
<h3 class="webpPage__widgetTitle">
|
@@ -67,18 +69,18 @@
|
|
67 |
echo wp_kses_post(
|
68 |
sprintf(
|
69 |
/* translators: %s break line tag */
|
70 |
-
__( 'Hello, my name is Mateusz! %sI am glad you managed to reduce the weight of your website. If you would like to support me in developing this plugin
|
71 |
'<br>'
|
72 |
)
|
73 |
);
|
74 |
?>
|
75 |
</p>
|
76 |
<p>
|
77 |
-
<a href="
|
78 |
target="_blank"
|
79 |
-
class="webpButton webpButton--blue dashicons-
|
80 |
>
|
81 |
-
<?php echo wp_kses_post( __( '
|
82 |
</a>
|
83 |
</p>
|
84 |
</div>
|
8 |
* @package WebP Converter for Media
|
9 |
*/
|
10 |
|
11 |
+
use WebpConverter\WebpConverterConstants;
|
12 |
+
|
13 |
?>
|
14 |
<div class="webpPage__widget">
|
15 |
<h3 class="webpPage__widgetTitle">
|
69 |
echo wp_kses_post(
|
70 |
sprintf(
|
71 |
/* translators: %s break line tag */
|
72 |
+
__( 'Hello, my name is Mateusz! %sI am glad you managed to reduce the weight of your website. If you would like to support me in developing this plugin and achieve even better image conversion results using AVIF format, check out the PRO version of my plugin.', 'webp-converter-for-media' ),
|
73 |
'<br>'
|
74 |
)
|
75 |
);
|
76 |
?>
|
77 |
</p>
|
78 |
<p>
|
79 |
+
<a href="<?php echo esc_url( sprintf( WebpConverterConstants::UPGRADE_PRO_PREFIX_URL, 'regeneration-notice-upgrade' ) ); ?>"
|
80 |
target="_blank"
|
81 |
+
class="webpButton webpButton--blue dashicons-external"
|
82 |
>
|
83 |
+
<?php echo wp_kses_post( __( 'Meet the PRO version', 'webp-converter-for-media' ) ); ?>
|
84 |
</a>
|
85 |
</p>
|
86 |
</div>
|
templates/components/widgets/server.php
CHANGED
@@ -2,14 +2,15 @@
|
|
2 |
/**
|
3 |
* Widget displayed server configuration on plugin settings page.
|
4 |
*
|
5 |
-
* @var string
|
6 |
-
* @var string
|
7 |
-
* @var string
|
8 |
-
* @var string
|
9 |
-
* @var string
|
10 |
-
* @var string
|
11 |
-
* @var string
|
12 |
-
* @var string
|
|
|
13 |
* @package WebP Converter for Media
|
14 |
*/
|
15 |
|
2 |
/**
|
3 |
* Widget displayed server configuration on plugin settings page.
|
4 |
*
|
5 |
+
* @var string $settings_url URL of plugin settings page.
|
6 |
+
* @var string $site_root_path Root path of WordPress installation.
|
7 |
+
* @var string $size_png_path Size of file.
|
8 |
+
* @var string $size_png2_path Size of file.
|
9 |
+
* @var string $size_png_url Size of file.
|
10 |
+
* @var string $size_png2_url Size of file.
|
11 |
+
* @var string $size_png_as_webp_url Size of file.
|
12 |
+
* @var string $size_png2_as_webp_url Size of file.
|
13 |
+
* @var mixed[] $plugin_settings .
|
14 |
* @package WebP Converter for Media
|
15 |
*/
|
16 |
|
templates/views/settings-debug.php
CHANGED
@@ -2,14 +2,15 @@
|
|
2 |
/**
|
3 |
* Debug tab of plugin settings page.
|
4 |
*
|
5 |
-
* @var string
|
6 |
-
* @var string
|
7 |
-
* @var string
|
8 |
-
* @var string
|
9 |
-
* @var string
|
10 |
-
* @var string
|
11 |
-
* @var string
|
12 |
-
* @var string
|
|
|
13 |
* @package WebP Converter for Media
|
14 |
*/
|
15 |
|
2 |
/**
|
3 |
* Debug tab of plugin settings page.
|
4 |
*
|
5 |
+
* @var string $settings_url URL of plugin settings page (default view).
|
6 |
+
* @var string $site_root_path Root path of WordPress installation.
|
7 |
+
* @var string $size_png_path Size of file.
|
8 |
+
* @var string $size_png2_path Size of file.
|
9 |
+
* @var string $size_png_url Size of file.
|
10 |
+
* @var string $size_png2_url Size of file.
|
11 |
+
* @var string $size_png_as_webp_url Size of file.
|
12 |
+
* @var string $size_png2_as_webp_url Size of file.
|
13 |
+
* @var mixed[] $plugin_settings .
|
14 |
* @package WebP Converter for Media
|
15 |
*/
|
16 |
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit024f0a84246706a5ce089d47fa9fe20c::getLoader();
|
vendor/composer/autoload_classmap.php
CHANGED
@@ -24,9 +24,11 @@ return array(
|
|
24 |
'WebpConverter\\Action\\ConvertDir' => $baseDir . '/src/Action/ConvertDir.php',
|
25 |
'WebpConverter\\Action\\ConvertPaths' => $baseDir . '/src/Action/ConvertPaths.php',
|
26 |
'WebpConverter\\Action\\DeletePaths' => $baseDir . '/src/Action/DeletePaths.php',
|
27 |
-
'WebpConverter\\
|
28 |
-
'WebpConverter\\Conversion\\Cron\\
|
29 |
-
'WebpConverter\\Conversion\\Cron\\
|
|
|
|
|
30 |
'WebpConverter\\Conversion\\DirectoryFiles' => $baseDir . '/src/Conversion/DirectoryFiles.php',
|
31 |
'WebpConverter\\Conversion\\Directory\\DirectoryAbstract' => $baseDir . '/src/Conversion/Directory/DirectoryAbstract.php',
|
32 |
'WebpConverter\\Conversion\\Directory\\DirectoryFactory' => $baseDir . '/src/Conversion/Directory/DirectoryFactory.php',
|
@@ -38,6 +40,7 @@ return array(
|
|
38 |
'WebpConverter\\Conversion\\Directory\\ThemesDirectory' => $baseDir . '/src/Conversion/Directory/ThemesDirectory.php',
|
39 |
'WebpConverter\\Conversion\\Directory\\UploadsDirectory' => $baseDir . '/src/Conversion/Directory/UploadsDirectory.php',
|
40 |
'WebpConverter\\Conversion\\Directory\\UploadsWebpcDirectory' => $baseDir . '/src/Conversion/Directory/UploadsWebpcDirectory.php',
|
|
|
41 |
'WebpConverter\\Conversion\\Endpoint\\EndpointAbstract' => $baseDir . '/src/Conversion/Endpoint/EndpointAbstract.php',
|
42 |
'WebpConverter\\Conversion\\Endpoint\\EndpointIntegration' => $baseDir . '/src/Conversion/Endpoint/EndpointIntegration.php',
|
43 |
'WebpConverter\\Conversion\\Endpoint\\EndpointInterface' => $baseDir . '/src/Conversion/Endpoint/EndpointInterface.php',
|
24 |
'WebpConverter\\Action\\ConvertDir' => $baseDir . '/src/Action/ConvertDir.php',
|
25 |
'WebpConverter\\Action\\ConvertPaths' => $baseDir . '/src/Action/ConvertPaths.php',
|
26 |
'WebpConverter\\Action\\DeletePaths' => $baseDir . '/src/Action/DeletePaths.php',
|
27 |
+
'WebpConverter\\Conversion\\Cron\\CronEventGenerator' => $baseDir . '/src/Conversion/Cron/CronEventGenerator.php',
|
28 |
+
'WebpConverter\\Conversion\\Cron\\CronInitiator' => $baseDir . '/src/Conversion/Cron/CronInitiator.php',
|
29 |
+
'WebpConverter\\Conversion\\Cron\\CronSchedulesGenerator' => $baseDir . '/src/Conversion/Cron/CronSchedulesGenerator.php',
|
30 |
+
'WebpConverter\\Conversion\\Cron\\CronStatusManager' => $baseDir . '/src/Conversion/Cron/CronStatusManager.php',
|
31 |
+
'WebpConverter\\Conversion\\Cron\\CronStatusViewer' => $baseDir . '/src/Conversion/Cron/CronStatusViewer.php',
|
32 |
'WebpConverter\\Conversion\\DirectoryFiles' => $baseDir . '/src/Conversion/DirectoryFiles.php',
|
33 |
'WebpConverter\\Conversion\\Directory\\DirectoryAbstract' => $baseDir . '/src/Conversion/Directory/DirectoryAbstract.php',
|
34 |
'WebpConverter\\Conversion\\Directory\\DirectoryFactory' => $baseDir . '/src/Conversion/Directory/DirectoryFactory.php',
|
40 |
'WebpConverter\\Conversion\\Directory\\ThemesDirectory' => $baseDir . '/src/Conversion/Directory/ThemesDirectory.php',
|
41 |
'WebpConverter\\Conversion\\Directory\\UploadsDirectory' => $baseDir . '/src/Conversion/Directory/UploadsDirectory.php',
|
42 |
'WebpConverter\\Conversion\\Directory\\UploadsWebpcDirectory' => $baseDir . '/src/Conversion/Directory/UploadsWebpcDirectory.php',
|
43 |
+
'WebpConverter\\Conversion\\Endpoint\\CronConversionEndpoint' => $baseDir . '/src/Conversion/Endpoint/CronConversionEndpoint.php',
|
44 |
'WebpConverter\\Conversion\\Endpoint\\EndpointAbstract' => $baseDir . '/src/Conversion/Endpoint/EndpointAbstract.php',
|
45 |
'WebpConverter\\Conversion\\Endpoint\\EndpointIntegration' => $baseDir . '/src/Conversion/Endpoint/EndpointIntegration.php',
|
46 |
'WebpConverter\\Conversion\\Endpoint\\EndpointInterface' => $baseDir . '/src/Conversion/Endpoint/EndpointInterface.php',
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -22,15 +22,15 @@ class ComposerAutoloaderInitebe26683fe2867a2665137fa33b88538
|
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
-
spl_autoload_register(array('
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
27 |
-
spl_autoload_unregister(array('
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
-
call_user_func(\Composer\Autoload\
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit024f0a84246706a5ce089d47fa9fe20c
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
spl_autoload_register(array('ComposerAutoloaderInit024f0a84246706a5ce089d47fa9fe20c', 'loadClassLoader'), true, true);
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit024f0a84246706a5ce089d47fa9fe20c', 'loadClassLoader'));
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit024f0a84246706a5ce089d47fa9fe20c::getInitializer($loader));
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'W' =>
|
@@ -39,9 +39,11 @@ class ComposerStaticInitebe26683fe2867a2665137fa33b88538
|
|
39 |
'WebpConverter\\Action\\ConvertDir' => __DIR__ . '/../..' . '/src/Action/ConvertDir.php',
|
40 |
'WebpConverter\\Action\\ConvertPaths' => __DIR__ . '/../..' . '/src/Action/ConvertPaths.php',
|
41 |
'WebpConverter\\Action\\DeletePaths' => __DIR__ . '/../..' . '/src/Action/DeletePaths.php',
|
42 |
-
'WebpConverter\\
|
43 |
-
'WebpConverter\\Conversion\\Cron\\
|
44 |
-
'WebpConverter\\Conversion\\Cron\\
|
|
|
|
|
45 |
'WebpConverter\\Conversion\\DirectoryFiles' => __DIR__ . '/../..' . '/src/Conversion/DirectoryFiles.php',
|
46 |
'WebpConverter\\Conversion\\Directory\\DirectoryAbstract' => __DIR__ . '/../..' . '/src/Conversion/Directory/DirectoryAbstract.php',
|
47 |
'WebpConverter\\Conversion\\Directory\\DirectoryFactory' => __DIR__ . '/../..' . '/src/Conversion/Directory/DirectoryFactory.php',
|
@@ -53,6 +55,7 @@ class ComposerStaticInitebe26683fe2867a2665137fa33b88538
|
|
53 |
'WebpConverter\\Conversion\\Directory\\ThemesDirectory' => __DIR__ . '/../..' . '/src/Conversion/Directory/ThemesDirectory.php',
|
54 |
'WebpConverter\\Conversion\\Directory\\UploadsDirectory' => __DIR__ . '/../..' . '/src/Conversion/Directory/UploadsDirectory.php',
|
55 |
'WebpConverter\\Conversion\\Directory\\UploadsWebpcDirectory' => __DIR__ . '/../..' . '/src/Conversion/Directory/UploadsWebpcDirectory.php',
|
|
|
56 |
'WebpConverter\\Conversion\\Endpoint\\EndpointAbstract' => __DIR__ . '/../..' . '/src/Conversion/Endpoint/EndpointAbstract.php',
|
57 |
'WebpConverter\\Conversion\\Endpoint\\EndpointIntegration' => __DIR__ . '/../..' . '/src/Conversion/Endpoint/EndpointIntegration.php',
|
58 |
'WebpConverter\\Conversion\\Endpoint\\EndpointInterface' => __DIR__ . '/../..' . '/src/Conversion/Endpoint/EndpointInterface.php',
|
@@ -193,9 +196,9 @@ class ComposerStaticInitebe26683fe2867a2665137fa33b88538
|
|
193 |
public static function getInitializer(ClassLoader $loader)
|
194 |
{
|
195 |
return \Closure::bind(function () use ($loader) {
|
196 |
-
$loader->prefixLengthsPsr4 =
|
197 |
-
$loader->prefixDirsPsr4 =
|
198 |
-
$loader->classMap =
|
199 |
|
200 |
}, null, ClassLoader::class);
|
201 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit024f0a84246706a5ce089d47fa9fe20c
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'W' =>
|
39 |
'WebpConverter\\Action\\ConvertDir' => __DIR__ . '/../..' . '/src/Action/ConvertDir.php',
|
40 |
'WebpConverter\\Action\\ConvertPaths' => __DIR__ . '/../..' . '/src/Action/ConvertPaths.php',
|
41 |
'WebpConverter\\Action\\DeletePaths' => __DIR__ . '/../..' . '/src/Action/DeletePaths.php',
|
42 |
+
'WebpConverter\\Conversion\\Cron\\CronEventGenerator' => __DIR__ . '/../..' . '/src/Conversion/Cron/CronEventGenerator.php',
|
43 |
+
'WebpConverter\\Conversion\\Cron\\CronInitiator' => __DIR__ . '/../..' . '/src/Conversion/Cron/CronInitiator.php',
|
44 |
+
'WebpConverter\\Conversion\\Cron\\CronSchedulesGenerator' => __DIR__ . '/../..' . '/src/Conversion/Cron/CronSchedulesGenerator.php',
|
45 |
+
'WebpConverter\\Conversion\\Cron\\CronStatusManager' => __DIR__ . '/../..' . '/src/Conversion/Cron/CronStatusManager.php',
|
46 |
+
'WebpConverter\\Conversion\\Cron\\CronStatusViewer' => __DIR__ . '/../..' . '/src/Conversion/Cron/CronStatusViewer.php',
|
47 |
'WebpConverter\\Conversion\\DirectoryFiles' => __DIR__ . '/../..' . '/src/Conversion/DirectoryFiles.php',
|
48 |
'WebpConverter\\Conversion\\Directory\\DirectoryAbstract' => __DIR__ . '/../..' . '/src/Conversion/Directory/DirectoryAbstract.php',
|
49 |
'WebpConverter\\Conversion\\Directory\\DirectoryFactory' => __DIR__ . '/../..' . '/src/Conversion/Directory/DirectoryFactory.php',
|
55 |
'WebpConverter\\Conversion\\Directory\\ThemesDirectory' => __DIR__ . '/../..' . '/src/Conversion/Directory/ThemesDirectory.php',
|
56 |
'WebpConverter\\Conversion\\Directory\\UploadsDirectory' => __DIR__ . '/../..' . '/src/Conversion/Directory/UploadsDirectory.php',
|
57 |
'WebpConverter\\Conversion\\Directory\\UploadsWebpcDirectory' => __DIR__ . '/../..' . '/src/Conversion/Directory/UploadsWebpcDirectory.php',
|
58 |
+
'WebpConverter\\Conversion\\Endpoint\\CronConversionEndpoint' => __DIR__ . '/../..' . '/src/Conversion/Endpoint/CronConversionEndpoint.php',
|
59 |
'WebpConverter\\Conversion\\Endpoint\\EndpointAbstract' => __DIR__ . '/../..' . '/src/Conversion/Endpoint/EndpointAbstract.php',
|
60 |
'WebpConverter\\Conversion\\Endpoint\\EndpointIntegration' => __DIR__ . '/../..' . '/src/Conversion/Endpoint/EndpointIntegration.php',
|
61 |
'WebpConverter\\Conversion\\Endpoint\\EndpointInterface' => __DIR__ . '/../..' . '/src/Conversion/Endpoint/EndpointInterface.php',
|
196 |
public static function getInitializer(ClassLoader $loader)
|
197 |
{
|
198 |
return \Closure::bind(function () use ($loader) {
|
199 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit024f0a84246706a5ce089d47fa9fe20c::$prefixLengthsPsr4;
|
200 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit024f0a84246706a5ce089d47fa9fe20c::$prefixDirsPsr4;
|
201 |
+
$loader->classMap = ComposerStaticInit024f0a84246706a5ce089d47fa9fe20c::$classMap;
|
202 |
|
203 |
}, null, ClassLoader::class);
|
204 |
}
|
vendor/composer/installed.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
'type' => 'library',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
-
'reference' => '
|
9 |
'name' => 'gbiorczyk/webp-converter-for-media',
|
10 |
'dev' => false,
|
11 |
),
|
@@ -16,7 +16,7 @@
|
|
16 |
'type' => 'library',
|
17 |
'install_path' => __DIR__ . '/../../',
|
18 |
'aliases' => array(),
|
19 |
-
'reference' => '
|
20 |
'dev_requirement' => false,
|
21 |
),
|
22 |
'matt-plugins/deactivation-modal' => array(
|
5 |
'type' => 'library',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
+
'reference' => 'a64e4ce6e4d0a5a032d3186e2e76634824e61474',
|
9 |
'name' => 'gbiorczyk/webp-converter-for-media',
|
10 |
'dev' => false,
|
11 |
),
|
16 |
'type' => 'library',
|
17 |
'install_path' => __DIR__ . '/../../',
|
18 |
'aliases' => array(),
|
19 |
+
'reference' => 'a64e4ce6e4d0a5a032d3186e2e76634824e61474',
|
20 |
'dev_requirement' => false,
|
21 |
),
|
22 |
'matt-plugins/deactivation-modal' => array(
|
webp-converter-for-media.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/**
|
4 |
* Plugin Name: WebP Converter for Media
|
5 |
* Description: Speed up your website by serving WebP and AVIF images instead of standard formats JPEG, PNG and GIF. Reduce image sizes just now!
|
6 |
-
* Version: 4.
|
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 |
);
|
3 |
/**
|
4 |
* Plugin Name: WebP Converter for Media
|
5 |
* Description: Speed up your website by serving WebP and AVIF images instead of standard formats JPEG, PNG and GIF. Reduce image sizes just now!
|
6 |
+
* Version: 4.2.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.2.0' )
|
17 |
);
|