diff --git a/.gitattributes b/.gitattributes index 2b89fdbd1..c2e8e3835 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,6 +2,7 @@ /.git export-ignore /.github export-ignore /.wordpress-org export-ignore +/_dev export-ignore /bin export-ignore /Tests export-ignore diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 179f168b7..d9f3b4785 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: fail-fast: false matrix: operating-system: [ubuntu-latest] - php-versions: ['7.3', '7.4'] + php-versions: ['7.4'] wp-versions: ['latest'] name: WP ${{ matrix.wp-versions }} with PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}. diff --git a/.github/workflows/test_plugin_legacy.yml b/.github/workflows/test_plugin_legacy.yml index 8d19e25b0..a7ac21013 100644 --- a/.github/workflows/test_plugin_legacy.yml +++ b/.github/workflows/test_plugin_legacy.yml @@ -15,7 +15,7 @@ jobs: fail-fast: false matrix: operating-system: [ubuntu-latest] - php-versions: ['7.1', '7.2'] + php-versions: ['7.3'] wp-versions: ['5.3'] name: WP ${{ matrix.wp-versions }} with PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}. diff --git a/assets/css/admin.css b/assets/css/admin.css index f9ec99fdd..de9129f86 100755 --- a/assets/css/admin.css +++ b/assets/css/admin.css @@ -1445,11 +1445,6 @@ ul.imagify-datas-details.imagify-datas-details { } /* Attachments specifics */ -.wp_attachment_image #imagify-visual-comparison .close-btn, -.imagify-visual-comparison .close-btn { - top: 0; -} - .wp_attachment_image #imagify-visual-comparison .imagify-modal-content, .imagify-visual-comparison .imagify-modal-content { padding-top: 40px; @@ -1585,3 +1580,11 @@ ul.imagify-datas-details.imagify-datas-details { .imagify-upsell .imagify-meteo-icon { filter: invert(100%) sepia(100%) saturate(0%) hue-rotate(104deg) brightness(103%) contrast(103%); } + +.imagify-original-fize-size { + display: block !important; +} + +.imagify-original-fize-size .value { + padding-left: 15px !important; +} diff --git a/assets/css/admin.min.css b/assets/css/admin.min.css index c185823c5..e7e7821e0 100755 --- a/assets/css/admin.min.css +++ b/assets/css/admin.min.css @@ -1 +1 @@ -.imagify-flex{display:-webkit-box;display:-ms-flexbox;display:flex}.imagify-vcenter{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.imagify-noshrink{-ms-flex-negative:0;flex-shrink:0}.imagify-nogrow{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0}.imagify-wauto{width:auto}.imagify-hauto{height:auto}.imagify-full-width{width:100%}.imagify-start{float:left}.imagify-end{float:right}.imagify-txt-start.imagify-txt-start.imagify-txt-start{text-align:left}.imagify-txt-center.imagify-txt-center.imagify-txt-center{text-align:center}.imagify-txt-end.imagify-txt-end.imagify-txt-end{text-align:right}.imagify-mt0.imagify-mt0{margin-top:0}.imagify-mt1.imagify-mt1{margin-top:1em}.imagify-mt2.imagify-mt2{margin-top:2em}.imagify-mt3.imagify-mt3{margin-top:3em}.imagify-mb0.imagify-mb0{margin-bottom:0}.imagify-mb1.imagify-mb1{margin-bottom:1em}.imagify-mr1.imagify-mr1{margin-right:1em}.imagify-ml2.imagify-ml2{margin-left:2em}.imagify-mr2.imagify-mr2{margin-right:2em}.imagify-pl0.imagify-pl0.imagify-pl0{padding-left:0}.imagify-pb0.imagify-pb0{padding-bottom:0}.imagify-pr1.imagify-pr1{padding-right:1em}.imagify-pr2.imagify-pr2{padding-right:2em}.imagify-oh{overflow:hidden}.imagify-clear{clear:both}.imagify-clearfix:after,.imagify-inline-options:after,.imagify-settings-main-content:after,.imagify-settings-section:after{content:"";display:table;width:100%;clear:both}.imagify-setting-optim-level .imagify-inline-options:after{display:none}.imagify-divider{height:1px;margin:20px 0;background:#d2d3d6}.imagify-pipe{display:inline-block;margin:0 .75em;vertical-align:middle;height:15px;width:1px;background:#979797}.imagify-h3-like.imagify-h3-like.imagify-h3-like{margin-bottom:0;font-size:19px;font-weight:500;color:#1f2332}.imagify-h4-like.imagify-h4-like.imagify-h4-like{font-size:14px;font-weight:700;color:#2e3243}.imagify-count.imagify-count{counter-reset:num}.imagify-count .imagify-count-title{font-weight:700}.imagify-default-settings{color:#73818c;font-weight:400}.imagify-count .imagify-count-title:before{counter-increment:num 1;content:counter(num) ". "}.imagify-count-list{counter-reset:listcount}.imagify-count-list li{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.imagify-count-list li+li{margin-top:.5em}.imagify-count-list li:before{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-preferred-size:24px;flex-basis:24px;-ms-flex-negative:0;flex-shrink:0;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-right:16px;border:2px solid #40b1d0;width:24px;height:24px;counter-increment:listcount 1;content:counter(listcount);color:#40b1d0;border-radius:50%}.imagify-table{display:table;width:100%}.imagify-cell{display:table-cell;padding:10px;vertical-align:top}.imagify-cell.va-top,.va-top .imagify-cell{vertical-align:top}.imagify-bulk-submit .imagify-cell{padding-top:0}body.imagify-modal-is-open{overflow:hidden}.imagify-spinner{display:inline-block;width:20px;height:20px;margin-right:5px;vertical-align:middle;background:rgba(0,0,0,0) url("../images/spinner.gif") no-repeat scroll 0 0/20px 20px;opacity:.7}.spinner.imagify-hidden{width:0;margin:4px 0 0 0}.imagify-primary.imagify-primary.imagify-primary{color:#40b1d0}.imagify-secondary.imagify-secondary.imagify-secondary,.imagify-valid{color:#8bc34a}.misc-pub-section.misc-pub-imagify h4{font-size:14px;margin-top:5px;margin-bottom:0}.imagify-chart{position:relative;top:1px;display:inline-block;vertical-align:middle}.imagify-chart-container{position:relative;display:inline-block;margin-right:5px}.imagify-chart-container canvas{display:block}.imagify-settings .button,.imagify-settings a,.imagify-settings input,.imagify-welcome .button,.imagify-welcome a,.imagify-weolcome input{-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.imagify-settings a{color:#40b1d0}.imagify-settings,.imagify-settings p,.imagify-settings th{color:#5f758e}.imagify-button-primary.imagify-button-primary,.imagify-button-secondary.imagify-button-secondary,.imagify-button.imagify-button,.imagify-main-content .button,.imagify-notice .button,.imagify-settings-section .button,.imagify-welcome .button{height:auto;padding:11px 22px;border:0 none;font-size:14px;font-weight:600;text-transform:uppercase;letter-spacing:.01em;word-spacing:0.01em;-webkit-box-shadow:0 3px 0 rgba(0,0,0,.15);box-shadow:0 3px 0 rgba(0,0,0,.15);border-radius:3px;cursor:pointer;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.button-primary.button-mini{padding:2px 10px}.imagify-settings .button.button-mini-flat{padding:3px 6px 5px;font-size:12px;-webkit-box-shadow:none!important;box-shadow:none!important;line-height:1.2}.imagify-settings .button.button-mini-flat:focus,.imagify-settings .button.button-mini-flat:hover{-webkit-box-shadow:none!important;box-shadow:none!important}.imagify-button-ghost.imagify-button-ghost,.imagify-title .button-ghost.button-ghost{padding:2px 9px;border:1px solid #40b1d0;font-size:12px;font-weight:400;color:#40b1d0;background:0 0;-webkit-box-shadow:none;box-shadow:none}.imagify-button-ghost.imagify-button-ghost:focus,.imagify-button-ghost.imagify-button-ghost:hover,.imagify-title .button-ghost.button-ghost:focus,.imagify-title .button-ghost.button-ghost:hover{border-color:transparent;color:#000;background:#40b1d0}.imagify-button-ghost.imagify-button-ghost:focus,.imagify-button-ghost.imagify-button-ghost:hover{color:#fff}.imagify-button-medium.imagify-button-medium{text-transform:uppercase;letter-spacing:.1em;padding:3px 10px;font-weight:700}.imagify-button-medium.imagify-button-ghost{border-width:2px}[class*=imagify-] .button .dashicons{margin-right:5px;vertical-align:middle}.imagify-button-primary.imagify-button-primary,.imagify-settings .button-primary.button-primary,.imagify-welcome .button-primary.button-primary{background:#40b1d0;color:#fff;-webkit-box-shadow:0 3px 0 #338ea6;box-shadow:0 3px 0 #338ea6;text-shadow:0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799!important}.imagify-button-secondary.imagify-button-secondary{background:#8bc34a;color:#fff;-webkit-box-shadow:0 3px 0 #6f9c3b;box-shadow:0 3px 0 #6f9c3b;text-shadow:0 -1px 1px #6f9c3b,1px 0 1px #6f9c3b,0 1px 1px #6f9c3b!important}.imagify-button-primary.imagify-button-primary:focus,.imagify-button-primary.imagify-button-primary:hover,.imagify-settings .button-primary:focus,.imagify-settings .button-primary:hover,.imagify-welcome .button-primary:focus,.imagify-welcome .button-primary:hover{background:#338ea6;-webkit-box-shadow:0 3px 0 #1f7a92;box-shadow:0 3px 0 #1f7a92}.imagify-button-secondary.imagify-button-secondary:focus,.imagify-button-secondary.imagify-button-secondary:hover{background:#6f9c3b;color:#fff}.imagify-button-light.imagify-button-light{background:#fff;color:#4a4a4a;-webkit-box-shadow:0 2px 0 rgba(0,0,0,.2);box-shadow:0 2px 0 rgba(0,0,0,.2)}.imagify-block-secondary .imagify-button-light.imagify-button-light{color:#6f9c3b}.imagify-button-light.imagify-button-light:focus,.imagify-button-light.imagify-button-light:hover{color:#fff;background:rgba(0,0,0,.2)}.button.imagify-button-clean,.imagify-button-clean{padding:0;background:0 0;-webkit-box-shadow:none;box-shadow:none}.imagify-button-clean .dashicons-plus{width:32px;height:25px}.imagify-button-clean .dashicons-plus:before{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:25px;height:22px;margin-left:2px;padding-top:3px;font-size:17px;background:#40b1d0;color:#fff;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.button.imagify-button-clean:active,.button.imagify-button-clean:focus,.button.imagify-button-clean:hover,.button.imagify-button-clean[disabled]{background:0 0!important;color:#343a49;-webkit-box-shadow:none;box-shadow:none}.button.imagify-button-clean:focus .dashicons-plus:before,.button.imagify-button-clean:hover .dashicons-plus:before{background:#343a49}button.imagify-link-like{border:0;padding:0;color:inherit;text-decoration:underline;font-size:13px;-webkit-box-shadow:none;box-shadow:none;background:0 0;cursor:pointer}.imagify-section-positive .imagify-button-light{color:#709a41}.imagify-button.imagify-button-big{font-size:15px;padding:11px 30px}.imagify-button-big .dashicons{font-size:1.45em;margin-right:6px;margin-left:-4px}.imagify-button-primary.imagify-button-primary .dashicons,.imagify-button-secondary.imagify-button-secondary .dashicons,.imagify-button.imagify-button .dashicons,.imagify-notice .button .dashicons,.imagify-settings .button .dashicons,.imagify-welcome .button .dashicons{vertical-align:middle}[class*=imagify-] .button-text{display:inline-block;vertical-align:middle}.media-frame-content .imagify-button-primary,.wp_attachment_image .imagify-button-primary{padding:0 10px 1px;margin:0 5px 2px 0;font-size:13px;line-height:26px;-webkit-box-shadow:0 3px 0 #338ea6;box-shadow:0 3px 0 #338ea6}.wp_attachment_image .imagify-button-primary{float:left}.imagify-title.imagify-title{position:relative;padding:10px 30px;font-size:23px;background:#1f2332;color:#fff}.imagify-welcome .imagify-logo{opacity:1}.imagify-welcome .imagify-title{display:-webkit-box;display:-ms-flexbox;display:flex;padding:20px 30px}.imagify-settings .imagify-title{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.imagify-settings .imagify-logo-block{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-negative:0;flex-shrink:0;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;padding:0;margin-right:35px;color:inherit}.imagify-logo-block sup{color:#1f2332}.imagify-settings .imagify-title+.imagify-notice{margin:0;border-right:1px solid #d9d9d9;padding-top:15px;padding-bottom:15px}.imagify-title .title-text{font-size:28px;font-weight:700;color:#fff}.imagify-lb-icon{padding-right:18px}.imagify-lb-text img{margin-bottom:.15em}.imagify-lb-text{font-size:23px;font-weight:700;color:#fff}.imagify-logo{display:block;vertical-align:top;opacity:.4}.imagify-section,.imagify-settings div.submit,.imagify-sub-header,.imagify-sub-title.imagify-sub-title{margin:0;padding:20px;background:#f2f5f7}.imagify-section-positive,.imagify-sub-title.imagify-sub-title{padding-left:40px}.imagify-section-positive{background:#8cc152;color:#fff}.imagify-section-positive p{color:#fff}.imagify-section-gray{background:#d9e4eb}.imagify-section-gray .imagify-count-title{color:#4a4a4a}.imagify-section p:first-child{margin-top:0}.imagify-section p:last-child{margin-bottom:0}.imagify-settings .imagify-documentation-link-box{display:-webkit-box;display:-ms-flexbox;display:flex;padding:12px 13px 14px;border:1px solid #40b1d0;color:#e5ebef;border-radius:3px}.imagify-documentation-link-icon{width:23px;height:31px;font-size:2.6em;margin-right:15px;line-height:1.3}.imagify-documentation-link-box span{font-size:12px}.imagify-documentation-link-box a{font-weight:700}@media (max-width:1120px){.imagify-settings .imagify-title{-ms-flex-wrap:wrap;flex-wrap:wrap}}.imagify-settings-section{padding:10px 20px}.imagify-account-info-col .imagify-settings-section{padding-right:0}.imagify-settings-main-content,.imagify-welcome .imagify-settings-section{border:1px solid #d9d9d9;border-top-width:0;background:#fff}.imagify-settings-main-content{padding-bottom:20px}.imagify-settings-main-content .imagify-setting-line,.imagify-settings-main-content p{font-size:14px;line-height:1.5}.imagify-settings-main-content .code{max-height:10em;padding:3px 5px 2px 5px;overflow:auto;background:#eaeaea;background:rgba(0,0,0,.07)}.imagify-settings-main-content+.imagify-settings-main-content{margin-top:20px;border-top-width:1px}.imagify-br{line-height:2}p.imagify-section-title.imagify-section-title{font-size:20px;margin-top:-.3em;margin-bottom:-.6em}.imagify-rate-us.imagify-rate-us{text-align:right;margin:-1em -2.4em -1em 0;color:#fff}.imagify-rate-us a{color:#40b1d0}.imagify-rate-us .stars{display:inline-block;margin:2px 0 0 10px;text-decoration:none;letter-spacing:.2em;vertical-align:-1px}.imagify-rate-us .stars .dashicons:before{font-size:18px}.imagify-rate-us a:focus,.imagify-rate-us a:hover{color:#fee102}@media (max-width:1220px){.imagify-rate-us.imagify-rate-us{position:static;margin-bottom:0;text-align:left}.imagify-rate-us.imagify-rate-us br{display:none}.imagify-rate-us .stars{display:block;margin-left:0}}.imagify-important{color:#f5a623}.imagify-settings .imagify-success,.imagify-success{color:#8bc34a}.imagify-info,.imagify-info a{color:#7a8996;font-size:12px}.imagify-info{position:relative;display:inline-block;padding-left:25px}.imagify-info .dashicons{position:absolute;left:0;top:0;color:#40b1d0}.imagify-checkbox.imagify-checkbox:checked,.imagify-checkbox.imagify-checkbox:not(:checked),.imagify-settings.imagify-settings [type=checkbox]:checked,.imagify-settings.imagify-settings [type=checkbox]:not(:checked){position:absolute;opacity:.01}.imagify-checkbox.imagify-checkbox:checked:focus,.imagify-checkbox.imagify-checkbox:not(:checked):focus,.imagify-settings.imagify-settings [type=checkbox]:checked:focus,.imagify-settings.imagify-settings [type=checkbox]:not(:checked):focus{-webkit-box-shadow:none!important;box-shadow:none!important;outline:0!important;border:0 none!important}.imagify-checkbox.imagify-checkbox:checked+label,.imagify-checkbox.imagify-checkbox:not(:checked)+label,.imagify-settings [type=checkbox]:checked+label,.imagify-settings [type=checkbox]:not(:checked)+label{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;min-height:24px;padding-left:40px;cursor:pointer;font-size:14px;font-weight:700;color:#2e3243}.imagify-checkbox.imagify-checkbox:checked+label:before,.imagify-checkbox.imagify-checkbox:not(:checked)+label:before,.imagify-settings [type=checkbox]:checked+label:before,.imagify-settings [type=checkbox]:not(:checked)+label:before{content:'';position:absolute;left:0;top:0;width:22px;height:22px;border:2px solid #8ba6b4;background:#fff;border-radius:3px}.imagify-checkbox.imagify-checkbox:checked+label:after,.imagify-checkbox.imagify-checkbox:not(:checked)+label:after,.imagify-settings [type=checkbox]:checked+label:after,.imagify-settings [type=checkbox]:not(:checked)+label:after{content:"✓";position:absolute;font-size:1.4em;top:-2px;left:4.5px;color:#8ba6b4;font-weight:400;-webkit-transition:all .2s;-o-transition:all .2s;transition:all .2s}.imagify-checkbox.imagify-checkbox[disabled]:checked+label:before,.imagify-checkbox.imagify-checkbox[disabled]:not(:checked)+label:before,.imagify-settings [type=checkbox][disabled]:checked+label:before,.imagify-settings [type=checkbox][disabled]:not(:checked)+label:before{border-color:#ccc;background:#ddd}.imagify-checkbox.imagify-checkbox:not(:checked)+label:after,.imagify-settings [type=checkbox]:not(:checked)+label:after{opacity:0;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0)}.imagify-checkbox.imagify-checkbox:checked+label:after,.imagify-settings [type=checkbox]:checked+label:after{opacity:1;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.medium.imagify-checkbox:checked+label:before,.medium.imagify-checkbox:not(:checked)+label:before{width:22px;height:22px;border-width:1.5px;border-radius:2px;margin-top:0}.medium.imagify-checkbox:checked+label:after,.medium.imagify-checkbox:not(:checked)+label:after{font-size:1.1em;left:-17px;top:3px}.imagify-settings .mini[type=checkbox]:checked+label:before,.imagify-settings .mini[type=checkbox]:not(:checked)+label:before,.mini.imagify-checkbox:checked+label:before,.mini.imagify-checkbox:not(:checked)+label:before{width:15px;height:15px;border-width:1px;border-radius:2px;margin-top:0}.imagify-settings .mini[type=checkbox]:checked+label:after,.imagify-settings .mini[type=checkbox]:not(:checked)+label:after,.mini.imagify-checkbox:checked+label:after,.mini.imagify-checkbox:not(:checked)+label:after{font-size:.9em;left:-21px;top:-.5px}.imagify-checkbox.imagify-checkbox:checked:focus+label:before,.imagify-checkbox.imagify-checkbox:not(:checked):focus+label:before,.imagify-settings [type=checkbox]:checked:focus+label:before,.imagify-settings [type=checkbox]:not(:checked):focus+label:before{border-style:dotted;border-color:#40b1d0}.imagify-check-group{padding-left:2px;margin-bottom:0}.imagify-check-group.imagify-is-scrollable{height:15em;overflow-y:auto;padding:8px;margin:1.5em 0 0 -8px;background:#f4f7f9;border:1px solid #d2d3d6;border-radius:3px}.imagify-is-scrollable legend+p{margin-top:0}.imagify-is-scrollable [type=checkbox]:checked+label:before,.imagify-is-scrollable [type=checkbox]:not(:checked)+label:before{background:#f4f7f9}.imagify-settings .imagify-check-group.imagify-check-group label{color:#338ea6;font-weight:500}.imagify-inline-options{position:relative;display:table;width:100%;max-width:600px;border-collapse:collapse}.imagify-inline-options input[type=radio]:checked,.imagify-inline-options input[type=radio]:not(:checked){position:absolute;left:5px;top:5px;display:none}.imagify-inline-options input[type=radio]:checked+label,.imagify-inline-options input[type=radio]:not(:checked)+label{position:relative;display:table-cell;padding:13px 10px;text-align:center;font-weight:600;font-size:16px;text-transform:uppercase;letter-spacing:.1em;color:#fff;background:#2e3243;-webkit-box-shadow:0 -3px 0 rgba(0,0,0,.1) inset;box-shadow:0 -3px 0 rgba(0,0,0,.1) inset;z-index:2;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.imagify-inline-options input[type=radio]:checked+label:first-of-type,.imagify-inline-options input[type=radio]:not(:checked)+label:first-of-type{border-radius:3px 0 0 3px}.imagify-inline-options input[type=radio]:checked+label:last-of-type,.imagify-inline-options input[type=radio]:not(:checked)+label:last-of-type{border-radius:0 3px 3px 0}.imagify-inline-options input[type=radio]:checked+label{background:#8bc34a}.imagify-inline-options .imagify-info{margin-top:15px}.imagify-account-info-col,.imagify-col.imagify-col.imagify-account-info-col{width:380px;max-width:100%;padding:0 20px 0 0}.imagify-col.imagify-col.imagify-shared-with-account-col,.imagify-shared-with-account-col{width:calc(100% - 380px);padding:0}.imagify-account-info-col .imagify-options-title{padding:24px 26px;color:#fff;background:#1f2332}.imagify-block-secondary{padding:26px 26px 35px;border:1px solid #75a345;background:#8bc34a;border-radius:3px;color:#fff}.imagify-account-info-col .imagify-block-secondary.imagify-block-secondary h3,.imagify-block-secondary.imagify-block-secondary p{color:inherit}.imagify-account-info-col .imagify-col-content h3:first-child{margin-top:0}.imagify-account-info-col .imagify-col-content h3{font-size:19px}.imagify-account-info-col .imagify-col-content p{margin:1.5em 0}.imagify-account-info-col .imagify-col-content p:first-child{margin-top:0}.imagify-user-plan-label{float:right;margin-top:-4px;padding:2px 10px;border:2px solid #40b1d0;font-size:14px;text-transform:uppercase;letter-spacing:.02em;color:#40b1d0;border-radius:3px}.imagify-user-plan-label:empty{display:none}.imagify-columns{overflow:hidden;padding:15px 0;counter-reset:cols}.imagify-columns [class^=col-]{float:left;-webkit-box-sizing:border-box;box-sizing:border-box}.imagify-columns .col-1-3{width:33.333%;padding-left:28px}.imagify-columns .col-2-3{width:66.666%;padding-left:28px}.imagify-columns .col-1-2{width:50%;padding:0 20px}@media (max-width:830px){.imagify-columns [class^=col-]{float:none;margin-bottom:1.5em}.imagify-columns .col-1-2,.imagify-columns .col-1-3{width:auto;padding:0 28px;clear:both;padding-top:1em}}.column-imagify_optimized_file.column-imagify_optimized_file{width:300px;text-align:center;vertical-align:middle}.column-imagify_optimized_file>*{max-width:21em;margin:0 auto}@media (min-width:1151px) and (max-width:1800px){.column-imagify_optimized_file.column-imagify_optimized_file{width:21em}}@media (min-width:783px) and (max-width:1150px){.column-imagify_optimized_file.column-imagify_optimized_file{width:13em}table.media .column-title .has-media-icon~.row-actions.row-actions{margin-left:0}}@media (max-width:782px){table.media .column-imagify_optimized_file.column-imagify_optimized_file{text-align:left}table.media .imagify-datas-actions-links,table.media .imagify-datas-more-action{text-align:center}table.media .column-imagify_optimized_file .imagify-datas-actions-links a,table.media .column-imagify_optimized_file>*{max-width:100%;margin-left:0}}@media (min-width:783px) and (max-width:1150px),(max-width:360px){table.media .imagify-hide-if-small{position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0;word-wrap:normal!important}}.compat-field-imagify .label{vertical-align:top}.compat-field-imagify ul.imagify-datas-list{margin-top:7px;font-size:11px}ul.imagify-datas-list.imagify-datas-list{margin:0 auto;color:#555}ul.imagify-datas-list .big{font-size:12px;color:#40b1d0}.imagify-data-item{overflow:hidden}li.imagify-data-item{clear:both;margin-bottom:2px}ul.imagify-datas-list .imagify-data-item span.data,ul.imagify-datas-list .imagify-data-item strong{float:left;width:38%;-webkit-box-sizing:border-box;box-sizing:border-box}ul.imagify-datas-list .imagify-data-item span.data{width:62%;padding-right:5px;text-align:left}.compat-field-imagify .imagify-datas-list .imagify-data-item .data{width:130px;text-align:left;font-weight:700}ul.imagify-datas-list .imagify-data-item strong{text-align:left;padding-left:5px}.media-sidebar .imagify-datas-list .imagify-data-item .data{width:auto;float:none}.media-sidebar .imagify-datas-list .imagify-data-item strong{display:inline-block;width:auto;float:none}.media-sidebar .imagify-datas-list .imagify-data-item .imagify-chart{float:left}.imagify-datas-more-action.imagify-datas-more-action{margin:.4em auto;background:-webkit-gradient(linear,left top,left bottom,from(transparent),color-stop(49%,transparent),color-stop(50%,rgba(0,0,0,.075)),color-stop(58%,rgba(0,0,0,.075)),color-stop(58%,transparent),to(transparent));background:-o-linear-gradient(top,transparent,transparent 49%,rgba(0,0,0,.075) 50%,rgba(0,0,0,.075) 58%,transparent 58%,transparent);background:linear-gradient(to bottom,transparent,transparent 49%,rgba(0,0,0,.075) 50%,rgba(0,0,0,.075) 58%,transparent 58%,transparent)}.imagify-datas-more-action a{display:inline-block;padding:0 5px;background:#40b1d0;color:#fff;text-transform:uppercase;font-size:9px;font-weight:700;line-height:1.9;text-decoration:none}.imagify-datas-more-action a.is-open{background:#555}.imagify-datas-more-action a.is-open .dashicons{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.imagify-datas-more-action a .dashicons{font-size:14px;vertical-align:middle;line-height:.8}.imagify-datas-more-action a .dashicons:before{vertical-align:middle;line-height:20px}.imagify-datas-more-action .the-text{display:inline-block;vertical-align:middle;height:auto;line-height:inherit}ul.imagify-datas-details.imagify-datas-details{margin:.7em auto}.imagify-datas-details strong{color:#40b1d0}.imagify-datas-details .original{color:#555}.imagify-datas-actions-links{overflow:hidden;border-top:2px solid transparent;padding-top:5px;font-size:11px}.nggform .imagify-datas-actions-links{position:relative;z-index:2}.nggform .row-actions{z-index:1}.imagify-datas-actions-links a{position:relative;display:inline-block;padding-left:17px;text-decoration:none;font-weight:600}.compat-field-imagify .imagify-datas-actions-links{max-width:300px}.misc-pub-imagify .imagify-datas-actions-links{border-top:2px solid #f2f2f2;padding-bottom:5px}.column-imagify_optimized_file .imagify-datas-actions-links a{margin:0 .7em;padding-left:15px}.compat-field-imagify .imagify-datas-actions-links a,.misc-pub-imagify .imagify-datas-actions-links a{float:left;width:50%}.media-sidebar .compat-field-imagify .imagify-datas-actions-links a,.submitbox .misc-pub-imagify .imagify-datas-actions-links a{display:block;width:auto;float:none}.media-sidebar .compat-field-imagify .imagify-datas-actions-links br,.submitbox .misc-pub-imagify .imagify-datas-actions-links br{display:none}.imagify-datas-actions-links a:only-child{float:none;width:auto}.imagify-datas-details.is-open+.imagify-datas-actions-links{border-top-color:rgba(0,0,0,.075)}.imagify-datas-actions-links .dashicons{position:absolute;left:0;top:4px;width:12px;margin-right:2px;font-size:11px}.imagify-account,.imagify-account-link{padding-right:15px}.imagify-meteo-icon{display:inline-block;height:38px;vertical-align:middle;margin-right:10px}.imagify-user-plan{color:#40b1d0}.imagify-meteo-title.imagify-meteo-title{color:#fff;font-size:17px}.imagify-space-left>p{color:#fff}[class^=imagify-bar-]{position:relative;height:8px;width:100%;background:#60758d;color:#fff;font-size:10px}.imagify-progress{height:8px}.imagify-progress{-webkit-transition:width .3s;-o-transition:width .3s;transition:width .3s}.imagify-bar-positive .imagify-progress{background:#8cc152}.imagify-bar-positive .imagify-barnb{color:#8cc152}.imagify-bar-primary .imagify-progress{background:#40b1d0}.imagify-bar-primary .imagify-barnb{color:#40b1d0}.imagify-bar-negative .imagify-progress{background:#d2d3d6}.imagify-bar-negative .imagify-barnb{color:#7a8996}.imagify-bar-neutral .imagify-progress{background:#f5a623}.imagify-space-left .imagify-bar-negative .imagify-progress{background:#c51162}.imagify-btn-ghost{display:inline-block;height:auto;padding:7px 10px;border:1px solid #fff;text-align:center;background:0 0;color:#fff;border-radius:3px;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.imagify-btn-ghost:focus,.imagify-btn-ghost:hover{background:#fff;color:#888}.imagify-error{background:#d0021b;color:#fff}.imagify-settings-section .imagify-error{display:inline-block;padding:7px 10px;margin:10px 0 0 45px;border-radius:3px}.imagify-settings-section .imagify-error code{font-weight:400}.imagify-settings-section .imagify-error.hidden{display:none}.imagify-warning{background:#f5a623;color:#fff;text-shadow:0 0 2px rgba(0,0,0,.2)}.imagify-modal{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.js .imagify-modal{display:none;position:fixed;top:0;right:0;bottom:0;left:0;background-color:#1f2332;background-color:rgba(31,35,50,.95);z-index:99999}.imagify-modal-content{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:800px;max-width:95%;max-height:90vw;overflow:auto;padding:20px 25px;margin:1em auto;background:#fff;-webkit-box-shadow:1px 1px 4px rgba(0,0,0,.7);box-shadow:1px 1px 4px rgba(0,0,0,.7);border-radius:3px}.imagify-modal-loading .imagify-modal-content{overflow:hidden}#imagify-visual-comparison .imagify-modal-content,.imagify-visual-comparison .imagify-modal-content{max-width:1400px;background:0 0;padding:5px;-webkit-box-shadow:none;box-shadow:none;border-radius:0}.imagify-modal .h2{margin:.5em 0;color:#8ba6b4;font-weight:400;font-size:24px;letter-spacing:.075em;text-align:center}.imagify-modal .h3{color:#40b1d0;font-weight:400;font-size:18px;letter-spacing:.075em;text-align:center}.imagify-modal .close-btn{display:none;visibility:hidden;position:absolute;right:20px;top:20px;font-size:1.2em;border:0;background:transparent none;border-radius:0;cursor:pointer}.imagify-modal .close-btn i{margin-left:-2px}.imagify-modal .close-btn:focus,.imagify-modal .close-btn:hover{color:#40b1d0}.js .imagify-modal .close-btn{display:block;visibility:visible;z-index:12}.imagify-visual-comparison .close-btn,.wp_attachment_image #imagify-visual-comparison .close-btn{top:0}.imagify-visual-comparison .imagify-modal-content,.wp_attachment_image #imagify-visual-comparison .imagify-modal-content{padding-top:40px}.imagify-col{float:left;width:50%;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-preferred-size:50%;flex-basis:50%}.imagify-col{padding-right:20px}.imagify-col+.imagify-col{padding-right:0;padding-left:20px}.imagify-col:target{-webkit-animation:hello 1s 3 linear backwards;animation:hello 1s 3 linear backwards}@-webkit-keyframes hello{0%,100%{background:#fff}50%{background:#f4f7f9}}@keyframes hello{0%,100%{background:#fff}50%{background:#f4f7f9}}@media (max-width:730px){.imagify-settings .imagify-documentation-link-box{margin-top:2em}}@media (max-width:782px){input[type=checkbox],input[type=radio]{height:1.5625rem;width:1.5625rem;margin:1px}[class*=imagify-] .button-text{font-size:13px}.imagify-account-info-col .imagify-settings-section{padding:0 10px}.imagify-settings-section{padding:10px}.imagify-check-group.imagify-is-scrollable{margin:auto}.imagify-col.imagify-col.imagify-shared-with-account-col,.imagify-custom-folders-section .imagify-col,.imagify-media-lib-section .imagify-col,.imagify-settings-section .imagify-col,.imagify-shared-with-account-col{width:100%;float:none;padding-right:0}.imagify-account-info-col,.imagify-col.imagify-col.imagify-account-info-col,.imagify-custom-folders-section .imagify-account-info-col,.imagify-media-lib-section .imagify-account-info-col{width:100%;float:none;padding-left:0;padding-right:0}.imagify-lb-text{font-size:20px}.imagify-vcenter{-ms-flex-direction:column;flex-direction:column;-webkit-box-direction:normal;-webkit-box-orient:vertical;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.imagify-pr2.imagify-pr2{padding-right:0}}.imagify-upsell{position:relative;background:#c51161;padding:20px 40px}.imagify-upsell p{color:#fff!important}.imagify-upsell-button{display:block;background:#fff;border-radius:5px;color:#c51161!important;font-weight:700;padding:10px;text-align:center;text-decoration:none;text-transform:uppercase}.imagify-upsell-arrow::after{content:'\2192';font-size:large;margin-left:5px;vertical-align:top}.imagify-upsell-dismiss::before{position:absolute;top:5px;right:5px;content:"\2715";color:#2e3243;font-size:2em}.imagify-upsell .imagify-meteo-icon{-webkit-filter:invert(100%) sepia(100%) saturate(0%) hue-rotate(104deg) brightness(103%) contrast(103%);filter:invert(100%) sepia(100%) saturate(0%) hue-rotate(104deg) brightness(103%) contrast(103%)} \ No newline at end of file +.imagify-flex{display:-webkit-box;display:-ms-flexbox;display:flex}.imagify-vcenter{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.imagify-noshrink{-ms-flex-negative:0;flex-shrink:0}.imagify-nogrow{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0}.imagify-wauto{width:auto}.imagify-hauto{height:auto}.imagify-full-width{width:100%}.imagify-start{float:left}.imagify-end{float:right}.imagify-txt-start.imagify-txt-start.imagify-txt-start{text-align:left}.imagify-txt-center.imagify-txt-center.imagify-txt-center{text-align:center}.imagify-txt-end.imagify-txt-end.imagify-txt-end{text-align:right}.imagify-mt0.imagify-mt0{margin-top:0}.imagify-mt1.imagify-mt1{margin-top:1em}.imagify-mt2.imagify-mt2{margin-top:2em}.imagify-mt3.imagify-mt3{margin-top:3em}.imagify-mb0.imagify-mb0{margin-bottom:0}.imagify-mb1.imagify-mb1{margin-bottom:1em}.imagify-mr1.imagify-mr1{margin-right:1em}.imagify-ml2.imagify-ml2{margin-left:2em}.imagify-mr2.imagify-mr2{margin-right:2em}.imagify-pl0.imagify-pl0.imagify-pl0{padding-left:0}.imagify-pb0.imagify-pb0{padding-bottom:0}.imagify-pr1.imagify-pr1{padding-right:1em}.imagify-pr2.imagify-pr2{padding-right:2em}.imagify-oh{overflow:hidden}.imagify-clear{clear:both}.imagify-clearfix:after,.imagify-inline-options:after,.imagify-settings-main-content:after,.imagify-settings-section:after{content:"";display:table;width:100%;clear:both}.imagify-setting-optim-level .imagify-inline-options:after{display:none}.imagify-divider{height:1px;margin:20px 0;background:#d2d3d6}.imagify-pipe{display:inline-block;margin:0 .75em;vertical-align:middle;height:15px;width:1px;background:#979797}.imagify-h3-like.imagify-h3-like.imagify-h3-like{margin-bottom:0;font-size:19px;font-weight:500;color:#1f2332}.imagify-h4-like.imagify-h4-like.imagify-h4-like{font-size:14px;font-weight:700;color:#2e3243}.imagify-count.imagify-count{counter-reset:num}.imagify-count .imagify-count-title{font-weight:700}.imagify-default-settings{color:#73818c;font-weight:400}.imagify-count .imagify-count-title:before{counter-increment:num 1;content:counter(num) ". "}.imagify-count-list{counter-reset:listcount}.imagify-count-list li{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.imagify-count-list li+li{margin-top:.5em}.imagify-count-list li:before{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-preferred-size:24px;flex-basis:24px;-ms-flex-negative:0;flex-shrink:0;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-right:16px;border:2px solid #40b1d0;width:24px;height:24px;counter-increment:listcount 1;content:counter(listcount);color:#40b1d0;border-radius:50%}.imagify-table{display:table;width:100%}.imagify-cell{display:table-cell;padding:10px;vertical-align:top}.imagify-cell.va-top,.va-top .imagify-cell{vertical-align:top}.imagify-bulk-submit .imagify-cell{padding-top:0}body.imagify-modal-is-open{overflow:hidden}.imagify-spinner{display:inline-block;width:20px;height:20px;margin-right:5px;vertical-align:middle;background:rgba(0,0,0,0) url("../images/spinner.gif") no-repeat scroll 0 0/20px 20px;opacity:.7}.spinner.imagify-hidden{width:0;margin:4px 0 0 0}.imagify-primary.imagify-primary.imagify-primary{color:#40b1d0}.imagify-secondary.imagify-secondary.imagify-secondary,.imagify-valid{color:#8bc34a}.misc-pub-section.misc-pub-imagify h4{font-size:14px;margin-top:5px;margin-bottom:0}.imagify-chart{position:relative;top:1px;display:inline-block;vertical-align:middle}.imagify-chart-container{position:relative;display:inline-block;margin-right:5px}.imagify-chart-container canvas{display:block}.imagify-settings .button,.imagify-settings a,.imagify-settings input,.imagify-welcome .button,.imagify-welcome a,.imagify-weolcome input{-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.imagify-settings a{color:#40b1d0}.imagify-settings,.imagify-settings p,.imagify-settings th{color:#5f758e}.imagify-button-primary.imagify-button-primary,.imagify-button-secondary.imagify-button-secondary,.imagify-button.imagify-button,.imagify-main-content .button,.imagify-notice .button,.imagify-settings-section .button,.imagify-welcome .button{height:auto;padding:11px 22px;border:0 none;font-size:14px;font-weight:600;text-transform:uppercase;letter-spacing:.01em;word-spacing:0.01em;-webkit-box-shadow:0 3px 0 rgba(0,0,0,.15);box-shadow:0 3px 0 rgba(0,0,0,.15);border-radius:3px;cursor:pointer;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.button-primary.button-mini{padding:2px 10px}.imagify-settings .button.button-mini-flat{padding:3px 6px 5px;font-size:12px;-webkit-box-shadow:none!important;box-shadow:none!important;line-height:1.2}.imagify-settings .button.button-mini-flat:focus,.imagify-settings .button.button-mini-flat:hover{-webkit-box-shadow:none!important;box-shadow:none!important}.imagify-button-ghost.imagify-button-ghost,.imagify-title .button-ghost.button-ghost{padding:2px 9px;border:1px solid #40b1d0;font-size:12px;font-weight:400;color:#40b1d0;background:0 0;-webkit-box-shadow:none;box-shadow:none}.imagify-button-ghost.imagify-button-ghost:focus,.imagify-button-ghost.imagify-button-ghost:hover,.imagify-title .button-ghost.button-ghost:focus,.imagify-title .button-ghost.button-ghost:hover{border-color:transparent;color:#000;background:#40b1d0}.imagify-button-ghost.imagify-button-ghost:focus,.imagify-button-ghost.imagify-button-ghost:hover{color:#fff}.imagify-button-medium.imagify-button-medium{text-transform:uppercase;letter-spacing:.1em;padding:3px 10px;font-weight:700}.imagify-button-medium.imagify-button-ghost{border-width:2px}[class*=imagify-] .button .dashicons{margin-right:5px;vertical-align:middle}.imagify-button-primary.imagify-button-primary,.imagify-settings .button-primary.button-primary,.imagify-welcome .button-primary.button-primary{background:#40b1d0;color:#fff;-webkit-box-shadow:0 3px 0 #338ea6;box-shadow:0 3px 0 #338ea6;text-shadow:0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799!important}.imagify-button-secondary.imagify-button-secondary{background:#8bc34a;color:#fff;-webkit-box-shadow:0 3px 0 #6f9c3b;box-shadow:0 3px 0 #6f9c3b;text-shadow:0 -1px 1px #6f9c3b,1px 0 1px #6f9c3b,0 1px 1px #6f9c3b!important}.imagify-button-primary.imagify-button-primary:focus,.imagify-button-primary.imagify-button-primary:hover,.imagify-settings .button-primary:focus,.imagify-settings .button-primary:hover,.imagify-welcome .button-primary:focus,.imagify-welcome .button-primary:hover{background:#338ea6;-webkit-box-shadow:0 3px 0 #1f7a92;box-shadow:0 3px 0 #1f7a92}.imagify-button-secondary.imagify-button-secondary:focus,.imagify-button-secondary.imagify-button-secondary:hover{background:#6f9c3b;color:#fff}.imagify-button-light.imagify-button-light{background:#fff;color:#4a4a4a;-webkit-box-shadow:0 2px 0 rgba(0,0,0,.2);box-shadow:0 2px 0 rgba(0,0,0,.2)}.imagify-block-secondary .imagify-button-light.imagify-button-light{color:#6f9c3b}.imagify-button-light.imagify-button-light:focus,.imagify-button-light.imagify-button-light:hover{color:#fff;background:rgba(0,0,0,.2)}.button.imagify-button-clean,.imagify-button-clean{padding:0;background:0 0;-webkit-box-shadow:none;box-shadow:none}.imagify-button-clean .dashicons-plus{width:32px;height:25px}.imagify-button-clean .dashicons-plus:before{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:25px;height:22px;margin-left:2px;padding-top:3px;font-size:17px;background:#40b1d0;color:#fff;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.button.imagify-button-clean:active,.button.imagify-button-clean:focus,.button.imagify-button-clean:hover,.button.imagify-button-clean[disabled]{background:0 0!important;color:#343a49;-webkit-box-shadow:none;box-shadow:none}.button.imagify-button-clean:focus .dashicons-plus:before,.button.imagify-button-clean:hover .dashicons-plus:before{background:#343a49}button.imagify-link-like{border:0;padding:0;color:inherit;text-decoration:underline;font-size:13px;-webkit-box-shadow:none;box-shadow:none;background:0 0;cursor:pointer}.imagify-section-positive .imagify-button-light{color:#709a41}.imagify-button.imagify-button-big{font-size:15px;padding:11px 30px}.imagify-button-big .dashicons{font-size:1.45em;margin-right:6px;margin-left:-4px}.imagify-button-primary.imagify-button-primary .dashicons,.imagify-button-secondary.imagify-button-secondary .dashicons,.imagify-button.imagify-button .dashicons,.imagify-notice .button .dashicons,.imagify-settings .button .dashicons,.imagify-welcome .button .dashicons{vertical-align:middle}[class*=imagify-] .button-text{display:inline-block;vertical-align:middle}.media-frame-content .imagify-button-primary,.wp_attachment_image .imagify-button-primary{padding:0 10px 1px;margin:0 5px 2px 0;font-size:13px;line-height:26px;-webkit-box-shadow:0 3px 0 #338ea6;box-shadow:0 3px 0 #338ea6}.wp_attachment_image .imagify-button-primary{float:left}.imagify-title.imagify-title{position:relative;padding:10px 30px;font-size:23px;background:#1f2332;color:#fff}.imagify-welcome .imagify-logo{opacity:1}.imagify-welcome .imagify-title{display:-webkit-box;display:-ms-flexbox;display:flex;padding:20px 30px}.imagify-settings .imagify-title{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.imagify-settings .imagify-logo-block{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-negative:0;flex-shrink:0;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;padding:0;margin-right:35px;color:inherit}.imagify-logo-block sup{color:#1f2332}.imagify-settings .imagify-title+.imagify-notice{margin:0;border-right:1px solid #d9d9d9;padding-top:15px;padding-bottom:15px}.imagify-title .title-text{font-size:28px;font-weight:700;color:#fff}.imagify-lb-icon{padding-right:18px}.imagify-lb-text img{margin-bottom:.15em}.imagify-lb-text{font-size:23px;font-weight:700;color:#fff}.imagify-logo{display:block;vertical-align:top;opacity:.4}.imagify-section,.imagify-settings div.submit,.imagify-sub-header,.imagify-sub-title.imagify-sub-title{margin:0;padding:20px;background:#f2f5f7}.imagify-section-positive,.imagify-sub-title.imagify-sub-title{padding-left:40px}.imagify-section-positive{background:#8cc152;color:#fff}.imagify-section-positive p{color:#fff}.imagify-section-gray{background:#d9e4eb}.imagify-section-gray .imagify-count-title{color:#4a4a4a}.imagify-section p:first-child{margin-top:0}.imagify-section p:last-child{margin-bottom:0}.imagify-settings .imagify-documentation-link-box{display:-webkit-box;display:-ms-flexbox;display:flex;padding:12px 13px 14px;border:1px solid #40b1d0;color:#e5ebef;border-radius:3px}.imagify-documentation-link-icon{width:23px;height:31px;font-size:2.6em;margin-right:15px;line-height:1.3}.imagify-documentation-link-box span{font-size:12px}.imagify-documentation-link-box a{font-weight:700}@media (max-width:1120px){.imagify-settings .imagify-title{-ms-flex-wrap:wrap;flex-wrap:wrap}}.imagify-settings-section{padding:10px 20px}.imagify-account-info-col .imagify-settings-section{padding-right:0}.imagify-settings-main-content,.imagify-welcome .imagify-settings-section{border:1px solid #d9d9d9;border-top-width:0;background:#fff}.imagify-settings-main-content{padding-bottom:20px}.imagify-settings-main-content .imagify-setting-line,.imagify-settings-main-content p{font-size:14px;line-height:1.5}.imagify-settings-main-content .code{max-height:10em;padding:3px 5px 2px 5px;overflow:auto;background:#eaeaea;background:rgba(0,0,0,.07)}.imagify-settings-main-content+.imagify-settings-main-content{margin-top:20px;border-top-width:1px}.imagify-br{line-height:2}p.imagify-section-title.imagify-section-title{font-size:20px;margin-top:-.3em;margin-bottom:-.6em}.imagify-rate-us.imagify-rate-us{text-align:right;margin:-1em -2.4em -1em 0;color:#fff}.imagify-rate-us a{color:#40b1d0}.imagify-rate-us .stars{display:inline-block;margin:2px 0 0 10px;text-decoration:none;letter-spacing:.2em;vertical-align:-1px}.imagify-rate-us .stars .dashicons:before{font-size:18px}.imagify-rate-us a:focus,.imagify-rate-us a:hover{color:#fee102}@media (max-width:1220px){.imagify-rate-us.imagify-rate-us{position:static;margin-bottom:0;text-align:left}.imagify-rate-us.imagify-rate-us br{display:none}.imagify-rate-us .stars{display:block;margin-left:0}}.imagify-important{color:#f5a623}.imagify-settings .imagify-success,.imagify-success{color:#8bc34a}.imagify-info,.imagify-info a{color:#7a8996;font-size:12px}.imagify-info{position:relative;display:inline-block;padding-left:25px}.imagify-info .dashicons{position:absolute;left:0;top:0;color:#40b1d0}.imagify-checkbox.imagify-checkbox:checked,.imagify-checkbox.imagify-checkbox:not(:checked),.imagify-settings.imagify-settings [type=checkbox]:checked,.imagify-settings.imagify-settings [type=checkbox]:not(:checked){position:absolute;opacity:.01}.imagify-checkbox.imagify-checkbox:checked:focus,.imagify-checkbox.imagify-checkbox:not(:checked):focus,.imagify-settings.imagify-settings [type=checkbox]:checked:focus,.imagify-settings.imagify-settings [type=checkbox]:not(:checked):focus{-webkit-box-shadow:none!important;box-shadow:none!important;outline:0!important;border:0 none!important}.imagify-checkbox.imagify-checkbox:checked+label,.imagify-checkbox.imagify-checkbox:not(:checked)+label,.imagify-settings [type=checkbox]:checked+label,.imagify-settings [type=checkbox]:not(:checked)+label{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;min-height:24px;padding-left:40px;cursor:pointer;font-size:14px;font-weight:700;color:#2e3243}.imagify-checkbox.imagify-checkbox:checked+label:before,.imagify-checkbox.imagify-checkbox:not(:checked)+label:before,.imagify-settings [type=checkbox]:checked+label:before,.imagify-settings [type=checkbox]:not(:checked)+label:before{content:'';position:absolute;left:0;top:0;width:22px;height:22px;border:2px solid #8ba6b4;background:#fff;border-radius:3px}.imagify-checkbox.imagify-checkbox:checked+label:after,.imagify-checkbox.imagify-checkbox:not(:checked)+label:after,.imagify-settings [type=checkbox]:checked+label:after,.imagify-settings [type=checkbox]:not(:checked)+label:after{content:"✓";position:absolute;font-size:1.4em;top:-2px;left:4.5px;color:#8ba6b4;font-weight:400;-webkit-transition:all .2s;-o-transition:all .2s;transition:all .2s}.imagify-checkbox.imagify-checkbox[disabled]:checked+label:before,.imagify-checkbox.imagify-checkbox[disabled]:not(:checked)+label:before,.imagify-settings [type=checkbox][disabled]:checked+label:before,.imagify-settings [type=checkbox][disabled]:not(:checked)+label:before{border-color:#ccc;background:#ddd}.imagify-checkbox.imagify-checkbox:not(:checked)+label:after,.imagify-settings [type=checkbox]:not(:checked)+label:after{opacity:0;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0)}.imagify-checkbox.imagify-checkbox:checked+label:after,.imagify-settings [type=checkbox]:checked+label:after{opacity:1;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.medium.imagify-checkbox:checked+label:before,.medium.imagify-checkbox:not(:checked)+label:before{width:22px;height:22px;border-width:1.5px;border-radius:2px;margin-top:0}.medium.imagify-checkbox:checked+label:after,.medium.imagify-checkbox:not(:checked)+label:after{font-size:1.1em;left:-17px;top:3px}.imagify-settings .mini[type=checkbox]:checked+label:before,.imagify-settings .mini[type=checkbox]:not(:checked)+label:before,.mini.imagify-checkbox:checked+label:before,.mini.imagify-checkbox:not(:checked)+label:before{width:15px;height:15px;border-width:1px;border-radius:2px;margin-top:0}.imagify-settings .mini[type=checkbox]:checked+label:after,.imagify-settings .mini[type=checkbox]:not(:checked)+label:after,.mini.imagify-checkbox:checked+label:after,.mini.imagify-checkbox:not(:checked)+label:after{font-size:.9em;left:-21px;top:-.5px}.imagify-checkbox.imagify-checkbox:checked:focus+label:before,.imagify-checkbox.imagify-checkbox:not(:checked):focus+label:before,.imagify-settings [type=checkbox]:checked:focus+label:before,.imagify-settings [type=checkbox]:not(:checked):focus+label:before{border-style:dotted;border-color:#40b1d0}.imagify-check-group{padding-left:2px;margin-bottom:0}.imagify-check-group.imagify-is-scrollable{height:15em;overflow-y:auto;padding:8px;margin:1.5em 0 0 -8px;background:#f4f7f9;border:1px solid #d2d3d6;border-radius:3px}.imagify-is-scrollable legend+p{margin-top:0}.imagify-is-scrollable [type=checkbox]:checked+label:before,.imagify-is-scrollable [type=checkbox]:not(:checked)+label:before{background:#f4f7f9}.imagify-settings .imagify-check-group.imagify-check-group label{color:#338ea6;font-weight:500}.imagify-inline-options{position:relative;display:table;width:100%;max-width:600px;border-collapse:collapse}.imagify-inline-options input[type=radio]:checked,.imagify-inline-options input[type=radio]:not(:checked){position:absolute;left:5px;top:5px;display:none}.imagify-inline-options input[type=radio]:checked+label,.imagify-inline-options input[type=radio]:not(:checked)+label{position:relative;display:table-cell;padding:13px 10px;text-align:center;font-weight:600;font-size:16px;text-transform:uppercase;letter-spacing:.1em;color:#fff;background:#2e3243;-webkit-box-shadow:0 -3px 0 rgba(0,0,0,.1) inset;box-shadow:0 -3px 0 rgba(0,0,0,.1) inset;z-index:2;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.imagify-inline-options input[type=radio]:checked+label:first-of-type,.imagify-inline-options input[type=radio]:not(:checked)+label:first-of-type{border-radius:3px 0 0 3px}.imagify-inline-options input[type=radio]:checked+label:last-of-type,.imagify-inline-options input[type=radio]:not(:checked)+label:last-of-type{border-radius:0 3px 3px 0}.imagify-inline-options input[type=radio]:checked+label{background:#8bc34a}.imagify-inline-options .imagify-info{margin-top:15px}.imagify-account-info-col,.imagify-col.imagify-col.imagify-account-info-col{width:380px;max-width:100%;padding:0 20px 0 0}.imagify-col.imagify-col.imagify-shared-with-account-col,.imagify-shared-with-account-col{width:calc(100% - 380px);padding:0}.imagify-account-info-col .imagify-options-title{padding:24px 26px;color:#fff;background:#1f2332}.imagify-block-secondary{padding:26px 26px 35px;border:1px solid #75a345;background:#8bc34a;border-radius:3px;color:#fff}.imagify-account-info-col .imagify-block-secondary.imagify-block-secondary h3,.imagify-block-secondary.imagify-block-secondary p{color:inherit}.imagify-account-info-col .imagify-col-content h3:first-child{margin-top:0}.imagify-account-info-col .imagify-col-content h3{font-size:19px}.imagify-account-info-col .imagify-col-content p{margin:1.5em 0}.imagify-account-info-col .imagify-col-content p:first-child{margin-top:0}.imagify-user-plan-label{float:right;margin-top:-4px;padding:2px 10px;border:2px solid #40b1d0;font-size:14px;text-transform:uppercase;letter-spacing:.02em;color:#40b1d0;border-radius:3px}.imagify-user-plan-label:empty{display:none}.imagify-columns{overflow:hidden;padding:15px 0;counter-reset:cols}.imagify-columns [class^=col-]{float:left;-webkit-box-sizing:border-box;box-sizing:border-box}.imagify-columns .col-1-3{width:33.333%;padding-left:28px}.imagify-columns .col-2-3{width:66.666%;padding-left:28px}.imagify-columns .col-1-2{width:50%;padding:0 20px}@media (max-width:830px){.imagify-columns [class^=col-]{float:none;margin-bottom:1.5em}.imagify-columns .col-1-2,.imagify-columns .col-1-3{width:auto;padding:0 28px;clear:both;padding-top:1em}}.column-imagify_optimized_file.column-imagify_optimized_file{width:300px;text-align:center;vertical-align:middle}.column-imagify_optimized_file>*{max-width:21em;margin:0 auto}@media (min-width:1151px) and (max-width:1800px){.column-imagify_optimized_file.column-imagify_optimized_file{width:21em}}@media (min-width:783px) and (max-width:1150px){.column-imagify_optimized_file.column-imagify_optimized_file{width:13em}table.media .column-title .has-media-icon~.row-actions.row-actions{margin-left:0}}@media (max-width:782px){table.media .column-imagify_optimized_file.column-imagify_optimized_file{text-align:left}table.media .imagify-datas-actions-links,table.media .imagify-datas-more-action{text-align:center}table.media .column-imagify_optimized_file .imagify-datas-actions-links a,table.media .column-imagify_optimized_file>*{max-width:100%;margin-left:0}}@media (min-width:783px) and (max-width:1150px),(max-width:360px){table.media .imagify-hide-if-small{position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0;word-wrap:normal!important}}.compat-field-imagify .label{vertical-align:top}.compat-field-imagify ul.imagify-datas-list{margin-top:7px;font-size:11px}ul.imagify-datas-list.imagify-datas-list{margin:0 auto;color:#555}ul.imagify-datas-list .big{font-size:12px;color:#40b1d0}.imagify-data-item{overflow:hidden}li.imagify-data-item{clear:both;margin-bottom:2px}ul.imagify-datas-list .imagify-data-item span.data,ul.imagify-datas-list .imagify-data-item strong{float:left;width:38%;-webkit-box-sizing:border-box;box-sizing:border-box}ul.imagify-datas-list .imagify-data-item span.data{width:62%;padding-right:5px;text-align:left}.compat-field-imagify .imagify-datas-list .imagify-data-item .data{width:130px;text-align:left;font-weight:700}ul.imagify-datas-list .imagify-data-item strong{text-align:left;padding-left:5px}.media-sidebar .imagify-datas-list .imagify-data-item .data{width:auto;float:none}.media-sidebar .imagify-datas-list .imagify-data-item strong{display:inline-block;width:auto;float:none}.media-sidebar .imagify-datas-list .imagify-data-item .imagify-chart{float:left}.imagify-datas-more-action.imagify-datas-more-action{margin:.4em auto;background:-webkit-gradient(linear,left top,left bottom,from(transparent),color-stop(49%,transparent),color-stop(50%,rgba(0,0,0,.075)),color-stop(58%,rgba(0,0,0,.075)),color-stop(58%,transparent),to(transparent));background:-o-linear-gradient(top,transparent,transparent 49%,rgba(0,0,0,.075) 50%,rgba(0,0,0,.075) 58%,transparent 58%,transparent);background:linear-gradient(to bottom,transparent,transparent 49%,rgba(0,0,0,.075) 50%,rgba(0,0,0,.075) 58%,transparent 58%,transparent)}.imagify-datas-more-action a{display:inline-block;padding:0 5px;background:#40b1d0;color:#fff;text-transform:uppercase;font-size:9px;font-weight:700;line-height:1.9;text-decoration:none}.imagify-datas-more-action a.is-open{background:#555}.imagify-datas-more-action a.is-open .dashicons{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.imagify-datas-more-action a .dashicons{font-size:14px;vertical-align:middle;line-height:.8}.imagify-datas-more-action a .dashicons:before{vertical-align:middle;line-height:20px}.imagify-datas-more-action .the-text{display:inline-block;vertical-align:middle;height:auto;line-height:inherit}ul.imagify-datas-details.imagify-datas-details{margin:.7em auto}.imagify-datas-details strong{color:#40b1d0}.imagify-datas-details .original{color:#555}.imagify-datas-actions-links{overflow:hidden;border-top:2px solid transparent;padding-top:5px;font-size:11px}.nggform .imagify-datas-actions-links{position:relative;z-index:2}.nggform .row-actions{z-index:1}.imagify-datas-actions-links a{position:relative;display:inline-block;padding-left:17px;text-decoration:none;font-weight:600}.compat-field-imagify .imagify-datas-actions-links{max-width:300px}.misc-pub-imagify .imagify-datas-actions-links{border-top:2px solid #f2f2f2;padding-bottom:5px}.column-imagify_optimized_file .imagify-datas-actions-links a{margin:0 .7em;padding-left:15px}.compat-field-imagify .imagify-datas-actions-links a,.misc-pub-imagify .imagify-datas-actions-links a{float:left;width:50%}.media-sidebar .compat-field-imagify .imagify-datas-actions-links a,.submitbox .misc-pub-imagify .imagify-datas-actions-links a{display:block;width:auto;float:none}.media-sidebar .compat-field-imagify .imagify-datas-actions-links br,.submitbox .misc-pub-imagify .imagify-datas-actions-links br{display:none}.imagify-datas-actions-links a:only-child{float:none;width:auto}.imagify-datas-details.is-open+.imagify-datas-actions-links{border-top-color:rgba(0,0,0,.075)}.imagify-datas-actions-links .dashicons{position:absolute;left:0;top:4px;width:12px;margin-right:2px;font-size:11px}.imagify-account,.imagify-account-link{padding-right:15px}.imagify-meteo-icon{display:inline-block;height:38px;vertical-align:middle;margin-right:10px}.imagify-user-plan{color:#40b1d0}.imagify-meteo-title.imagify-meteo-title{color:#fff;font-size:17px}.imagify-space-left>p{color:#fff}[class^=imagify-bar-]{position:relative;height:8px;width:100%;background:#60758d;color:#fff;font-size:10px}.imagify-progress{height:8px}.imagify-progress{-webkit-transition:width .3s;-o-transition:width .3s;transition:width .3s}.imagify-bar-positive .imagify-progress{background:#8cc152}.imagify-bar-positive .imagify-barnb{color:#8cc152}.imagify-bar-primary .imagify-progress{background:#40b1d0}.imagify-bar-primary .imagify-barnb{color:#40b1d0}.imagify-bar-negative .imagify-progress{background:#d2d3d6}.imagify-bar-negative .imagify-barnb{color:#7a8996}.imagify-bar-neutral .imagify-progress{background:#f5a623}.imagify-space-left .imagify-bar-negative .imagify-progress{background:#c51162}.imagify-btn-ghost{display:inline-block;height:auto;padding:7px 10px;border:1px solid #fff;text-align:center;background:0 0;color:#fff;border-radius:3px;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.imagify-btn-ghost:focus,.imagify-btn-ghost:hover{background:#fff;color:#888}.imagify-error{background:#d0021b;color:#fff}.imagify-settings-section .imagify-error{display:inline-block;padding:7px 10px;margin:10px 0 0 45px;border-radius:3px}.imagify-settings-section .imagify-error code{font-weight:400}.imagify-settings-section .imagify-error.hidden{display:none}.imagify-warning{background:#f5a623;color:#fff;text-shadow:0 0 2px rgba(0,0,0,.2)}.imagify-modal{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.js .imagify-modal{display:none;position:fixed;top:0;right:0;bottom:0;left:0;background-color:#1f2332;background-color:rgba(31,35,50,.95);z-index:99999}.imagify-modal-content{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:800px;max-width:95%;max-height:90vw;overflow:auto;padding:20px 25px;margin:1em auto;background:#fff;-webkit-box-shadow:1px 1px 4px rgba(0,0,0,.7);box-shadow:1px 1px 4px rgba(0,0,0,.7);border-radius:3px}.imagify-modal-loading .imagify-modal-content{overflow:hidden}#imagify-visual-comparison .imagify-modal-content,.imagify-visual-comparison .imagify-modal-content{max-width:1400px;background:0 0;padding:5px;-webkit-box-shadow:none;box-shadow:none;border-radius:0}.imagify-modal .h2{margin:.5em 0;color:#8ba6b4;font-weight:400;font-size:24px;letter-spacing:.075em;text-align:center}.imagify-modal .h3{color:#40b1d0;font-weight:400;font-size:18px;letter-spacing:.075em;text-align:center}.imagify-modal .close-btn{display:none;visibility:hidden;position:absolute;right:20px;top:20px;font-size:1.2em;border:0;background:transparent none;border-radius:0;cursor:pointer}.imagify-modal .close-btn i{margin-left:-2px}.imagify-modal .close-btn:focus,.imagify-modal .close-btn:hover{color:#40b1d0}.js .imagify-modal .close-btn{display:block;visibility:visible;z-index:12}.imagify-visual-comparison .imagify-modal-content,.wp_attachment_image #imagify-visual-comparison .imagify-modal-content{padding-top:40px}.imagify-col{float:left;width:50%;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-preferred-size:50%;flex-basis:50%}.imagify-col{padding-right:20px}.imagify-col+.imagify-col{padding-right:0;padding-left:20px}.imagify-col:target{-webkit-animation:hello 1s 3 linear backwards;animation:hello 1s 3 linear backwards}@-webkit-keyframes hello{0%,100%{background:#fff}50%{background:#f4f7f9}}@keyframes hello{0%,100%{background:#fff}50%{background:#f4f7f9}}@media (max-width:730px){.imagify-settings .imagify-documentation-link-box{margin-top:2em}}@media (max-width:782px){input[type=checkbox],input[type=radio]{height:1.5625rem;width:1.5625rem;margin:1px}[class*=imagify-] .button-text{font-size:13px}.imagify-account-info-col .imagify-settings-section{padding:0 10px}.imagify-settings-section{padding:10px}.imagify-check-group.imagify-is-scrollable{margin:auto}.imagify-col.imagify-col.imagify-shared-with-account-col,.imagify-custom-folders-section .imagify-col,.imagify-media-lib-section .imagify-col,.imagify-settings-section .imagify-col,.imagify-shared-with-account-col{width:100%;float:none;padding-right:0}.imagify-account-info-col,.imagify-col.imagify-col.imagify-account-info-col,.imagify-custom-folders-section .imagify-account-info-col,.imagify-media-lib-section .imagify-account-info-col{width:100%;float:none;padding-left:0;padding-right:0}.imagify-lb-text{font-size:20px}.imagify-vcenter{-ms-flex-direction:column;flex-direction:column;-webkit-box-direction:normal;-webkit-box-orient:vertical;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.imagify-pr2.imagify-pr2{padding-right:0}}.imagify-upsell{position:relative;background:#c51161;padding:20px 40px}.imagify-upsell p{color:#fff!important}.imagify-upsell-button{display:block;background:#fff;border-radius:5px;color:#c51161!important;font-weight:700;padding:10px;text-align:center;text-decoration:none;text-transform:uppercase}.imagify-upsell-arrow::after{content:'\2192';font-size:large;margin-left:5px;vertical-align:top}.imagify-upsell-dismiss::before{position:absolute;top:5px;right:5px;content:"\2715";color:#2e3243;font-size:2em}.imagify-upsell .imagify-meteo-icon{-webkit-filter:invert(100%) sepia(100%) saturate(0%) hue-rotate(104deg) brightness(103%) contrast(103%);filter:invert(100%) sepia(100%) saturate(0%) hue-rotate(104deg) brightness(103%) contrast(103%)}.imagify-original-fize-size{display:block!important}.imagify-original-fize-size .value{padding-left:15px!important} \ No newline at end of file diff --git a/assets/js/jquery.twentytwenty.js b/assets/js/jquery.twentytwenty.js index a13ed7395..71db15626 100755 --- a/assets/js/jquery.twentytwenty.js +++ b/assets/js/jquery.twentytwenty.js @@ -211,7 +211,7 @@ modalHtml += ''; modalHtml += ''; modalHtml += '
'; - modalHtml += '
'; + modalHtml += '
'; modalHtml += '

'; modalHtml += '' + imagifyTTT.labels.filesize + ''; modalHtml += '' + settings.originalSize + ''; @@ -515,7 +515,7 @@ // If shown image > 360, use twentytwenty. if ( imagifyTTT.imageWidth > imagifyTTT.widthLimit && oriSource.src ) { - filesize = $( '.misc-pub-filesize strong' ).text(); + filesize = $( '#imagify-full-optimized-size' ).val(); saving = $( '.imagify-data-item .imagify-chart-value' ).text(); // Create button to trigger. @@ -574,7 +574,7 @@ originalUrl: $this.data( 'backup-src' ), optimizedUrl: $this.data( 'full-src' ), originalSize: $datas.find( '.original' ).text(), - optimizedSize: $datas.find( '.imagify-data-item .big' ).text(), + optimizedSize: $datas.find( '#imagify_data_sum .big' ).text(), saving: $datas.find( '.imagify-chart-value' ).text(), modalAppendTo: $this.closest( '.column-primary' ), trigger: $this, @@ -630,7 +630,7 @@ originalUrl: originalSrc, optimizedUrl: $( '#imagify-full-src' ).val(), originalSize: $( '#imagify-original-size' ).val(), - optimizedSize: $datas.find( '.imagify-data-item .big' ).text(), + optimizedSize: $datas.find( '#imagify_data_sum .big' ).text(), saving: $datas.find( '.imagify-chart-value' ).text(), modalAppendTo: $( '.media-frame-content .thumbnail-image' ), trigger: $( '#imagify-media-frame-comparison-btn' ), diff --git a/assets/js/jquery.twentytwenty.min.js b/assets/js/jquery.twentytwenty.min.js index 56de4add5..e8982a11a 100755 --- a/assets/js/jquery.twentytwenty.min.js +++ b/assets/js/jquery.twentytwenty.min.js @@ -1 +1 @@ -!function(u,w){u.fn.twentytwenty=function(p,h){return p=u.extend({handlePosition:.5,orientation:"horizontal",labelBefore:"Before",labelAfter:"After"},p),this.each(function(){function i(t){t=f(t),"vertical"===l?a.css("top",t.ch):a.css("left",t.cw),y(t)}var a,e=p.handlePosition,n=u(this),l=p.orientation,t="vertical"===l?"down":"left",o="vertical"===l?"up":"right",s=n.find("img:first"),r=n.find("img:last"),d=0,m=0,g=0,c=0,f=function(t){var i=parseInt(s.width(),10),a=parseInt(s.height(),10);return i&&a||(i=parseInt(s.attr("width"),10),a=parseInt(s.attr("height"),10)),{w:i+"px",h:a+"px",cw:t*i+"px",ch:t*a+"px"}},y=function(t){var i=n.find(".twentytwenty-before");"vertical"===l?i.css("clip","rect(0,"+t.w+","+t.ch+",0)"):i.css("clip","rect(0,"+t.cw+","+t.h+",0)"),n.css("height",t.h),"function"==typeof h&&h()};n.parent(".twentytwenty-wrapper").length&&n.unwrap(),n.wrap('

'),n.children(".twentytwenty-overlay, .twentytwenty-handle").remove(),n.append('
'),n.append('
'),(a=n.find(".twentytwenty-handle")).append(''),a.append(''),n.addClass("twentytwenty-container"),s.addClass("twentytwenty-before"),r.addClass("twentytwenty-after"),(t=n.find(".twentytwenty-overlay")).append('
'+p.labelBefore+"
"),t.append('
'+p.labelAfter+"
"),u(w).on("resize.twentytwenty",function(){i(e)}),a.on("movestart",function(t){("vertical"!==l&&(t.distX>t.distY&&t.distX<-t.distY||t.distX-t.distY)||"vertical"===l&&(t.distXt.distY&&t.distX>-t.distY))&&t.preventDefault(),n.addClass("active"),d=n.offset().left,m=n.offset().top,g=s.width(),c=s.height()}),a.on("moveend",function(){n.removeClass("active")}),a.on("move",function(t){n.hasClass("active")&&((e="vertical"===l?(t.pageY-m)/c:(t.pageX-d)/g)<0?e=0:1
"),e.trigger.on("click.imagify",function(t){var r,i,d=C(C(this).data("target")),a=0;t.preventDefault(),e.openModal&&x.imagify.openModal(C(this)),d.find(".imagify-modal-content").css({width:.85*C(x).outerWidth()+"px","max-width":e.width}),d.find(".imagify-img-before").on("load",function(){a++}).attr("src",e.originalUrl),d.find(".imagify-img-after").on("load",function(){a++}).attr("src",e.optimizedUrl+(0").replace(/\*\*/,""),o=t.data("original-alt"),s=t.data("original-img"),r=t.data("original-dim").split("x"),d=t.data("normal-alt"),m=t.data("normal-img"),g=t.data("normal-dim").split("x"),c=t.data("aggressive-alt"),f=t.data("aggressive-img"),y=t.data("aggressive-dim").split("x"),p=t.data("ultra-label").replace(/\*\*/,"").replace(/\*\*/,""),h=t.data("ultra-alt"),u=t.data("ultra-img"),w=t.data("ultra-dim").split("x"),v=(v=(v='')+'")+'",b=(b=(b='')+'")+'",t.before('Loading…'),C(".twentytwenty-left-buttons").append(v),C(".twentytwenty-right-buttons").append(b),T=''+o+'',T=(T=(T=(T+=''+d+'')+''+c+'')+''+h+'')+(C(".twentytwenty-left-buttons").lenght?v+b:""),t.closest(".imagify-modal-content").addClass("loading").find(".twentytwenty-container").append(T),C(".img-original").on("load",function(){i++}).attr("src",s),C(".img-normal").on("load",function(){i++}).attr("src",m),C(".img-aggressive").on("load",function(){i++}).attr("src",f),C(".img-ultra").on("load",function(){i++}).attr("src",u),z=setInterval(function(){4===i&&(t.twentytwenty({handlePosition:.6,orientation:"horizontal",labelBefore:l,labelAfter:p},function(){t.closest(".imagify-modal-content").hasClass("loaded")||(t.closest(".imagify-modal-content").removeClass("loading").addClass("loaded"),I(C(".imagify-level-ultra .imagify-chart canvas")))}),clearInterval(z),z=null)},75),C(".imagify-comparison-title").on("click",".twentytwenty-duo-buttons button:not(.selected)",function(t){var i=C(this),a=i.closest(".imagify-comparison-title").nextAll(".twentytwenty-wrapper").find(".twentytwenty-container"),e=i.closest(".twentytwenty-duo-buttons").hasClass("twentytwenty-duo-left")?"left":"right",n="left"==e?i.closest(".imagify-comparison-title").find(".twentytwenty-duo-right"):i.closest(".imagify-comparison-title").find(".twentytwenty-duo-left"),l=i.closest(".twentytwenty-duo-buttons").find("button"),o=a.find(".twentytwenty-before"),s=a.find(".twentytwenty-after"),r=i.data("img");t.stopPropagation(),t.preventDefault(),l.removeClass("selected"),i.addClass("selected"),n.find(".selected").data("img")===r&&n.find("button:not(.selected)").eq(0).trigger("click"),"left"==e&&(t=o.css("clip"),o.attr("style",""),o.removeClass("twentytwenty-before"),a.find(".img-"+r).addClass("twentytwenty-before").css("clip",t),C(".twentytwenty-before-label .twentytwenty-label-content").text(a.data(r+"-label")),C(".imagify-c-level.go-left").attr("aria-hidden","true").removeClass("go-left go-right"),C(".imagify-level-"+r).attr("aria-hidden","false").addClass("go-left")),"right"==e&&(s.removeClass("twentytwenty-after"),a.find(".img-"+r).addClass("twentytwenty-after"),C(".twentytwenty-after-label .twentytwenty-label-content").text(a.data(r+"-label")),C(".imagify-c-level.go-right").attr("aria-hidden","true").removeClass("go-left go-right"),C(".imagify-level-"+r).attr("aria-hidden","false").addClass("go-right")),I(C(".imagify-level-"+r+" .imagify-chart canvas"))}))}),imagifyTTT.imageWidth&&0imagifyTTT.widthLimit&&i.src?(o=C(".misc-pub-filesize strong").text(),n=C(".imagify-data-item .imagify-chart-value").text(),C('[id^="imgedit-open-btn-"]').before('"),e({width:parseInt(imagifyTTT.imageWidth,10),height:parseInt(imagifyTTT.imageHeight,10),originalUrl:i.src,optimizedUrl:imagifyTTT.imageSrc,originalSize:i.size,optimizedSize:o,saving:n,modalAppendTo:t,trigger:C("#imagify-start-comparison"),modalId:"imagify-visual-comparison"})):imagifyTTT.imageWidth'+imagifyTTT.labels.optimize+""),C("#imagify-optimize-trigger").on("click",function(){C(this).prev(".spinner").removeClass("imagify-hidden").addClass("is-active")}))),0'+imagifyTTT.labels.compare+""),i=C(".media-frame-content .compat-field-imagify"),e({width:parseInt(C("#imagify-full-width").val(),10),height:parseInt(C("#imagify-full-height").val(),10),originalUrl:t,optimizedUrl:C("#imagify-full-src").val(),originalSize:C("#imagify-original-size").val(),optimizedSize:i.find(".imagify-data-item .big").text(),saving:i.find(".imagify-chart-value").text(),modalAppendTo:C(".media-frame-content .thumbnail-image"),trigger:C("#imagify-media-frame-comparison-btn"),modalId:"imagify-comparison-modal",openModal:!0})),clearInterval(a),a=null)},20)},C(".upload-php").on("click",".media-frame.mode-grid .attachment, .edit-media-header .left, .edit-media-header .right",function(){l()}),o="item",s={},x.location.href.replace(/[?&]+([^=&]+)=?([^&]*)?/gi,function(t,i,a){s[i]=void 0!==a?a:""}),o?s[o]||null:s)&&l(),0
'),n.children(".twentytwenty-overlay, .twentytwenty-handle").remove(),n.append('
'),n.append('
'),(a=n.find(".twentytwenty-handle")).append(''),a.append(''),n.addClass("twentytwenty-container"),s.addClass("twentytwenty-before"),r.addClass("twentytwenty-after"),(t=n.find(".twentytwenty-overlay")).append('
'+p.labelBefore+"
"),t.append('
'+p.labelAfter+"
"),u(w).on("resize.twentytwenty",function(){i(e)}),a.on("movestart",function(t){("vertical"!==l&&(t.distX>t.distY&&t.distX<-t.distY||t.distX-t.distY)||"vertical"===l&&(t.distXt.distY&&t.distX>-t.distY))&&t.preventDefault(),n.addClass("active"),d=n.offset().left,m=n.offset().top,g=s.width(),c=s.height()}),a.on("moveend",function(){n.removeClass("active")}),a.on("move",function(t){n.hasClass("active")&&((e="vertical"===l?(t.pageY-m)/c:(t.pageX-d)/g)<0?e=0:1
"),e.trigger.on("click.imagify",function(t){var r,i,d=C(C(this).data("target")),a=0;t.preventDefault(),e.openModal&&x.imagify.openModal(C(this)),d.find(".imagify-modal-content").css({width:.85*C(x).outerWidth()+"px","max-width":e.width}),d.find(".imagify-img-before").on("load",function(){a++}).attr("src",e.originalUrl),d.find(".imagify-img-after").on("load",function(){a++}).attr("src",e.optimizedUrl+(0").replace(/\*\*/,""),o=t.data("original-alt"),s=t.data("original-img"),r=t.data("original-dim").split("x"),d=t.data("normal-alt"),m=t.data("normal-img"),g=t.data("normal-dim").split("x"),c=t.data("aggressive-alt"),f=t.data("aggressive-img"),y=t.data("aggressive-dim").split("x"),p=t.data("ultra-label").replace(/\*\*/,"").replace(/\*\*/,""),h=t.data("ultra-alt"),u=t.data("ultra-img"),w=t.data("ultra-dim").split("x"),v=(v=(v='')+'")+'",b=(b=(b='')+'")+'",t.before('Loading…'),C(".twentytwenty-left-buttons").append(v),C(".twentytwenty-right-buttons").append(b),T=''+o+'',T=(T=(T=(T+=''+d+'')+''+c+'')+''+h+'')+(C(".twentytwenty-left-buttons").lenght?v+b:""),t.closest(".imagify-modal-content").addClass("loading").find(".twentytwenty-container").append(T),C(".img-original").on("load",function(){i++}).attr("src",s),C(".img-normal").on("load",function(){i++}).attr("src",m),C(".img-aggressive").on("load",function(){i++}).attr("src",f),C(".img-ultra").on("load",function(){i++}).attr("src",u),z=setInterval(function(){4===i&&(t.twentytwenty({handlePosition:.6,orientation:"horizontal",labelBefore:l,labelAfter:p},function(){t.closest(".imagify-modal-content").hasClass("loaded")||(t.closest(".imagify-modal-content").removeClass("loading").addClass("loaded"),I(C(".imagify-level-ultra .imagify-chart canvas")))}),clearInterval(z),z=null)},75),C(".imagify-comparison-title").on("click",".twentytwenty-duo-buttons button:not(.selected)",function(t){var i=C(this),a=i.closest(".imagify-comparison-title").nextAll(".twentytwenty-wrapper").find(".twentytwenty-container"),e=i.closest(".twentytwenty-duo-buttons").hasClass("twentytwenty-duo-left")?"left":"right",n="left"==e?i.closest(".imagify-comparison-title").find(".twentytwenty-duo-right"):i.closest(".imagify-comparison-title").find(".twentytwenty-duo-left"),l=i.closest(".twentytwenty-duo-buttons").find("button"),o=a.find(".twentytwenty-before"),s=a.find(".twentytwenty-after"),r=i.data("img");t.stopPropagation(),t.preventDefault(),l.removeClass("selected"),i.addClass("selected"),n.find(".selected").data("img")===r&&n.find("button:not(.selected)").eq(0).trigger("click"),"left"==e&&(t=o.css("clip"),o.attr("style",""),o.removeClass("twentytwenty-before"),a.find(".img-"+r).addClass("twentytwenty-before").css("clip",t),C(".twentytwenty-before-label .twentytwenty-label-content").text(a.data(r+"-label")),C(".imagify-c-level.go-left").attr("aria-hidden","true").removeClass("go-left go-right"),C(".imagify-level-"+r).attr("aria-hidden","false").addClass("go-left")),"right"==e&&(s.removeClass("twentytwenty-after"),a.find(".img-"+r).addClass("twentytwenty-after"),C(".twentytwenty-after-label .twentytwenty-label-content").text(a.data(r+"-label")),C(".imagify-c-level.go-right").attr("aria-hidden","true").removeClass("go-left go-right"),C(".imagify-level-"+r).attr("aria-hidden","false").addClass("go-right")),I(C(".imagify-level-"+r+" .imagify-chart canvas"))}))}),imagifyTTT.imageWidth&&0imagifyTTT.widthLimit&&i.src?(o=C("#imagify-full-optimized-size").val(),n=C(".imagify-data-item .imagify-chart-value").text(),C('[id^="imgedit-open-btn-"]').before('"),e({width:parseInt(imagifyTTT.imageWidth,10),height:parseInt(imagifyTTT.imageHeight,10),originalUrl:i.src,optimizedUrl:imagifyTTT.imageSrc,originalSize:i.size,optimizedSize:o,saving:n,modalAppendTo:t,trigger:C("#imagify-start-comparison"),modalId:"imagify-visual-comparison"})):imagifyTTT.imageWidth'+imagifyTTT.labels.optimize+""),C("#imagify-optimize-trigger").on("click",function(){C(this).prev(".spinner").removeClass("imagify-hidden").addClass("is-active")}))),0'+imagifyTTT.labels.compare+""),i=C(".media-frame-content .compat-field-imagify"),e({width:parseInt(C("#imagify-full-width").val(),10),height:parseInt(C("#imagify-full-height").val(),10),originalUrl:t,optimizedUrl:C("#imagify-full-src").val(),originalSize:C("#imagify-original-size").val(),optimizedSize:i.find("#imagify_data_sum .big").text(),saving:i.find(".imagify-chart-value").text(),modalAppendTo:C(".media-frame-content .thumbnail-image"),trigger:C("#imagify-media-frame-comparison-btn"),modalId:"imagify-comparison-modal",openModal:!0})),clearInterval(a),a=null)},20)},C(".upload-php").on("click",".media-frame.mode-grid .attachment, .edit-media-header .left, .edit-media-header .right",function(){l()}),o="item",s={},x.location.href.replace(/[?&]+([^=&]+)=?([^&]*)?/gi,function(t,i,a){s[i]=void 0!==a?a:""}),o?s[o]||null:s)&&l(),0get_server_conf()->add(); - } elseif ( ! $enabled ) { - // Remove the AVIF file type. + } elseif ( ! $enabled && $was_enabled ) { + // Remove the WebP file type. $result = $this->get_server_conf()->remove(); } diff --git a/classes/Bulk/Bulk.php b/classes/Bulk/Bulk.php index 941201750..c9d07e137 100644 --- a/classes/Bulk/Bulk.php +++ b/classes/Bulk/Bulk.php @@ -173,31 +173,17 @@ public function run_optimize( string $context, int $optimization_level ) { 'message' => 'over-quota', ]; } - $formats = imagify_nextgen_images_formats(); - $media_ids = [ - 'ids' => [], - 'errors' => [ - 'no_file_path' => [], - 'no_backup' => [], - ], - ]; - foreach ( $formats as $format ) { - $result = $this->get_bulk_instance( $context )->get_optimized_media_ids_without_format( $format ); - $media_ids['ids'] = array_merge( $media_ids['ids'], $result['ids'] ); - } - $get_unoptimized_media_ids = $this->get_bulk_instance( $context )->get_unoptimized_media_ids( $optimization_level ); - $media_ids['ids'] = array_merge( $media_ids['ids'], $get_unoptimized_media_ids ); + $media_ids = $this->get_bulk_instance( $context )->get_unoptimized_media_ids( $optimization_level ); - if ( empty( $media_ids['ids'] ) ) { + if ( empty( $media_ids ) ) { return [ 'success' => false, 'message' => 'no-images', ]; } - $media_ids['ids'] = array_unique( $media_ids['ids'] ); - foreach ( $media_ids['ids'] as $media_id ) { + foreach ( $media_ids as $media_id ) { try { as_enqueue_async_action( 'imagify_optimize_media', @@ -597,10 +583,6 @@ public function bulk_get_stats_callback() { * @param array $old_value The old option value. * @param array $value The new option value. * - * Please note that the convert_to_avif new value is a checkbox, - * so it equals 1 when it's set otherwise it's not set. - * That's why we need to use empty function when checking its value. - * * @return void */ public function maybe_generate_missing_nextgen( $old_value, $value ) { @@ -609,11 +591,6 @@ public function maybe_generate_missing_nextgen( $old_value, $value ) { return; } - if ( empty( $value['convert_to_avif'] ) ) { - // new value is disabled, do nothing. - return; - } - $contexts = $this->get_contexts(); $formats = imagify_nextgen_images_formats(); diff --git a/classes/Optimization/Data/AbstractData.php b/classes/Optimization/Data/AbstractData.php index 3c30b4424..df58bc882 100644 --- a/classes/Optimization/Data/AbstractData.php +++ b/classes/Optimization/Data/AbstractData.php @@ -281,7 +281,7 @@ public function get_original_size( $human_format = true, $decimals = 2 ) { /** * Get the file size of the full size file. - * If the WebP size is available, it is used. + * If the Nextgen size is available, it is used. * * @since 1.9 * @access public @@ -289,28 +289,36 @@ public function get_original_size( $human_format = true, $decimals = 2 ) { * * @param bool $human_format True to display the image human format size (1Mb). * @param int $decimals Precision of number of decimal places. - * @param bool $use_webp Use the WebP size if available. + * @param bool $use_nextgen Use the Nextgen size if available. * @return string|int */ - public function get_optimized_size( $human_format = true, $decimals = 2, $use_webp = true ) { + public function get_optimized_size( $human_format = true, $decimals = 2, $use_nextgen = true ) { if ( ! $this->is_valid() ) { return $human_format ? imagify_size_format( 0, $decimals ) : 0; } - $data = $this->get_optimization_data(); - $media = $this->get_media(); - - if ( $use_webp ) { - $process_class_name = imagify_get_optimization_process_class_name( $media->get_context() ); - $webp_size_name = 'full' . constant( $process_class_name . '::WEBP_SUFFIX' ); - } - - if ( $use_webp && ! empty( $data['sizes'][ $webp_size_name ]['optimized_size'] ) ) { - $size = (int) $data['sizes'][ $webp_size_name ]['optimized_size']; + $data = $this->get_optimization_data(); + $media = $this->get_media(); + $format = 'webp'; + + $process_class_name = imagify_get_optimization_process_class_name( $media->get_context() ); + $nextgen_avif_size_name = 'full' . constant( $process_class_name . '::AVIF_SUFFIX' ); + $nextgen_webp_size_name = 'full' . constant( $process_class_name . '::WEBP_SUFFIX' ); + + $size = 0; + + if ( $use_nextgen ) { + /**Checking for success status before size, some cases the response is false + * because the image is already compressed, or we have a connection timed out + * */ + $size = ! empty( $data['sizes'][ $nextgen_webp_size_name ] ) && $data['sizes'][ $nextgen_webp_size_name ]['success'] ? + (int) $data['sizes'][ $nextgen_webp_size_name ]['optimized_size'] : 0; + if ( ! empty( $data['sizes'][ $nextgen_avif_size_name ]['optimized_size'] ) && + $data['sizes'][ $nextgen_avif_size_name ] ) { + $size = (int) $data['sizes'][ $nextgen_avif_size_name ]['optimized_size']; + } } elseif ( ! empty( $data['sizes']['full']['optimized_size'] ) ) { $size = (int) $data['sizes']['full']['optimized_size']; - } else { - $size = 0; } if ( $size ) { @@ -320,10 +328,13 @@ public function get_optimized_size( $human_format = true, $decimals = 2, $use_we // If nothing in the database, try to get the info from the file. $filepath = false; - if ( $use_webp && ! empty( $data['sizes'][ $webp_size_name ]['success'] ) ) { - // Try with the WebP file first. + if ( $use_nextgen ) { + if ( ! empty( $data['sizes'][ $nextgen_avif_size_name ]['success'] ) ) { + $format = 'avif'; + } + // Try with the Nextgen file first. $filepath = $media->get_raw_fullsize_path(); - $filepath = $filepath ? imagify_path_to_webp( $filepath ) : false; + $filepath = $filepath ? imagify_path_to_nextgen( $filepath, $format ) : false; if ( ! $filepath || ! $this->filesystem->exists( $filepath ) ) { $filepath = false; @@ -331,7 +342,7 @@ public function get_optimized_size( $human_format = true, $decimals = 2, $use_we } if ( ! $filepath ) { - // No WebP? The full size then. + // No Nextgen? The full size then. $filepath = $media->get_fullsize_path(); } @@ -418,15 +429,20 @@ public function get_saving_percent() { } $process_class_name = imagify_get_optimization_process_class_name( $this->get_media()->get_context() ); - $webp_size_name = 'full' . constant( $process_class_name . '::WEBP_SUFFIX' ); + $nextgen_webp_size_name = 'full' . constant( $process_class_name . '::WEBP_SUFFIX' ); + $nextgen_avif_size_name = 'full' . constant( $process_class_name . '::AVIF_SUFFIX' ); - $percent = $this->get_size_data( $webp_size_name, 'percent' ); + $percent = $this->get_size_data( $nextgen_avif_size_name, 'percent' ); + // Check for webp version if avif is not found. if ( ! $percent ) { - $percent = $this->get_size_data( 'full', 'percent' ); + $percent = $this->get_size_data( $nextgen_webp_size_name, 'percent' ); } - $percent = $percent ? $percent : 0; + if ( ! $percent ) { + $percent = $this->get_size_data( 'full', 'percent' ); + } + $percent = $percent ?: 0; return round( (float) $percent, 2 ); } diff --git a/classes/Optimization/Data/DataInterface.php b/classes/Optimization/Data/DataInterface.php index 3a6aa0768..26f4a7280 100644 --- a/classes/Optimization/Data/DataInterface.php +++ b/classes/Optimization/Data/DataInterface.php @@ -208,7 +208,7 @@ public function get_original_size( $human_format = true, $decimals = 2 ); /** * Get the file size of the full size file. - * If the WebP size is available, it is used. + * If the Nextgen size is available, it is used. * * @since 1.9 * @access public @@ -216,10 +216,10 @@ public function get_original_size( $human_format = true, $decimals = 2 ); * * @param bool $human_format True to display the image human format size (1Mb). * @param int $decimals Precision of number of decimal places. - * @param bool $use_webp Use the WebP size if available. + * @param bool $use_nextgen Use the Nextgen size if available. * @return string|int */ - public function get_optimized_size( $human_format = true, $decimals = 2, $use_webp = true ); + public function get_optimized_size( $human_format = true, $decimals = 2, $use_nextgen = true ); /** ----------------------------------------------------------------------------------------- */ diff --git a/classes/Optimization/Data/Noop.php b/classes/Optimization/Data/Noop.php index f134e268b..efa04181a 100644 --- a/classes/Optimization/Data/Noop.php +++ b/classes/Optimization/Data/Noop.php @@ -208,7 +208,7 @@ public function get_original_size( $human_format = true, $decimals = 2 ) { /** * Get the file size of the full size file. - * If the WebP size is available, it is used. + * If the Nextgen size is available, it is used. * * @since 1.9 * @access public @@ -216,10 +216,10 @@ public function get_original_size( $human_format = true, $decimals = 2 ) { * * @param bool $human_format True to display the image human format size (1Mb). * @param int $decimals Precision of number of decimal places. - * @param bool $use_webp Use the WebP size if available. + * @param bool $use_nextgen Use the Nextgen size if available. * @return string|int */ - public function get_optimized_size( $human_format = true, $decimals = 2, $use_webp = true ) { + public function get_optimized_size( $human_format = true, $decimals = 2, $use_nextgen = true ) { return $human_format ? imagify_size_format( 0, $decimals ) : 0; } diff --git a/classes/Optimization/Process/AbstractProcess.php b/classes/Optimization/Process/AbstractProcess.php index 6ec243805..bc1868aae 100644 --- a/classes/Optimization/Process/AbstractProcess.php +++ b/classes/Optimization/Process/AbstractProcess.php @@ -948,7 +948,7 @@ public function restore() { $media->update_dimensions(); // Delete the WebP version. - $this->delete_nextgen_file( $original_path ); + $this->delete_nextgen_file( $original_path, true ); // Restore the thumbnails. $response = $this->restore_thumbnails(); @@ -989,7 +989,7 @@ protected function restore_thumbnails() { * In that case we must also delete the next-gen file associated to the full size. */ $keep_full_next_gen = $media->get_raw_original_path() === $media->get_raw_fullsize_path(); - $this->delete_nextgen_files( $keep_full_next_gen ); + $this->delete_nextgen_files( $keep_full_next_gen, true ); // Generate new thumbnails. return $media->generate_thumbnails(); diff --git a/classes/Webp/Display.php b/classes/Webp/Display.php index 47fe7eb20..3198a9d94 100644 --- a/classes/Webp/Display.php +++ b/classes/Webp/Display.php @@ -53,12 +53,14 @@ public function maybe_add_rewrite_rules( $values ) { } $enabled = isset( $values['display_nextgen'] ) ? true : false; + $was_enabled = (bool) get_imagify_option( 'display_nextgen' ); + $result = false; - if ( $enabled ) { + if ( $enabled && ! $was_enabled ) { // Add the WebP file type. $result = $this->get_server_conf()->add(); - } elseif ( ! $enabled ) { + } elseif ( ! $enabled && $was_enabled ) { // Remove the WebP file type. $result = $this->get_server_conf()->remove(); } diff --git a/imagify.php b/imagify.php index 5174332b3..7948a5b80 100644 --- a/imagify.php +++ b/imagify.php @@ -3,9 +3,9 @@ * Plugin Name: Imagify * Plugin URI: https://wordpress.org/plugins/imagify/ * Description: Dramatically reduce image file sizes without losing quality, make your website load faster, boost your SEO and save money on your bandwidth using Imagify, the new most advanced image optimization tool. - * Version: 2.2.0.1 + * Version: 2.2.1 * Requires at least: 5.3 - * Requires PHP: 7.0 + * Requires PHP: 7.3 * Author: Imagify – Optimize Images & Convert WebP & Avif * Author URI: https://imagify.io * Licence: GPLv2 @@ -19,7 +19,7 @@ defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); // Imagify defines. -define( 'IMAGIFY_VERSION', '2.2.0.1' ); +define( 'IMAGIFY_VERSION', '2.2.1' ); define( 'IMAGIFY_SLUG', 'imagify' ); define( 'IMAGIFY_FILE', __FILE__ ); define( 'IMAGIFY_PATH', realpath( plugin_dir_path( IMAGIFY_FILE ) ) . '/' ); diff --git a/inc/3rd-party/WooCommerce/class-woocommerce.php b/inc/3rd-party/WooCommerce/class-woocommerce.php index 6b994b1e9..05f88bb15 100644 --- a/inc/3rd-party/WooCommerce/class-woocommerce.php +++ b/inc/3rd-party/WooCommerce/class-woocommerce.php @@ -15,17 +15,17 @@ class WooCommerce { * @return void */ public function init() { - add_action( 'woocommerce_single_product_summary', [ $this, 'variable_products_webp_compat' ] ); + add_action( 'woocommerce_single_product_summary', [ $this, 'variable_products_nextgen_compat' ] ); } /** - * Add Variable Products Webp Compatibility. + * Add Variable Products Next-gen images Compatibility. * * @since 1.10.0 * * @return void */ - public function variable_products_webp_compat() { + public function variable_products_nextgen_compat() { global $product; if ( ! isset( $product ) || ! $product->is_type( 'variable' ) ) { diff --git a/inc/3rd-party/amp/amp.php b/inc/3rd-party/amp/amp.php index 4079d653c..a79554e8e 100755 --- a/inc/3rd-party/amp/amp.php +++ b/inc/3rd-party/amp/amp.php @@ -6,12 +6,11 @@ */ if ( function_exists( 'is_amp_endpoint' ) ) : - add_filter( 'imagify_allow_picture_tags_for_webp', 'imagify_amp_disable_picture_on_endpoint' ); + add_filter( 'imagify_allow_picture_tags_for_nextgen', 'imagify_amp_disable_picture_on_endpoint' ); /** * Do not use tags in AMP pages. * - * @since 1.9 - * @author Grégory Viguier + * @since 1.9 * * @param bool $allow True to allow the use of tags (default). False to prevent their use. * @return bool diff --git a/inc/3rd-party/enable-media-replace/classes/Main.php b/inc/3rd-party/enable-media-replace/classes/Main.php index 12896eb4d..5bf96e80e 100755 --- a/inc/3rd-party/enable-media-replace/classes/Main.php +++ b/inc/3rd-party/enable-media-replace/classes/Main.php @@ -5,8 +5,6 @@ use Imagify_Enable_Media_Replace_Deprecated; use Imagify_Filesystem; -defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); - /** * Compat class for Enable Media Replace plugin. * @@ -40,12 +38,12 @@ class Main extends Imagify_Enable_Media_Replace_Deprecated { protected $old_backup_path; /** - * List of paths to the old WebP files. + * List of paths to the old next-gen files. * * @var array * @since 1.9.8 */ - protected $old_webp_paths = []; + protected $old_nextgen_paths = []; /** * Launch the hooks before the files and data are replaced. @@ -84,29 +82,26 @@ public function init( $args = [] ) { } /** - * Keep track of existing WebP files. + * Keep track of existing next-gen files. * - * Whether the user chooses to rename the files or not, we will need to delete the current WebP files before creating new ones: + * Whether the user chooses to rename the files or not, we will need to delete the current next-gen files before creating new ones: * - Rename the files: the old ones must be removed, they are useless now. * - Do not rename the files: the thumbnails may still get new names because of the suffix containing the image dimensions, which may differ (for example when thumbnails are scaled, not cropped). - * In this last case, the thumbnails with the old dimensions are removed from the drive and from the WP’s post meta, so there is no need of keeping orphan WebP files that would stay on the drive for ever, even after the attachment is deleted from WP. + * In this last case, the thumbnails with the old dimensions are removed from the drive and from the WP’s post meta, so there is no need of keeping orphan next-gen files that would stay on the drive for ever, even after the attachment is deleted from WP. */ foreach ( $this->process->get_media()->get_media_files() as $media_file ) { - $this->old_webp_paths[] = imagify_path_to_webp( $media_file['path'] ); + foreach ( [ 'avif', 'webp' ] as $format ) { + $this->old_nextgen_paths[] = imagify_path_to_nextgen( $media_file['path'], $format ); + } } - // Delete the old backup file and old WebP files. + // Delete the old backup file and old next-gen files. add_action( 'imagify_before_auto_optimization', [ $this, 'delete_backup' ] ); add_action( 'imagify_not_optimized_attachment_updated', [ $this, 'delete_backup' ] ); } - - /** ----------------------------------------------------------------------------------------- */ - /** HOOKS =================================================================================== */ - /** ----------------------------------------------------------------------------------------- */ - /** - * Delete previous backup file and WebP files. + * Delete previous backup file and next-gen files. * This is done after the images have been already replaced by Enable Media Replace. * * @since 1.8.4 @@ -126,19 +121,14 @@ public function delete_backup( $media_id ) { $this->old_backup_path = false; } - if ( ! empty( $this->old_webp_paths ) ) { - // Delete old WebP files. - $this->old_webp_paths = array_filter( $this->old_webp_paths, [ $filesystem, 'exists' ] ); - array_map( [ $filesystem, 'delete' ], $this->old_webp_paths ); - $this->old_webp_paths = []; + if ( ! empty( $this->old_nextgen_paths ) ) { + // Delete old next-gen files. + $this->old_nextgen_paths = array_filter( $this->old_nextgen_paths, [ $filesystem, 'exists' ] ); + array_map( [ $filesystem, 'delete' ], $this->old_nextgen_paths ); + $this->old_nextgen_paths = []; } } - - /** ----------------------------------------------------------------------------------------- */ - /** TOOLS =================================================================================== */ - /** ----------------------------------------------------------------------------------------- */ - /** * Get the optimization process corresponding to the current media. * diff --git a/inc/3rd-party/nextgen-gallery/classes/Bulk/NGG.php b/inc/3rd-party/nextgen-gallery/classes/Bulk/NGG.php index 38751bd19..740c8deea 100644 --- a/inc/3rd-party/nextgen-gallery/classes/Bulk/NGG.php +++ b/inc/3rd-party/nextgen-gallery/classes/Bulk/NGG.php @@ -142,7 +142,7 @@ public function get_optimized_media_ids_without_format( $format ) { ) ); $wpdb->flush(); - unset( $ngg_table, $data_table, $webp_suffix ); + unset( $ngg_table, $data_table, $suffix ); $data = [ 'ids' => [], @@ -169,7 +169,7 @@ public function get_optimized_media_ids_without_format( $format ) { $backup_path = get_imagify_ngg_attachment_backup_path( $file_path ); if ( ! $this->filesystem->exists( $backup_path ) ) { - // No backup, no WebP. + // No backup, no next-gen. $data['errors']['no_backup'][] = $file_id; continue; } diff --git a/inc/3rd-party/nextgen-gallery/inc/common/attachments.php b/inc/3rd-party/nextgen-gallery/inc/common/attachments.php index f13b8cd7b..03ea6f061 100644 --- a/inc/3rd-party/nextgen-gallery/inc/common/attachments.php +++ b/inc/3rd-party/nextgen-gallery/inc/common/attachments.php @@ -150,74 +150,80 @@ function _imagify_ngg_media_library_imported_image_data( $image, $attachment ) { } /** - * WebP for the full size. + * Next-gen for the full size. * Look for an existing copy locally: * - if it exists, copy it (and its optimization data), * - if not, add it to the optimization queue. */ - $add_full_webp = $wp_media->is_image() && get_imagify_option( 'convert_to_webp' ); + $add_full_nextgen = $wp_media->is_image(); - if ( $add_full_webp ) { - // It's a supported image and WebP conversion is enabled. - $wp_full_path_webp = false; - $webp_size_name = 'full' . $wp_process::WEBP_SUFFIX; - $wp_webp_data = $wp_data->get_size_data( $webp_size_name ); + if ( $add_full_nextgen ) { + $formats = [ + 'avif' => $wp_process::AVIF_SUFFIX, + 'webp' => $wp_process::WEBP_SUFFIX, + ]; - // Get the path to the WebP image if it exists. - $wp_full_path_webp = $wp_process->get_fullsize_file()->get_path_to_webp(); + foreach ( $formats as $extension => $suffix ) { + $wp_full_path_nextgen = false; + $nextgen_size_name = 'full' . $suffix; + $wp_nextgen_data = $wp_data->get_size_data( $nextgen_size_name ); - if ( $wp_full_path_webp && ! $filesystem->exists( $wp_full_path_webp ) ) { - $wp_full_path_webp = false; - } + // Get the path to the next-gen image if it exists. + $wp_full_path_nextgen = $wp_process->get_fullsize_file()->get_path_to_nextgen( $extension ); + + if ( $wp_full_path_nextgen && ! $filesystem->exists( $wp_full_path_nextgen ) ) { + $wp_full_path_nextgen = false; + } - if ( $wp_full_path_webp ) { - // We know we have a WebP version. Make sure we have the right data. - $wp_webp_data['success'] = true; + if ( $wp_full_path_nextgen ) { + // We know we have a next-gen version. Make sure we have the right data. + $wp_nextgen_data['success'] = true; - if ( empty( $wp_webp_data['original_size'] ) ) { - // The WebP data is missing. - $full_size_weight = $wp_full_size_data['original_size']; + if ( empty( $wp_nextgen_data['original_size'] ) ) { + // The next-gen data is missing. + $full_size_weight = $wp_full_size_data['original_size']; - if ( ! $full_size_weight && $wp_backup_path ) { - // For some reason we don't have the original file weight, but we can get it from the backup file. - $full_size_weight = $filesystem->size( $wp_backup_path ); + if ( ! $full_size_weight && $wp_backup_path ) { + // For some reason we don't have the original file weight, but we can get it from the backup file. + $full_size_weight = $filesystem->size( $wp_backup_path ); - if ( $full_size_weight ) { - $wp_webp_data['original_size'] = $full_size_weight; + if ( $full_size_weight ) { + $wp_nextgen_data['original_size'] = $full_size_weight; + } } } - } - if ( ! empty( $wp_webp_data['original_size'] ) && empty( $wp_webp_data['optimized_size'] ) ) { - // The WebP file size. - $wp_webp_data['optimized_size'] = $filesystem->size( $wp_full_path_webp ); - } + if ( ! empty( $wp_nextgen_data['original_size'] ) && empty( $wp_nextgen_data['optimized_size'] ) ) { + // The next-gen file size. + $wp_nextgen_data['optimized_size'] = $filesystem->size( $wp_full_path_nextgen ); + } - if ( empty( $wp_webp_data['original_size'] ) || empty( $wp_webp_data['optimized_size'] ) ) { - // We must have both original and optimized sizes. - $wp_webp_data = []; + if ( empty( $wp_nextgen_data['original_size'] ) || empty( $wp_nextgen_data['optimized_size'] ) ) { + // We must have both original and optimized sizes. + $wp_nextgen_data = []; + } } - } - if ( $wp_full_path_webp && $wp_webp_data ) { - // We have the file and the data. - // Copy the file. - $ngg_full_file = new File( $ngg_media->get_raw_fullsize_path() ); - $ngg_full_path_webp = $ngg_full_file->get_path_to_webp(); // Destination. + if ( $wp_full_path_nextgen && $wp_nextgen_data ) { + // We have the file and the data. + // Copy the file. + $ngg_full_file = new File( $ngg_media->get_raw_fullsize_path() ); + $ngg_full_path_nextgen = $ngg_full_file->get_path_to_nextgen( $extension ); // Destination. - if ( $ngg_full_path_webp ) { - $copied = $filesystem->copy( $wp_full_path_webp, $ngg_full_path_webp, true ); + if ( $ngg_full_path_nextgen ) { + $copied = $filesystem->copy( $wp_full_path_nextgen, $ngg_full_path_nextgen, true ); - if ( $copied ) { - // Success. - $filesystem->chmod_file( $ngg_full_path_webp ); - $add_full_webp = false; + if ( $copied ) { + // Success. + $filesystem->chmod_file( $ngg_full_path_nextgen ); + $add_full_nextgen = false; + } } - } - if ( ! $add_full_webp ) { - // The WebP file has been successfully copied: now, copy the data. - $ngg_process->get_data()->update_size_optimization_data( $webp_size_name, $wp_webp_data ); + if ( ! $add_full_nextgen ) { + // The next-gen file has been successfully copied: now, copy the data. + $ngg_process->get_data()->update_size_optimization_data( $nextgen_size_name, $wp_nextgen_data ); + } } } } @@ -226,9 +232,20 @@ function _imagify_ngg_media_library_imported_image_data( $image, $attachment ) { $sizes = $ngg_media->get_media_files(); unset( $sizes['full'] ); - if ( $add_full_webp ) { - // We could not use a local WebP copy: ask for a new one. - $sizes[ $webp_size_name ] = []; + if ( $add_full_nextgen ) { + // We could not use a local next-gen copy: ask for a new one. + + $formats = imagify_nextgen_images_formats(); + + foreach ( $formats as $format ) { + if ( 'webp' === $format ) { + $suffix = $wp_process::WEBP_SUFFIX; + } elseif ( 'avif' === $format ) { + $suffix = $wp_process::AVIF_SUFFIX; + } + + $sizes[ 'full' . $suffix ] = []; + } } if ( ! $sizes ) { @@ -282,7 +299,7 @@ function imagify_ngg_cleanup_after_media_deletion( $image_id, $image ) { /** * The backup file has already been deleted by NGG. - * Delete the WebP versions and the optimization data. + * Delete the next-gen versions and the optimization data. */ $process->delete_nextgen_files(); diff --git a/inc/3rd-party/regenerate-thumbnails/classes/Main.php b/inc/3rd-party/regenerate-thumbnails/classes/Main.php index 41f2b4878..e8655721c 100644 --- a/inc/3rd-party/regenerate-thumbnails/classes/Main.php +++ b/inc/3rd-party/regenerate-thumbnails/classes/Main.php @@ -158,19 +158,19 @@ public function launch_async_optimization( $metadata, $media_id ) { /** * Optimize the sizes that have been regenerated. */ - // If the media has WebP versions, recreate them for the sizes that have been regenerated. + // If the media has next-gen versions, recreate them for the sizes that have been regenerated. $data = $process->get_data(); $optimization_data = $data->get_optimization_data(); if ( ! empty( $optimization_data['sizes'] ) ) { foreach ( $optimization_data['sizes'] as $size_name => $size_data ) { - $non_webp_size_name = $process->is_size_next_gen( $size_name ); + $non_nextgen_size_name = $process->is_size_next_gen( $size_name ); - if ( ! $non_webp_size_name || ! isset( $sizes[ $non_webp_size_name ] ) ) { + if ( ! $non_nextgen_size_name || ! isset( $sizes[ $non_nextgen_size_name ] ) ) { continue; } - // Add the WebP size. + // Add the next-gen size. $sizes[ $size_name ] = []; } } diff --git a/inc/admin/meta-boxes.php b/inc/admin/meta-boxes.php index e87475c3b..daf801d30 100755 --- a/inc/admin/meta-boxes.php +++ b/inc/admin/meta-boxes.php @@ -83,7 +83,8 @@ function _imagify_attachment_submitbox_misc_actions() { if ( $media->has_backup() && $data->is_optimized() ) { ?> - + + is_media_page(); $is_library_page = Imagify_Views::get_instance()->is_wp_library_page(); - $output = $is_media_page ? '' : '
    '; + $output = $is_media_page ? '' : '
      '; $output_before = $is_media_page ? '' : '
    • '; $output_after = $is_media_page ? '
      ' : '
    • '; $reoptimize_link = get_imagify_attachment_reoptimize_link( $process ); diff --git a/readme.txt b/readme.txt index 2bffa2737..e263684f9 100644 --- a/readme.txt +++ b/readme.txt @@ -1,8 +1,9 @@ === Imagify – Optimize Images & Convert WebP & AVIF | Compress Images Easily === Contributors: wp_rocket, imagify Tags: optimize images, convert webp, webp converter, convert AVIF, webp to AVIF, AVIF plugin, AVIF converter, image optimization, compress images, image compressor, resize images, reduce image size, performance, image optimizer, core web vitals, best image optimization plugin -Tested up to: 6.4 -Stable tag: 2.2.0.1 +Tested up to: 6.5 +Stable tag: 2.2.1 +Requires PHP: 7.3 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -261,6 +262,17 @@ You can report any security bugs found in the source code of the site-reviews pl 4. Other Media Page == Changelog == += 2.2.1 = +- Enhancement: Prevent updating .htaccess when switching between AVIF and WEBP generation features +- Enhancement: Display the smallest size of the image in the Media Library image details section +- Enhancement: Correctly delete all Next-Gen versions when restoring the Original Image +- Enhancement: Bump minimum version to PHP7.3 +- Bugfix: Fix the problem with progress bar when disabling AVIF generation +- Bugfix: Fix a bug when number of images in the Bulk Optimization section was not correct +- Bugfix: Fix the original/optimized image comparision bug +- 3rd-party compatibility: Update compatibility with Next-Gen Gallery to match AVIF images +- 3rd-party compatibility: Update compatibility with AMP, Regenerate Thumbnails and WooCommerce to work correctly with AVIF images + = 2.2.0.1 = - Bugfix: Preserve "Display images in webp format" configuration when updating.