diff --git a/README.txt b/README.txt
index a9b22f5..fdd2a16 100644
--- a/README.txt
+++ b/README.txt
@@ -1,13 +1,13 @@
=== PDF Compressor & Watermark - iLovePDF ===
Plugin Name: Image Compressor & Optimizer - iLovePDF
-Version: 2.1.4
+Version: 2.1.5
Author: iLovePDF
Author URI: https://www.ilovepdf.com/
Contributors: iLovePDF
Tags: compress, watermark, optimize, performance, pdf optimizer
Requires at least: 5.3
-Tested up to: 6.6.2
-Stable tag: 2.1.4
+Tested up to: 6.7
+Stable tag: 2.1.5
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -81,6 +81,18 @@ We will send you an email before limit is reached. When limit is reached, no mor
== Changelog ==
+= 2.1.5 =
+Improved
+* Update Libraries.
+* Improved texts.
+* Compatibility with WordPress 6.7
+* Sweetalert library removed.
+* Improved multisite support.
+
+Fixed
+* API call at an unnecessary time when the user is not logged in.
+* Directories are now created correctly in multisites.
+
= 2.1.4 =
Improved
* Update Libraries.
diff --git a/admin/Ilove_Pdf_Admin.php b/admin/Ilove_Pdf_Admin.php
index f1bc7c5..22cad9c 100644
--- a/admin/Ilove_Pdf_Admin.php
+++ b/admin/Ilove_Pdf_Admin.php
@@ -106,8 +106,7 @@ public function enqueue_scripts() {
global $pagenow;
if ( ( 'upload.php' === $pagenow || 'options-general.php' === $pagenow || 'media-new.php' === $pagenow || 'post.php' === $pagenow ) && get_current_screen()->post_type !== 'product' ) {
- wp_enqueue_script( 'ilove-pdf-admin', plugins_url( '/assets/js/main.min.js', __DIR__ ), array( 'wp-color-picker', 'sweetalert-js-ilovepdf' ), '1.0.0', true );
- wp_enqueue_script( 'sweetalert-js-ilovepdf', plugins_url( '/assets/js/sweetalert2.all.min.js', __DIR__ ), array(), '11.11.0', true );
+ wp_enqueue_script( 'ilove-pdf-admin', plugins_url( '/assets/js/main.min.js', __DIR__ ), array( 'wp-color-picker' ), '1.0.0', true );
}
}
diff --git a/admin/compress-settings.php b/admin/compress-settings.php
index 003e8c8..6c3f019 100644
--- a/admin/compress-settings.php
+++ b/admin/compress-settings.php
@@ -16,10 +16,6 @@
*/
function ilove_pdf_initialize_options_compress() {
- if ( false === get_option( 'ilove_pdf_display_settings_compress' ) ) {
- add_option( 'ilove_pdf_display_settings_compress' );
- }
-
add_settings_section(
'compress_settings_section',
'',
diff --git a/admin/functions-compress.php b/admin/functions-compress.php
index f95e9d3..3445b78 100644
--- a/admin/functions-compress.php
+++ b/admin/functions-compress.php
@@ -222,7 +222,7 @@ function ilove_pdf_handle_file_upload_compress( $attachment_id ) {
wp_strip_all_tags( $html ) );
wp_send_json_error( $return );
diff --git a/admin/functions-processed-files.php b/admin/functions-processed-files.php
index c2de447..90dba19 100644
--- a/admin/functions-processed-files.php
+++ b/admin/functions-processed-files.php
@@ -9,6 +9,8 @@
* @subpackage Ilove_Pdf/admin
*/
+use Ilove_Pdf_Includes\Ilove_Pdf;
+
/**
* Check if file is compressed.
*
@@ -57,7 +59,7 @@ function ilove_pdf_upload_compress_file( $filename, $attachment_id ) {
if ( get_option( 'ilovepdf_compressed_files' ) || get_option( 'ilovepdf_compressed_files' ) === '0' ) {
$n_compressed_files = intval( get_option( 'ilovepdf_compressed_files' ) ) + 1;
- update_option( 'ilovepdf_compressed_files', $n_compressed_files );
+ Ilove_Pdf::update_option( 'ilovepdf_compressed_files', $n_compressed_files );
} else {
add_option( 'ilovepdf_compressed_files', 1 );
}
@@ -98,7 +100,7 @@ function ilove_pdf_upload_watermark_file( $filename, $attachment_id ) {
if ( get_option( 'ilovepdf_watermarked_files' ) || get_option( 'ilovepdf_watermarked_files' ) === '0' ) {
$n_watermarked_files = intval( get_option( 'ilovepdf_watermarked_files' ) ) + 1;
- update_option( 'ilovepdf_watermarked_files', $n_watermarked_files );
+ Ilove_Pdf::update_option( 'ilovepdf_watermarked_files', $n_watermarked_files );
} else {
add_option( 'ilovepdf_watermarked_files', 1 );
@@ -122,7 +124,7 @@ function ilove_pdf_restore_pdf( $attachment_id ) {
if ( get_option( 'ilovepdf_compressed_files' ) === 1 ) {
delete_option( 'ilovepdf_compressed_files' );
} else {
- update_option( 'ilovepdf_compressed_files', get_option( 'ilovepdf_compressed_files' ) - 1 );
+ Ilove_Pdf::update_option( 'ilovepdf_compressed_files', get_option( 'ilovepdf_compressed_files' ) - 1 );
if ( get_option( 'ilovepdf_compressed_files' ) <= '0' ) {
delete_option( 'ilovepdf_compressed_files' ); }
}
@@ -132,7 +134,7 @@ function ilove_pdf_restore_pdf( $attachment_id ) {
if ( get_option( 'ilovepdf_watermarked_files' ) === 1 ) {
delete_option( 'ilovepdf_watermarked_files' );
} else {
- update_option( 'ilovepdf_watermarked_files', get_option( 'ilovepdf_watermarked_files' ) - 1 );
+ Ilove_Pdf::update_option( 'ilovepdf_watermarked_files', get_option( 'ilovepdf_watermarked_files' ) - 1 );
if ( get_option( 'ilovepdf_watermarked_files' ) <= '0' ) {
delete_option( 'ilovepdf_watermarked_files' ); }
}
@@ -161,14 +163,14 @@ function ilove_pdf_handle_delete_file( $attachment_id ) {
if ( get_post_meta( $attachment_id, '_wp_attached_original_size', true ) ) {
$result = get_option( 'ilovepdf_initial_pdf_files_size' ) - get_post_meta( $attachment_id, '_wp_attached_original_size', true );
}
- update_option( 'ilovepdf_initial_pdf_files_size', $result );
+ Ilove_Pdf::update_option( 'ilovepdf_initial_pdf_files_size', $result );
$wp_upload_dir = wp_upload_dir();
$file_name = basename( get_attached_file( $attachment_id ) );
if ( ilove_pdf_is_file_compressed( $attachment_id ) ) {
if ( get_option( 'ilovepdf_compressed_files' ) === 1 ) {
delete_option( 'ilovepdf_compressed_files' );
} else {
- update_option( 'ilovepdf_compressed_files', get_option( 'ilovepdf_compressed_files' ) - 1 );
+ Ilove_Pdf::update_option( 'ilovepdf_compressed_files', get_option( 'ilovepdf_compressed_files' ) - 1 );
if ( get_option( 'ilovepdf_compressed_files' ) <= '0' ) {
delete_option( 'ilovepdf_compressed_files' ); }
}
@@ -178,7 +180,7 @@ function ilove_pdf_handle_delete_file( $attachment_id ) {
if ( get_option( 'ilovepdf_watermarked_files' ) === 1 ) {
delete_option( 'ilovepdf_watermarked_files' );
} else {
- update_option( 'ilovepdf_watermarked_files', get_option( 'ilovepdf_watermarked_files' ) - 1 );
+ Ilove_Pdf::update_option( 'ilovepdf_watermarked_files', get_option( 'ilovepdf_watermarked_files' ) - 1 );
if ( get_option( 'ilovepdf_watermarked_files' ) <= '0' ) {
delete_option( 'ilovepdf_watermarked_files' ); }
}
@@ -209,7 +211,7 @@ function ilove_pdf_handle_file_upload_compress_watermark( $attachment_id ) {
if ( get_post_mime_type( $attachment_id ) === 'application/pdf' ) {
$options_compress = get_option( 'ilove_pdf_display_settings_compress' );
$options_watermark = get_option( 'ilove_pdf_display_settings_watermark' );
- update_option( 'ilovepdf_initial_pdf_files_size', get_option( 'ilovepdf_initial_pdf_files_size' ) + filesize( get_attached_file( $attachment_id ) ) );
+ Ilove_Pdf::update_option( 'ilovepdf_initial_pdf_files_size', get_option( 'ilovepdf_initial_pdf_files_size' ) + filesize( get_attached_file( $attachment_id ) ) );
if ( isset( $options_compress['ilove_pdf_compress_autocompress_new'] ) && isset( $options_watermark['ilove_pdf_watermark_auto'] ) ) {
$html_compress = ilove_pdf_compress_pdf( $attachment_id, true );
diff --git a/admin/functions-watermark.php b/admin/functions-watermark.php
index 8eefcec..dfa9317 100644
--- a/admin/functions-watermark.php
+++ b/admin/functions-watermark.php
@@ -277,7 +277,7 @@ function ilove_pdf_handle_file_upload_watermark( $attachment_id ) {
wp_strip_all_tags( $html ) );
wp_send_json_error( $return );
diff --git a/admin/general-settings.php b/admin/general-settings.php
index 5360529..40b6282 100644
--- a/admin/general-settings.php
+++ b/admin/general-settings.php
@@ -9,6 +9,8 @@
* @subpackage Ilove_Pdf/admin
*/
+use Ilove_Pdf_Includes\Ilove_Pdf;
+
/**
* Register Options
*
@@ -131,8 +133,8 @@ function ilove_pdf_logout_action() {
function ilove_pdf_change_project_action() {
if ( isset( $_GET['action'] ) && 'ilovepdf_change_project' === $_GET['action'] && isset( $_POST['nonce_ilove_pdf_change_project'] ) && wp_verify_nonce( sanitize_key( $_POST['nonce_ilove_pdf_change_project'] ), 'admin-post' ) && isset( $_POST['ilovepdf_select_project'] ) ) {
$stats = ilove_pdf_get_statistics();
- update_option( 'ilovepdf_user_private_key', $stats['projects'][ sanitize_text_field( wp_unslash( $_POST['ilovepdf_select_project'] ) ) ]['secret_key'] );
- update_option( 'ilovepdf_user_public_key', $stats['projects'][ sanitize_text_field( wp_unslash( $_POST['ilovepdf_select_project'] ) ) ]['public_key'] );
+ Ilove_Pdf::update_option( 'ilovepdf_user_private_key', $stats['projects'][ sanitize_text_field( wp_unslash( $_POST['ilovepdf_select_project'] ) ) ]['secret_key'] );
+ Ilove_Pdf::update_option( 'ilovepdf_user_public_key', $stats['projects'][ sanitize_text_field( wp_unslash( $_POST['ilovepdf_select_project'] ) ) ]['public_key'] );
}
wp_safe_redirect( wp_get_referer() );
diff --git a/admin/partials/ilove-pdf-settings-display.php b/admin/partials/ilove-pdf-settings-display.php
index c466f51..b902fe0 100644
--- a/admin/partials/ilove-pdf-settings-display.php
+++ b/admin/partials/ilove-pdf-settings-display.php
@@ -115,7 +115,7 @@ function ilove_pdf_content_page_setting() {
\n
\n
\n
\n',n=n.replace(/ style=".*?"/g,"");else if("error"===e.icon)o='\n
\n \n \n \n';else if(e.icon){o=zt({question:"?",warning:"!",info:"i"}[e.icon])}n.trim()!==o.trim()&&Q(t,o)}},Ut=function(t,e){if(e.iconColor){t.style.color=e.iconColor,t.style.borderColor=e.iconColor;for(var n=0,o=[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"];n
').concat(t," ")},Wt=function(t,e){var n=e.showClass||{};t.className="".concat(w.popup," ").concat(mt(t)?n.popup:""),e.toast?(rt([document.documentElement,document.body],w["toast-shown"]),rt(t,w.toast)):rt(t,w.modal),et(t,e,"popup"),"string"==typeof e.customClass&&rt(t,e.customClass),e.icon&&rt(t,w["icon-".concat(e.icon)])},Kt=function(t){var e=document.createElement("li");return rt(e,w["progress-step"]),Q(e,t),e},Yt=function(t){var e=document.createElement("li");return rt(e,w["progress-step-line"]),t.progressStepsDistance&&ut(e,"width",t.progressStepsDistance),e},Zt=function(t,e){!function(t,e){var n=j(),o=H();if(n&&o){if(e.toast){ut(n,"width",e.width),o.style.width="100%";var i=W();i&&o.insertBefore(i,D())}else ut(o,"width",e.width);ut(o,"padding",e.padding),e.color&&(o.style.color=e.color),e.background&&(o.style.background=e.background),lt(N()),Wt(o,e)}}(0,e),xt(0,e),function(t,e){var n=R();if(n){var o=e.progressSteps,i=e.currentProgressStep;o&&0!==o.length&&void 0!==i?(st(n),n.textContent="",i>=o.length&&E("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),o.forEach((function(t,r){var a=Kt(t);if(n.appendChild(a),r===i&&rt(a,w["active-progress-step"]),r!==o.length-1){var c=Yt(e);n.appendChild(c)}}))):lt(n)}}(0,e),function(t,e){var n=St.innerParams.get(t),o=D();if(o){if(n&&e.icon===n.icon)return Ft(o,e),void Rt(o,e);if(e.icon||e.iconHtml){if(e.icon&&-1===Object.keys(C).indexOf(e.icon))return P('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(e.icon,'"')),void lt(o);st(o),Ft(o,e),Rt(o,e),rt(o,e.showClass&&e.showClass.icon)}else lt(o)}}(t,e),function(t,e){var n=_();n&&(e.imageUrl?(st(n,""),n.setAttribute("src",e.imageUrl),n.setAttribute("alt",e.imageAlt||""),ut(n,"width",e.imageWidth),ut(n,"height",e.imageHeight),n.className=w.image,et(n,e,"image")):lt(n))}(0,e),function(t,e){var n=q();n&&(dt(n),pt(n,e.title||e.titleText,"block"),e.title&&At(e.title,n),e.titleText&&(n.innerText=e.titleText),et(n,e,"title"))}(0,e),function(t,e){var n=$();n&&(Q(n,e.closeButtonHtml||""),et(n,e,"closeButton"),pt(n,e.showCloseButton),n.setAttribute("aria-label",e.closeButtonAriaLabel||""))}(0,e),_t(t,e),Bt(0,e),function(t,e){var n=Y();n&&(dt(n),pt(n,e.footer,"block"),e.footer&&At(e.footer,n),et(n,e,"footer"))}(0,e);var n=H();"function"==typeof e.didRender&&n&&e.didRender(n)},$t=function(){var t;return null===(t=F())||void 0===t?void 0:t.click()},Jt=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),Xt=function(t){t.keydownTarget&&t.keydownHandlerAdded&&(t.keydownTarget.removeEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!1)},Gt=function(t,e){var n,o=J();if(o.length)return(t+=e)===o.length?t=0:-1===t&&(t=o.length-1),void o[t].focus();null===(n=H())||void 0===n||n.focus()},Qt=["ArrowRight","ArrowDown"],te=["ArrowLeft","ArrowUp"],ee=function(t,e,n){t&&(e.isComposing||229===e.keyCode||(t.stopKeydownPropagation&&e.stopPropagation(),"Enter"===e.key?ne(e,t):"Tab"===e.key?oe(e):[].concat(Qt,te).includes(e.key)?ie(e.key):"Escape"===e.key&&re(e,t,n)))},ne=function(t,e){if(x(e.allowEnterKey)){var n=nt(H(),e.input);if(t.target&&n&&t.target instanceof HTMLElement&&t.target.outerHTML===n.outerHTML){if(["textarea","file"].includes(e.input))return;$t(),t.preventDefault()}}},oe=function(t){for(var e=t.target,n=J(),o=-1,i=0;i1},pe=null,me=function(t){null===pe&&(document.body.scrollHeight>window.innerHeight||"scroll"===t)&&(pe=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(pe+function(){var t=document.createElement("div");t.className=w["scrollbar-measure"],document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e}(),"px"))};function he(t,e,n,o){G()?ke(t,o):(b(n).then((function(){return ke(t,o)})),Xt(g)),ue?(e.setAttribute("style","display:none !important"),e.removeAttribute("class"),e.innerHTML=""):e.remove(),X()&&(null!==pe&&(document.body.style.paddingRight="".concat(pe,"px"),pe=null),function(){if(tt(document.body,w.iosfix)){var t=parseInt(document.body.style.top,10);at(document.body,w.iosfix),document.body.style.top="",document.body.scrollTop=-1*t}}(),ce()),at([document.documentElement,document.body],[w.shown,w["height-auto"],w["no-backdrop"],w["toast-shown"]])}function ve(t){t=we(t);var e=ae.swalPromiseResolve.get(this),n=ge(this);this.isAwaitingPromise?t.isDismissed||(ye(this),e(t)):n&&e(t)}var ge=function(t){var e=H();if(!e)return!1;var n=St.innerParams.get(t);if(!n||tt(e,n.hideClass.popup))return!1;at(e,n.showClass.popup),rt(e,n.hideClass.popup);var o=j();return at(o,n.showClass.backdrop),rt(o,n.hideClass.backdrop),Ce(t,e,n),!0};function be(t){var e=ae.swalPromiseReject.get(this);ye(this),e&&e(t)}var ye=function(t){t.isAwaitingPromise&&(delete t.isAwaitingPromise,St.innerParams.get(t)||t._destroy())},we=function(t){return void 0===t?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},t)},Ce=function(t,e,n){var o=j(),i=Pt&&vt(e);"function"==typeof n.willClose&&n.willClose(e),i?Ae(t,e,o,n.returnFocus,n.didClose):he(t,o,n.returnFocus,n.didClose)},Ae=function(t,e,n,o,i){Pt&&(g.swalCloseEventFinishedCallback=he.bind(null,t,n,o,i),e.addEventListener(Pt,(function(t){t.target===e&&(g.swalCloseEventFinishedCallback(),delete g.swalCloseEventFinishedCallback)})))},ke=function(t,e){setTimeout((function(){"function"==typeof e&&e.bind(t.params)(),t._destroy&&t._destroy()}))},Ee=function(t){var e=H();if(e||new io,e=H()){var n=W();G()?lt(D()):Pe(e,t),st(n),e.setAttribute("data-loading","true"),e.setAttribute("aria-busy","true"),e.focus()}},Pe=function(t,e){var n=K(),o=W();n&&o&&(!e&&mt(F())&&(e=F()),st(n),e&&(lt(e),o.setAttribute("data-button-to-replace",e.className),n.insertBefore(o,e)),rt([t,n],w.loading))},Be=function(t){return t.checked?1:0},Te=function(t){return t.checked?t.value:null},xe=function(t){return t.files&&t.files.length?null!==t.getAttribute("multiple")?t.files:t.files[0]:null},Se=function(t,e){var n=H();if(n){var o=function(t){"select"===e.input?function(t,e,n){var o=ct(t,w.select);if(!o)return;var i=function(t,e,o){var i=document.createElement("option");i.value=o,Q(i,e),i.selected=je(o,n.inputValue),t.appendChild(i)};e.forEach((function(t){var e=t[0],n=t[1];if(Array.isArray(n)){var r=document.createElement("optgroup");r.label=e,r.disabled=!1,o.appendChild(r),n.forEach((function(t){return i(r,t[1],t[0])}))}else i(o,n,e)})),o.focus()}(n,Le(t),e):"radio"===e.input&&function(t,e,n){var o=ct(t,w.radio);if(!o)return;e.forEach((function(t){var e=t[0],i=t[1],r=document.createElement("input"),a=document.createElement("label");r.type="radio",r.name=w.radio,r.value=e,je(e,n.inputValue)&&(r.checked=!0);var c=document.createElement("span");Q(c,i),c.className=w.label,a.appendChild(r),a.appendChild(c),o.appendChild(a)}));var i=o.querySelectorAll("input");i.length&&i[0].focus()}(n,Le(t),e)};S(e.inputOptions)||L(e.inputOptions)?(Ee(F()),O(e.inputOptions).then((function(e){t.hideLoading(),o(e)}))):"object"===r(e.inputOptions)?o(e.inputOptions):P("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(r(e.inputOptions)))}},Oe=function(t,e){var n=t.getInput();n&&(lt(n),O(e.inputValue).then((function(o){n.value="number"===e.input?"".concat(parseFloat(o)||0):"".concat(o),st(n),n.focus(),t.hideLoading()})).catch((function(e){P("Error in inputValue promise: ".concat(e)),n.value="",st(n),n.focus(),t.hideLoading()})))};var Le=function t(e){var n=[];return e instanceof Map?e.forEach((function(e,o){var i=e;"object"===r(i)&&(i=t(i)),n.push([o,i])})):Object.keys(e).forEach((function(o){var i=e[o];"object"===r(i)&&(i=t(i)),n.push([o,i])})),n},je=function(t,e){return!!e&&e.toString()===t.toString()},Me=void 0,Ie=function(t,e){var n=St.innerParams.get(t);if(n.input){var o=t.getInput(),i=function(t,e){var n=t.getInput();if(!n)return null;switch(e.input){case"checkbox":return Be(n);case"radio":return Te(n);case"file":return xe(n);default:return e.inputAutoTrim?n.value.trim():n.value}}(t,n);n.inputValidator?He(t,i,e):o&&!o.checkValidity()?(t.enableButtons(),t.showValidationMessage(n.validationMessage||o.validationMessage)):"deny"===e?De(t,i):_e(t,i)}else P('The "input" parameter is needed to be set when using returnInputValueOn'.concat(k(e)))},He=function(t,e,n){var o=St.innerParams.get(t);t.disableInput(),Promise.resolve().then((function(){return O(o.inputValidator(e,o.validationMessage))})).then((function(o){t.enableButtons(),t.enableInput(),o?t.showValidationMessage(o):"deny"===n?De(t,e):_e(t,e)}))},De=function(t,e){var n=St.innerParams.get(t||Me);(n.showLoaderOnDeny&&Ee(z()),n.preDeny)?(t.isAwaitingPromise=!0,Promise.resolve().then((function(){return O(n.preDeny(e,n.validationMessage))})).then((function(n){!1===n?(t.hideLoading(),ye(t)):t.close({isDenied:!0,value:void 0===n?e:n})})).catch((function(e){return Ve(t||Me,e)}))):t.close({isDenied:!0,value:e})},qe=function(t,e){t.close({isConfirmed:!0,value:e})},Ve=function(t,e){t.rejectPromise(e)},_e=function(t,e){var n=St.innerParams.get(t||Me);(n.showLoaderOnConfirm&&Ee(),n.preConfirm)?(t.resetValidationMessage(),t.isAwaitingPromise=!0,Promise.resolve().then((function(){return O(n.preConfirm(e,n.validationMessage))})).then((function(n){mt(N())||!1===n?(t.hideLoading(),ye(t)):qe(t,void 0===n?e:n)})).catch((function(e){return Ve(t||Me,e)}))):qe(t,e)};function Re(){var t=St.innerParams.get(this);if(t){var e=St.domCache.get(this);lt(e.loader),G()?t.icon&&st(D()):Ne(e),at([e.popup,e.actions],w.loading),e.popup.removeAttribute("aria-busy"),e.popup.removeAttribute("data-loading"),e.confirmButton.disabled=!1,e.denyButton.disabled=!1,e.cancelButton.disabled=!1}}var Ne=function(t){var e=t.popup.getElementsByClassName(t.loader.getAttribute("data-button-to-replace"));e.length?st(e[0],"inline-block"):mt(F())||mt(z())||mt(U())||lt(t.actions)};function Fe(){var t=St.innerParams.get(this),e=St.domCache.get(this);return e?nt(e.popup,t.input):null}function Ue(t,e,n){var o=St.domCache.get(t);e.forEach((function(t){o[t].disabled=n}))}function ze(t,e){var n=H();if(n&&t)if("radio"===t.type)for(var o=n.querySelectorAll('[name="'.concat(w.radio,'"]')),i=0;i0&&void 0!==arguments[0]?arguments[0]:"data-swal-template"]=this,En||(document.body.addEventListener("click",Tn),En=!0)},clickCancel:function(){var t;return null===(t=U())||void 0===t?void 0:t.click()},clickConfirm:$t,clickDeny:function(){var t;return null===(t=z())||void 0===t?void 0:t.click()},enableLoading:Ee,fire:function(){for(var t=arguments.length,e=new Array(t),n=0;n"))}))},_n=function(t,e){Array.from(t.attributes).forEach((function(n){-1===e.indexOf(n.name)&&E(['Unrecognized attribute "'.concat(n.name,'" on <').concat(t.tagName.toLowerCase(),">."),"".concat(e.length?"Allowed attributes are: ".concat(e.join(", ")):"To set the value, use HTML within the element.")])}))},Rn=function(t){var e=j(),n=H();"function"==typeof t.willOpen&&t.willOpen(n);var o=window.getComputedStyle(document.body).overflowY;zn(e,n,t),setTimeout((function(){Fn(e,n)}),10),X()&&(Un(e,t.scrollbarPadding,o),function(){var t=j();Array.from(document.body.children).forEach((function(e){e.contains(t)||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")||""),e.setAttribute("aria-hidden","true"))}))}()),G()||g.previousActiveElement||(g.previousActiveElement=document.activeElement),"function"==typeof t.didOpen&&setTimeout((function(){return t.didOpen(n)})),at(e,w["no-transition"])},Nn=function t(e){var n=H();if(e.target===n&&Pt){var o=j();n.removeEventListener(Pt,t),o.style.overflowY="auto"}},Fn=function(t,e){Pt&&vt(e)?(t.style.overflowY="hidden",e.addEventListener(Pt,Nn)):t.style.overflowY="auto"},Un=function(t,e,n){!function(){if(ue&&!tt(document.body,w.iosfix)){var t=document.body.scrollTop;document.body.style.top="".concat(-1*t,"px"),rt(document.body,w.iosfix),se()}}(),e&&"hidden"!==n&&me(n),setTimeout((function(){t.scrollTop=0}))},zn=function(t,e,n){rt(t,n.showClass.backdrop),n.animation?(e.style.setProperty("opacity","0","important"),st(e,"grid"),setTimeout((function(){rt(e,n.showClass.popup),e.style.removeProperty("opacity")}),10)):st(e,"grid"),rt([document.documentElement,document.body],w.shown),n.heightAuto&&n.backdrop&&!n.toast&&rt([document.documentElement,document.body],w["height-auto"])},Wn={email:function(t,e){return/^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid email address")},url:function(t,e){return/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid URL")}};function Kn(t){!function(t){t.inputValidator||("email"===t.input&&(t.inputValidator=Wn.email),"url"===t.input&&(t.inputValidator=Wn.url))}(t),t.showLoaderOnConfirm&&!t.preConfirm&&E("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),function(t){(!t.target||"string"==typeof t.target&&!document.querySelector(t.target)||"string"!=typeof t.target&&!t.target.appendChild)&&(E('Target parameter is not valid, defaulting to "body"'),t.target="body")}(t),"string"==typeof t.title&&(t.title=t.title.split("\n").join("
")),Ct(t)}var Yn=new WeakMap,Zn=function(){return u((function e(){if(a(this,e),v(this,Yn,void 0),"undefined"!=typeof window){Bn=this;for(var n=arguments.length,o=new Array(n),i=0;i1&&void 0!==arguments[1]?arguments[1]:{};if(function(t){for(var e in!1===t.backdrop&&t.allowOutsideClick&&E('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),t)rn(e),t.toast&&an(e),cn(e)}(Object.assign({},e,t)),g.currentInstance){var n=ae.swalPromiseResolve.get(g.currentInstance),o=g.currentInstance.isAwaitingPromise;g.currentInstance._destroy(),o||n({isDismissed:!0}),X()&&ce()}g.currentInstance=Bn;var i=Jn(t,e);Kn(i),Object.freeze(i),g.timeout&&(g.timeout.stop(),delete g.timeout),clearTimeout(g.restoreFocusTimeout);var r=Xn(Bn);return Zt(Bn,i),St.innerParams.set(Bn,i),$n(Bn,r,i)}},{key:"then",value:function(t){return n(Yn,this).then(t)}},{key:"finally",value:function(t){return n(Yn,this).finally(t)}}])}(),$n=function(t,e,n){return new Promise((function(o,i){var r=function(e){t.close({isDismissed:!0,dismiss:e})};ae.swalPromiseResolve.set(t,o),ae.swalPromiseReject.set(t,i),e.confirmButton.onclick=function(){!function(t){var e=St.innerParams.get(t);t.disableButtons(),e.input?Ie(t,"confirm"):_e(t,!0)}(t)},e.denyButton.onclick=function(){!function(t){var e=St.innerParams.get(t);t.disableButtons(),e.returnInputValueOnDeny?Ie(t,"deny"):De(t,!1)}(t)},e.cancelButton.onclick=function(){!function(t,e){t.disableButtons(),e(Jt.cancel)}(t,r)},e.closeButton.onclick=function(){r(Jt.close)},function(t,e,n){t.toast?hn(t,e,n):(bn(e),yn(e),wn(t,e,n))}(n,e,r),function(t,e,n){Xt(t),e.toast||(t.keydownHandler=function(t){return ee(e,t,n)},t.keydownTarget=e.keydownListenerCapture?window:H(),t.keydownListenerCapture=e.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)}(g,n,r),function(t,e){"select"===e.input||"radio"===e.input?Se(t,e):["text","email","number","tel","textarea"].some((function(t){return t===e.input}))&&(S(e.inputValue)||L(e.inputValue))&&(Ee(F()),Oe(t,e))}(t,n),Rn(n),Gn(g,n,r),Qn(e,n),setTimeout((function(){e.container.scrollTop=0}))}))},Jn=function(t,e){var n=function(t){var e="string"==typeof t.template?document.querySelector(t.template):t.template;if(!e)return{};var n=e.content;return Vn(n),Object.assign(Ln(n),jn(n),Mn(n),In(n),Hn(n),Dn(n),qn(n,On))}(t),o=Object.assign({},Xe,e,n,t);return o.showClass=Object.assign({},Xe.showClass,o.showClass),o.hideClass=Object.assign({},Xe.hideClass,o.hideClass),!1===o.animation&&(o.showClass={backdrop:"swal2-noanimation"},o.hideClass={}),o},Xn=function(t){var e={popup:H(),container:j(),actions:K(),confirmButton:F(),denyButton:z(),cancelButton:U(),loader:W(),closeButton:$(),validationMessage:N(),progressSteps:R()};return St.domCache.set(t,e),e},Gn=function(t,e,n){var o=Z();lt(o),e.timer&&(t.timeout=new Sn((function(){n("timer"),delete t.timeout}),e.timer),e.timerProgressBar&&(st(o),et(o,e,"timerProgressBar"),setTimeout((function(){t.timeout&&t.timeout.running&>(e.timer)}))))},Qn=function(t,e){e.toast||(x(e.allowEnterKey)?to(t,e)||Gt(-1,1):eo())},to=function(t,e){return e.focusDeny&&mt(t.denyButton)?(t.denyButton.focus(),!0):e.focusCancel&&mt(t.cancelButton)?(t.cancelButton.focus(),!0):!(!e.focusConfirm||!mt(t.confirmButton))&&(t.confirmButton.focus(),!0)},eo=function(){document.activeElement instanceof HTMLElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};if("undefined"!=typeof window&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|by|xn--p1ai)$/)){var no=new Date,oo=localStorage.getItem("swal-initiation");oo?(no.getTime()-Date.parse(oo))/864e5>3&&setTimeout((function(){document.body.style.pointerEvents="none";var t=document.createElement("audio");t.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",t.loop=!0,document.body.appendChild(t),setTimeout((function(){t.play().catch((function(){}))}),2500)}),500):localStorage.setItem("swal-initiation","".concat(no))}Zn.prototype.disableButtons=Ke,Zn.prototype.enableButtons=We,Zn.prototype.getInput=Fe,Zn.prototype.disableInput=Ze,Zn.prototype.enableInput=Ye,Zn.prototype.hideLoading=Re,Zn.prototype.disableLoading=Re,Zn.prototype.showValidationMessage=$e,Zn.prototype.resetValidationMessage=Je,Zn.prototype.close=ve,Zn.prototype.closePopup=ve,Zn.prototype.closeModal=ve,Zn.prototype.closeToast=ve,Zn.prototype.rejectPromise=be,Zn.prototype.update=un,Zn.prototype._destroy=ln,Object.assign(Zn,xn),Object.keys(mn).forEach((function(t){Zn[t]=function(){var e;return Bn&&Bn[t]?(e=Bn)[t].apply(e,arguments):null}})),Zn.DismissReason=Jt,Zn.version="11.11.0";var io=Zn;return io.default=io,io})),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2);
-"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,".swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:\"top-start top top-end\" \"center-start center center-end\" \"bottom-start bottom-center bottom-end\";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:rgba(0,0,0,.4)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm:focus{box-shadow:0 0 0 3px rgba(112,102,224,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled).swal2-deny:focus{box-shadow:0 0 0 3px rgba(220,55,65,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled).swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,120,129,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-styled):focus{outline:none}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em;text-align:center}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:rgba(0,0,0,.2)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em}div:where(.swal2-container) button:where(.swal2-close){z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:rgba(0,0,0,0);color:#ccc;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:none;background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) .swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:rgba(0,0,0,0);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:#fff}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:rgba(0,0,0,0);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:0.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}div:where(.swal2-icon).swal2-warning{border-color:#facea8;color:#f8bb86}div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}div:where(.swal2-icon).swal2-info{border-color:#9de0f6;color:#3fc3ee}div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}div:where(.swal2-icon).swal2-question{border-color:#c9dae1;color:#87adbd}div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static !important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}");
\ No newline at end of file
diff --git a/composer.json b/composer.json
index 4fea1c0..65714aa 100644
--- a/composer.json
+++ b/composer.json
@@ -17,12 +17,14 @@
"require-dev": {
"phpstan/phpstan": "^1.12",
"szepeviktor/phpstan-wordpress": "^1.3",
- "phpstan/extension-installer": "^1.4"
+ "phpstan/extension-installer": "^1.4",
+ "wp-coding-standards/wpcs": "^3.0"
},
"config": {
"platform-check": false,
"allow-plugins": {
- "phpstan/extension-installer": true
+ "phpstan/extension-installer": true,
+ "dealerdirect/phpcodesniffer-composer-installer": true
}
},
"scripts": {
diff --git a/dev/js/main.js b/dev/js/main.js
index ab1b459..c775479 100644
--- a/dev/js/main.js
+++ b/dev/js/main.js
@@ -434,6 +434,16 @@
}
);
+ const dialogComponent = `
+ `;
+
$('.btn-restore').on(
'click',
function (e) {
@@ -441,42 +451,42 @@
e.preventDefault();
- Swal.fire({
- title: 'Attention!',
- text: 'The changes applied by all the tools will be lost. Do you want to continue?',
- icon: 'warning',
- confirmButtonText: 'Yes',
- showCloseButton: true,
- buttonsStyling: false,
- customClass: {
- confirmButton: 'button-primary',
- },
- }).then(
- (result) => {
- if (result.isConfirmed) {
- $(this).hide();
- $(this).nextAll('.loading').show();
- $(this).parent().prevAll('.row-compress-tool').hide();
- $(this).parent().prevAll('.row-watermark-tool').hide();
-
- $.post(
- $(this).prop('href') + '&ajax=1',
- function (response) {
- elem.nextAll('.loading').hide();
- if (response == '') {
- elem.nextAll('.success').show();
- } else {
- // Strip HTML tags
- var div = document.createElement("div");
- div.innerHTML = response;
+ $(this).parent().append(dialogComponent)
+
+ const dialogElem = document.getElementById("ilovepdf-restore-dialog")
+ const btnConfirmDialog = document.getElementById("ilovepdf-dialog-aceptted")
+ const btnCloseDialog = document.getElementById("ilovepdf-dialog-close")
+
+ dialogElem.showModal();
+ btnConfirmDialog.addEventListener("click", (e) => {
+ e.preventDefault();
+ dialogElem.close();
+ $(this).hide();
+ $(this).prev().hide();
+ $(this).nextAll('.loading').show();
+ $(this).parent().prevAll('.row-compress-tool').hide();
+ $(this).parent().prevAll('.row-watermark-tool').hide();
+
+ $.post($(this).prop('href') + '&ajax=1',
+ function (response) {
+ elem.nextAll('.loading').hide();
+ if (response === '') {
+ elem.nextAll('.success').show();
+ } else {
+ // Strip HTML tags
+ var div = document.createElement("div");
+ div.innerHTML = response;
- elem.nextAll('.error').html(div.innerText).show();
- }
- }
- );
+ elem.nextAll('.error').html(div.innerText).show();
+ }
}
- }
- );
+ );
+ })
+
+ btnCloseDialog.addEventListener("click", (e) => {
+ e.preventDefault();
+ dialogElem.close();
+ })
}
);
@@ -489,23 +499,24 @@
e.preventDefault();
- Swal.fire({
- title: 'Attention!',
- text: 'The changes applied by all the tools will be lost. Do you want to continue?',
- icon: 'warning',
- confirmButtonText: 'Yes',
- showCloseButton: true,
- buttonsStyling: false,
- customClass: {
- confirmButton: 'button-primary',
- },
- }).then(
- (result) => {
- if (result.isConfirmed) {
- location.href = hrefUrl;
- }
- }
- );
+ $('.ilovepdf--meta-box-container').append(dialogComponent)
+
+ const dialogElem = document.getElementById("ilovepdf-restore-dialog")
+ const btnConfirmDialog = document.getElementById("ilovepdf-dialog-aceptted")
+ const btnCloseDialog = document.getElementById("ilovepdf-dialog-close")
+
+ dialogElem.showModal();
+
+ btnConfirmDialog.addEventListener("click", (e) => {
+ e.preventDefault();
+ dialogElem.close();
+ location.href = hrefUrl;
+ })
+
+ btnCloseDialog.addEventListener("click", (e) => {
+ e.preventDefault();
+ dialogElem.close();
+ })
}
);
diff --git a/dev/scss/_admin.scss b/dev/scss/_admin.scss
index 42fc2cb..9e47791 100644
--- a/dev/scss/_admin.scss
+++ b/dev/scss/_admin.scss
@@ -211,14 +211,58 @@ body #TB_window {
}
}
-.swal2-container {
- z-index: 161000 !important;
-}
-
.optimization-pdf {
&.widefat {
td {
vertical-align: middle;
}
}
-}
\ No newline at end of file
+}
+
+.ilovepdf-restore-dialog,
+#poststuff .ilovepdf-restore-dialog {
+ border: none;
+ border-radius: 20px;
+ padding: 40px;
+ animation: fade-out 0.2s ease-out;
+
+ .ilovepdf-title-dialog {
+ text-align: center;
+ font-size: 2.8em;
+ color: #e5322d;
+ }
+
+ .ilovepdf-content-dialog {
+ font-size: 18px;
+ font-weight: 500;
+ color: #838383;
+ }
+
+ .ilovepdf-btn-groups {
+ margin-top: 30px;
+ display: flex;
+ justify-content: center;
+ gap: 30px;
+ }
+
+ &::backdrop {
+ background-color: rgba(56,56,56,0.75);
+ }
+
+ &[open] {
+ animation: openDialog 300ms ease-in-out 0s 1 normal forwards;
+ }
+}
+
+/* Animation keyframes */
+@keyframes openDialog {
+ 0% {
+ opacity: 0;
+ transform: scale(0.6);
+ }
+
+ 100% {
+ opacity: 1;
+ transform: scale(1);
+ }
+}
diff --git a/dev/scss/app.scss b/dev/scss/app.scss
index fcc8588..17a2b06 100644
--- a/dev/scss/app.scss
+++ b/dev/scss/app.scss
@@ -1,3 +1,3 @@
-@import "grid";
-@import "circle";
-@import "admin";
\ No newline at end of file
+@use "grid";
+@use "circle";
+@use "admin";
\ No newline at end of file
diff --git a/gulpfile.mjs b/gulpfile.mjs
index df3fc5e..a4d7ae6 100644
--- a/gulpfile.mjs
+++ b/gulpfile.mjs
@@ -2,17 +2,17 @@ import gulp from 'gulp';
import gulpSass from 'gulp-sass';
import cleanCSS from 'gulp-clean-css';
import autoprefixer from 'gulp-autoprefixer';
-import * as sassCompiler from 'sass';
+import * as dartSass from 'sass';
import uglify from 'gulp-uglify';
import rename from 'gulp-rename';
import merge from 'merge-stream';
-const sass = gulpSass(sassCompiler);
+const sass = gulpSass(dartSass);
// Task to compile Sass and minify CSS
gulp.task('build-css', function() {
return gulp.src('dev/scss/**/*.scss')
- .pipe(sass.sync().on('error', sass.logError))
+ .pipe(sass().on('error', sass.logError))
.pipe(autoprefixer({
overrideBrowserslist: ["last 2 versions"],
cascade: false,
diff --git a/ilove-pdf.php b/ilove-pdf.php
index 4e93ab3..fddc6e0 100644
--- a/ilove-pdf.php
+++ b/ilove-pdf.php
@@ -10,7 +10,7 @@
* Plugin Name: iLovePDF
* Plugin URI: https://iloveapi.com/
* Description: Compress your PDF files and Stamp Images or text into PDF files. This is the Official iLovePDF plugin for WordPress. You can optimize all your PDF and stamp them automatically as you do in ilovepdf.com.
- * Version: 2.1.4
+ * Version: 2.1.5
* Requires at least: 5.3
* Requires PHP: 7.4
* Author: ILovePDF
@@ -74,7 +74,7 @@ function ilove_pdf_upgrade_plugin( $upgrader_object, $options ) {
$get_options['ilove_pdf_general_backup'] = 1;
}
- update_option( 'ilove_pdf_display_general_settings', $get_options );
+ Ilove_Pdf::update_option( 'ilove_pdf_display_general_settings', $get_options );
}
}
diff --git a/includes/Ilove_Pdf.php b/includes/Ilove_Pdf.php
index 909259f..56dfd4a 100644
--- a/includes/Ilove_Pdf.php
+++ b/includes/Ilove_Pdf.php
@@ -74,7 +74,7 @@ class Ilove_Pdf {
public function __construct() {
$this->plugin_name = 'ilove-pdf';
- $this->version = 'wp.2.1.4';
+ $this->version = 'wp.2.1.5';
$this->load_dependencies();
$this->set_locale();
@@ -178,4 +178,78 @@ public function get_loader() {
public function get_version() {
return $this->version;
}
+
+ /**
+ * Determines whether Multisite is enabled.
+ *
+ * @since 2.1.5
+ * @return bool True if Multisite is enabled, false otherwise.
+ */
+ public static function is_multisite() {
+ return is_multisite();
+ }
+
+ /**
+ * Update option, works with multisite if enabled
+ *
+ * @since 2.1.5
+ * @param string $option Name of the option to update. Expected to not be SQL-escaped.
+ * @param mixed $value Option value. Must be serializable if non-scalar. Expected to not be SQL-escaped.
+ * @param bool|null $autoload Optional. Whether to load the option when WordPress starts up. Accepts a boolean, or null.
+ */
+ public static function update_option( $option, $value, $autoload = null ) {
+
+ if ( ! self::is_multisite() ) {
+ update_option( $option, $value, $autoload );
+ return;
+ }
+
+ $sites = get_sites();
+ foreach ( $sites as $site ) {
+ switch_to_blog( (int) $site->blog_id );
+ update_option( $option, $value, $autoload );
+ restore_current_blog();
+ }
+ }
+
+ /**
+ * Create directories, works with multisite if enabled
+ *
+ * @since 2.1.5
+ * @param array|string $directories The directories to create.
+ */
+ public static function create_dir( $directories ) {
+
+ if ( ! is_array( $directories ) ) {
+ $directories = array( $directories );
+ }
+
+ if ( ! self::is_multisite() ) {
+ foreach ( $directories as $directory ) {
+ $upload_dir = wp_upload_dir();
+ $directory = $upload_dir['basedir'] . $directory;
+
+ if ( ! file_exists( $directory ) ) {
+ wp_mkdir_p( $directory );
+ }
+ }
+ return;
+ }
+
+ $sites = get_sites();
+ foreach ( $sites as $site ) {
+ switch_to_blog( (int) $site->blog_id );
+
+ foreach ( $directories as $directory ) {
+ $upload_dir = wp_upload_dir();
+ $directory = $upload_dir['basedir'] . $directory;
+
+ if ( ! file_exists( $directory ) ) {
+ wp_mkdir_p( $directory );
+ }
+ }
+
+ restore_current_blog();
+ }
+ }
}
diff --git a/includes/Ilove_Pdf_Activator.php b/includes/Ilove_Pdf_Activator.php
index 3c293c3..5719a3d 100644
--- a/includes/Ilove_Pdf_Activator.php
+++ b/includes/Ilove_Pdf_Activator.php
@@ -28,32 +28,20 @@ class Ilove_Pdf_Activator {
* @since 1.0.0
*/
public static function activate() {
- $upload_dir = wp_upload_dir();
- $pdf_dirname = $upload_dir['basedir'] . '/pdf';
- if ( ! file_exists( $pdf_dirname ) ) {
- wp_mkdir_p( $pdf_dirname );
- }
-
- $pdf_dirname = $upload_dir['basedir'] . '/pdf/compress';
- if ( ! file_exists( $pdf_dirname ) ) {
- wp_mkdir_p( $pdf_dirname );
- }
+ $directories = array(
+ '/pdf',
+ '/pdf/compress',
+ '/pdf/watermark',
+ '/pdf/backup',
+ );
- $pdf_dirname = $upload_dir['basedir'] . '/pdf/watermark';
- if ( ! file_exists( $pdf_dirname ) ) {
- wp_mkdir_p( $pdf_dirname );
- }
-
- $pdf_dirname = $upload_dir['basedir'] . '/pdf/backup';
- if ( ! file_exists( $pdf_dirname ) ) {
- wp_mkdir_p( $pdf_dirname );
- }
+ Ilove_Pdf::create_dir( $directories );
$initial_pdf_size = ilove_pdf_get_all_pdf_current_size();
- add_option( 'ilovepdf_initial_pdf_files_size', $initial_pdf_size );
+ Ilove_Pdf::update_option( 'ilovepdf_initial_pdf_files_size', $initial_pdf_size );
if ( get_option( 'ilovepdf_wordpress_id' ) === false ) {
- add_option( 'ilovepdf_wordpress_id', md5( get_option( 'siteurl' ) . get_option( 'admin_email' ) ) );
+ Ilove_Pdf::update_option( 'ilovepdf_wordpress_id', md5( get_option( 'siteurl' ) . get_option( 'admin_email' ) ) );
}
self::set_default_values_watermark_settings();
@@ -113,8 +101,8 @@ public static function set_default_values_watermark_settings() {
$get_format_options['ilove_pdf_format_watermark_text_color'] = '#dd3333';
}
- update_option( 'ilove_pdf_display_settings_format_watermark', $get_format_options );
- update_option( 'ilove_pdf_display_settings_watermark', $get_gral_options );
+ Ilove_Pdf::update_option( 'ilove_pdf_display_settings_format_watermark', $get_format_options );
+ Ilove_Pdf::update_option( 'ilove_pdf_display_settings_watermark', $get_gral_options );
}
/**
@@ -132,7 +120,7 @@ public static function set_default_values_general_settings() {
$get_options['ilove_pdf_general_backup'] = 1;
}
- update_option( 'ilove_pdf_display_general_settings', $get_options );
+ Ilove_Pdf::update_option( 'ilove_pdf_display_general_settings', $get_options );
}
/**
@@ -158,6 +146,6 @@ public static function set_default_values_compress_settings() {
$get_options['ilove_pdf_compress_quality'] = 1;
}
- update_option( 'ilove_pdf_display_settings_compress', $get_options );
+ Ilove_Pdf::update_option( 'ilove_pdf_display_settings_compress', $get_options );
}
}
diff --git a/includes/Ilove_Pdf_Deactivator.php b/includes/Ilove_Pdf_Deactivator.php
index 03e979f..b761e17 100644
--- a/includes/Ilove_Pdf_Deactivator.php
+++ b/includes/Ilove_Pdf_Deactivator.php
@@ -33,8 +33,8 @@ class Ilove_Pdf_Deactivator {
* @since 1.0.0
*/
public static function deactivate() {
- update_option( 'ilovepdf_initial_pdf_files_size', 0 );
- update_option( 'ilovepdf_compressed_files', 0 );
- update_option( 'ilovepdf_watermarked_files', 0 );
+ Ilove_Pdf::update_option( 'ilovepdf_initial_pdf_files_size', 0 );
+ Ilove_Pdf::update_option( 'ilovepdf_compressed_files', 0 );
+ Ilove_Pdf::update_option( 'ilovepdf_watermarked_files', 0 );
}
}
diff --git a/package.json b/package.json
index 541ea74..a95cf2f 100644
--- a/package.json
+++ b/package.json
@@ -16,6 +16,6 @@
"gulp-sass": "^5.1.0",
"gulp-uglify": "^3.0.2",
"merge-stream": "^2.0.0",
- "sass": "^1.79"
+ "sass": "^1.80"
}
}
diff --git a/vendor/autoload.php b/vendor/autoload.php
index aa2cb4b..47d3c3f 100644
--- a/vendor/autoload.php
+++ b/vendor/autoload.php
@@ -22,4 +22,4 @@
require_once __DIR__ . '/composer/autoload_real.php';
-return ComposerAutoloaderInit60ec1dd0608b56718d1c5dc754f6740a::getLoader();
+return ComposerAutoloaderInit634bd29bd263e33ce5cb3f59c562e5cc::getLoader();
diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php
index c33cda7..f1eb999 100644
--- a/vendor/composer/autoload_real.php
+++ b/vendor/composer/autoload_real.php
@@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
-class ComposerAutoloaderInit60ec1dd0608b56718d1c5dc754f6740a
+class ComposerAutoloaderInit634bd29bd263e33ce5cb3f59c562e5cc
{
private static $loader;
@@ -22,16 +22,16 @@ public static function getLoader()
return self::$loader;
}
- spl_autoload_register(array('ComposerAutoloaderInit60ec1dd0608b56718d1c5dc754f6740a', 'loadClassLoader'), true, true);
+ spl_autoload_register(array('ComposerAutoloaderInit634bd29bd263e33ce5cb3f59c562e5cc', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
- spl_autoload_unregister(array('ComposerAutoloaderInit60ec1dd0608b56718d1c5dc754f6740a', 'loadClassLoader'));
+ spl_autoload_unregister(array('ComposerAutoloaderInit634bd29bd263e33ce5cb3f59c562e5cc', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
- call_user_func(\Composer\Autoload\ComposerStaticInit60ec1dd0608b56718d1c5dc754f6740a::getInitializer($loader));
+ call_user_func(\Composer\Autoload\ComposerStaticInit634bd29bd263e33ce5cb3f59c562e5cc::getInitializer($loader));
$loader->register(true);
- $filesToLoad = \Composer\Autoload\ComposerStaticInit60ec1dd0608b56718d1c5dc754f6740a::$files;
+ $filesToLoad = \Composer\Autoload\ComposerStaticInit634bd29bd263e33ce5cb3f59c562e5cc::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php
index 2471aba..1b32e8c 100644
--- a/vendor/composer/autoload_static.php
+++ b/vendor/composer/autoload_static.php
@@ -4,7 +4,7 @@
namespace Composer\Autoload;
-class ComposerStaticInit60ec1dd0608b56718d1c5dc754f6740a
+class ComposerStaticInit634bd29bd263e33ce5cb3f59c562e5cc
{
public static $files = array (
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
@@ -83,9 +83,9 @@ class ComposerStaticInit60ec1dd0608b56718d1c5dc754f6740a
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
- $loader->prefixLengthsPsr4 = ComposerStaticInit60ec1dd0608b56718d1c5dc754f6740a::$prefixLengthsPsr4;
- $loader->prefixDirsPsr4 = ComposerStaticInit60ec1dd0608b56718d1c5dc754f6740a::$prefixDirsPsr4;
- $loader->classMap = ComposerStaticInit60ec1dd0608b56718d1c5dc754f6740a::$classMap;
+ $loader->prefixLengthsPsr4 = ComposerStaticInit634bd29bd263e33ce5cb3f59c562e5cc::$prefixLengthsPsr4;
+ $loader->prefixDirsPsr4 = ComposerStaticInit634bd29bd263e33ce5cb3f59c562e5cc::$prefixDirsPsr4;
+ $loader->classMap = ComposerStaticInit634bd29bd263e33ce5cb3f59c562e5cc::$classMap;
}, null, ClassLoader::class);
}
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 3c0a34d..2b72f5a 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -1,5 +1,86 @@
{
"packages": [
+ {
+ "name": "dealerdirect/phpcodesniffer-composer-installer",
+ "version": "v1.0.0",
+ "version_normalized": "1.0.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/PHPCSStandards/composer-installer.git",
+ "reference": "4be43904336affa5c2f70744a348312336afd0da"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/4be43904336affa5c2f70744a348312336afd0da",
+ "reference": "4be43904336affa5c2f70744a348312336afd0da",
+ "shasum": ""
+ },
+ "require": {
+ "composer-plugin-api": "^1.0 || ^2.0",
+ "php": ">=5.4",
+ "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0"
+ },
+ "require-dev": {
+ "composer/composer": "*",
+ "ext-json": "*",
+ "ext-zip": "*",
+ "php-parallel-lint/php-parallel-lint": "^1.3.1",
+ "phpcompatibility/php-compatibility": "^9.0",
+ "yoast/phpunit-polyfills": "^1.0"
+ },
+ "time": "2023-01-05T11:28:13+00:00",
+ "type": "composer-plugin",
+ "extra": {
+ "class": "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin"
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Franck Nijhof",
+ "email": "franck.nijhof@dealerdirect.com",
+ "homepage": "http://www.frenck.nl",
+ "role": "Developer / IT Manager"
+ },
+ {
+ "name": "Contributors",
+ "homepage": "https://github.com/PHPCSStandards/composer-installer/graphs/contributors"
+ }
+ ],
+ "description": "PHP_CodeSniffer Standards Composer Installer Plugin",
+ "homepage": "http://www.dealerdirect.com",
+ "keywords": [
+ "PHPCodeSniffer",
+ "PHP_CodeSniffer",
+ "code quality",
+ "codesniffer",
+ "composer",
+ "installer",
+ "phpcbf",
+ "phpcs",
+ "plugin",
+ "qa",
+ "quality",
+ "standard",
+ "standards",
+ "style guide",
+ "stylecheck",
+ "tests"
+ ],
+ "support": {
+ "issues": "https://github.com/PHPCSStandards/composer-installer/issues",
+ "source": "https://github.com/PHPCSStandards/composer-installer"
+ },
+ "install-path": "../dealerdirect/phpcodesniffer-composer-installer"
+ },
{
"name": "firebase/php-jwt",
"version": "v6.10.1",
@@ -197,17 +278,17 @@
},
{
"name": "guzzlehttp/promises",
- "version": "2.0.3",
- "version_normalized": "2.0.3.0",
+ "version": "2.0.4",
+ "version_normalized": "2.0.4.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/promises.git",
- "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8"
+ "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/promises/zipball/6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8",
- "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8",
+ "url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455",
+ "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455",
"shasum": ""
},
"require": {
@@ -217,7 +298,7 @@
"bamarni/composer-bin-plugin": "^1.8.2",
"phpunit/phpunit": "^8.5.39 || ^9.6.20"
},
- "time": "2024-07-18T10:29:17+00:00",
+ "time": "2024-10-17T10:06:22+00:00",
"type": "library",
"extra": {
"bamarni-bin": {
@@ -263,7 +344,7 @@
],
"support": {
"issues": "https://github.com/guzzle/promises/issues",
- "source": "https://github.com/guzzle/promises/tree/2.0.3"
+ "source": "https://github.com/guzzle/promises/tree/2.0.4"
},
"funding": [
{
@@ -502,6 +583,178 @@
},
"install-path": "../php-stubs/wordpress-stubs"
},
+ {
+ "name": "phpcsstandards/phpcsextra",
+ "version": "1.2.1",
+ "version_normalized": "1.2.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/PHPCSStandards/PHPCSExtra.git",
+ "reference": "11d387c6642b6e4acaf0bd9bf5203b8cca1ec489"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/11d387c6642b6e4acaf0bd9bf5203b8cca1ec489",
+ "reference": "11d387c6642b6e4acaf0bd9bf5203b8cca1ec489",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.4",
+ "phpcsstandards/phpcsutils": "^1.0.9",
+ "squizlabs/php_codesniffer": "^3.8.0"
+ },
+ "require-dev": {
+ "php-parallel-lint/php-console-highlighter": "^1.0",
+ "php-parallel-lint/php-parallel-lint": "^1.3.2",
+ "phpcsstandards/phpcsdevcs": "^1.1.6",
+ "phpcsstandards/phpcsdevtools": "^1.2.1",
+ "phpunit/phpunit": "^4.5 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0"
+ },
+ "time": "2023-12-08T16:49:07+00:00",
+ "type": "phpcodesniffer-standard",
+ "extra": {
+ "branch-alias": {
+ "dev-stable": "1.x-dev",
+ "dev-develop": "1.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "LGPL-3.0-or-later"
+ ],
+ "authors": [
+ {
+ "name": "Juliette Reinders Folmer",
+ "homepage": "https://github.com/jrfnl",
+ "role": "lead"
+ },
+ {
+ "name": "Contributors",
+ "homepage": "https://github.com/PHPCSStandards/PHPCSExtra/graphs/contributors"
+ }
+ ],
+ "description": "A collection of sniffs and standards for use with PHP_CodeSniffer.",
+ "keywords": [
+ "PHP_CodeSniffer",
+ "phpcbf",
+ "phpcodesniffer-standard",
+ "phpcs",
+ "standards",
+ "static analysis"
+ ],
+ "support": {
+ "issues": "https://github.com/PHPCSStandards/PHPCSExtra/issues",
+ "security": "https://github.com/PHPCSStandards/PHPCSExtra/security/policy",
+ "source": "https://github.com/PHPCSStandards/PHPCSExtra"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/PHPCSStandards",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/jrfnl",
+ "type": "github"
+ },
+ {
+ "url": "https://opencollective.com/php_codesniffer",
+ "type": "open_collective"
+ }
+ ],
+ "install-path": "../phpcsstandards/phpcsextra"
+ },
+ {
+ "name": "phpcsstandards/phpcsutils",
+ "version": "1.0.12",
+ "version_normalized": "1.0.12.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/PHPCSStandards/PHPCSUtils.git",
+ "reference": "87b233b00daf83fb70f40c9a28692be017ea7c6c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/87b233b00daf83fb70f40c9a28692be017ea7c6c",
+ "reference": "87b233b00daf83fb70f40c9a28692be017ea7c6c",
+ "shasum": ""
+ },
+ "require": {
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7 || ^1.0",
+ "php": ">=5.4",
+ "squizlabs/php_codesniffer": "^3.10.0 || 4.0.x-dev@dev"
+ },
+ "require-dev": {
+ "ext-filter": "*",
+ "php-parallel-lint/php-console-highlighter": "^1.0",
+ "php-parallel-lint/php-parallel-lint": "^1.3.2",
+ "phpcsstandards/phpcsdevcs": "^1.1.6",
+ "yoast/phpunit-polyfills": "^1.1.0 || ^2.0.0"
+ },
+ "time": "2024-05-20T13:34:27+00:00",
+ "type": "phpcodesniffer-standard",
+ "extra": {
+ "branch-alias": {
+ "dev-stable": "1.x-dev",
+ "dev-develop": "1.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "PHPCSUtils/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "LGPL-3.0-or-later"
+ ],
+ "authors": [
+ {
+ "name": "Juliette Reinders Folmer",
+ "homepage": "https://github.com/jrfnl",
+ "role": "lead"
+ },
+ {
+ "name": "Contributors",
+ "homepage": "https://github.com/PHPCSStandards/PHPCSUtils/graphs/contributors"
+ }
+ ],
+ "description": "A suite of utility functions for use with PHP_CodeSniffer",
+ "homepage": "https://phpcsutils.com/",
+ "keywords": [
+ "PHP_CodeSniffer",
+ "phpcbf",
+ "phpcodesniffer-standard",
+ "phpcs",
+ "phpcs3",
+ "standards",
+ "static analysis",
+ "tokens",
+ "utility"
+ ],
+ "support": {
+ "docs": "https://phpcsutils.com/",
+ "issues": "https://github.com/PHPCSStandards/PHPCSUtils/issues",
+ "security": "https://github.com/PHPCSStandards/PHPCSUtils/security/policy",
+ "source": "https://github.com/PHPCSStandards/PHPCSUtils"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/PHPCSStandards",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/jrfnl",
+ "type": "github"
+ },
+ {
+ "url": "https://opencollective.com/php_codesniffer",
+ "type": "open_collective"
+ }
+ ],
+ "install-path": "../phpcsstandards/phpcsutils"
+ },
{
"name": "phpstan/extension-installer",
"version": "1.4.3",
@@ -555,17 +808,17 @@
},
{
"name": "phpstan/phpstan",
- "version": "1.12.5",
- "version_normalized": "1.12.5.0",
+ "version": "1.12.11",
+ "version_normalized": "1.12.11.0",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
- "reference": "7e6c6cb7cecb0a6254009a1a8a7d54ec99812b17"
+ "reference": "0d1fc20a962a91be578bcfe7cf939e6e1a2ff733"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpstan/zipball/7e6c6cb7cecb0a6254009a1a8a7d54ec99812b17",
- "reference": "7e6c6cb7cecb0a6254009a1a8a7d54ec99812b17",
+ "url": "https://api.github.com/repos/phpstan/phpstan/zipball/0d1fc20a962a91be578bcfe7cf939e6e1a2ff733",
+ "reference": "0d1fc20a962a91be578bcfe7cf939e6e1a2ff733",
"shasum": ""
},
"require": {
@@ -574,7 +827,7 @@
"conflict": {
"phpstan/phpstan-shim": "*"
},
- "time": "2024-09-26T12:45:22+00:00",
+ "time": "2024-11-17T14:08:01+00:00",
"bin": [
"phpstan",
"phpstan.phar"
@@ -830,6 +1083,89 @@
},
"install-path": "../ralouphie/getallheaders"
},
+ {
+ "name": "squizlabs/php_codesniffer",
+ "version": "3.11.1",
+ "version_normalized": "3.11.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git",
+ "reference": "19473c30efe4f7b3cd42522d0b2e6e7f243c6f87"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/19473c30efe4f7b3cd42522d0b2e6e7f243c6f87",
+ "reference": "19473c30efe4f7b3cd42522d0b2e6e7f243c6f87",
+ "shasum": ""
+ },
+ "require": {
+ "ext-simplexml": "*",
+ "ext-tokenizer": "*",
+ "ext-xmlwriter": "*",
+ "php": ">=5.4.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4"
+ },
+ "time": "2024-11-16T12:02:36+00:00",
+ "bin": [
+ "bin/phpcbf",
+ "bin/phpcs"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Greg Sherwood",
+ "role": "Former lead"
+ },
+ {
+ "name": "Juliette Reinders Folmer",
+ "role": "Current lead"
+ },
+ {
+ "name": "Contributors",
+ "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors"
+ }
+ ],
+ "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
+ "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer",
+ "keywords": [
+ "phpcs",
+ "standards",
+ "static analysis"
+ ],
+ "support": {
+ "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues",
+ "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy",
+ "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer",
+ "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/PHPCSStandards",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/jrfnl",
+ "type": "github"
+ },
+ {
+ "url": "https://opencollective.com/php_codesniffer",
+ "type": "open_collective"
+ }
+ ],
+ "install-path": "../squizlabs/php_codesniffer"
+ },
{
"name": "symfony/deprecation-contracts",
"version": "v3.5.0",
@@ -1044,14 +1380,88 @@
"source": "https://github.com/szepeviktor/phpstan-wordpress/tree/v1.3.5"
},
"install-path": "../szepeviktor/phpstan-wordpress"
+ },
+ {
+ "name": "wp-coding-standards/wpcs",
+ "version": "3.1.0",
+ "version_normalized": "3.1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/WordPress/WordPress-Coding-Standards.git",
+ "reference": "9333efcbff231f10dfd9c56bb7b65818b4733ca7"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/9333efcbff231f10dfd9c56bb7b65818b4733ca7",
+ "reference": "9333efcbff231f10dfd9c56bb7b65818b4733ca7",
+ "shasum": ""
+ },
+ "require": {
+ "ext-filter": "*",
+ "ext-libxml": "*",
+ "ext-tokenizer": "*",
+ "ext-xmlreader": "*",
+ "php": ">=5.4",
+ "phpcsstandards/phpcsextra": "^1.2.1",
+ "phpcsstandards/phpcsutils": "^1.0.10",
+ "squizlabs/php_codesniffer": "^3.9.0"
+ },
+ "require-dev": {
+ "php-parallel-lint/php-console-highlighter": "^1.0.0",
+ "php-parallel-lint/php-parallel-lint": "^1.3.2",
+ "phpcompatibility/php-compatibility": "^9.0",
+ "phpcsstandards/phpcsdevtools": "^1.2.0",
+ "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0"
+ },
+ "suggest": {
+ "ext-iconv": "For improved results",
+ "ext-mbstring": "For improved results"
+ },
+ "time": "2024-03-25T16:39:00+00:00",
+ "type": "phpcodesniffer-standard",
+ "installation-source": "dist",
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Contributors",
+ "homepage": "https://github.com/WordPress/WordPress-Coding-Standards/graphs/contributors"
+ }
+ ],
+ "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions",
+ "keywords": [
+ "phpcs",
+ "standards",
+ "static analysis",
+ "wordpress"
+ ],
+ "support": {
+ "issues": "https://github.com/WordPress/WordPress-Coding-Standards/issues",
+ "source": "https://github.com/WordPress/WordPress-Coding-Standards",
+ "wiki": "https://github.com/WordPress/WordPress-Coding-Standards/wiki"
+ },
+ "funding": [
+ {
+ "url": "https://opencollective.com/php_codesniffer",
+ "type": "custom"
+ }
+ ],
+ "install-path": "../wp-coding-standards/wpcs"
}
],
"dev": true,
"dev-package-names": [
+ "dealerdirect/phpcodesniffer-composer-installer",
"php-stubs/wordpress-stubs",
+ "phpcsstandards/phpcsextra",
+ "phpcsstandards/phpcsutils",
"phpstan/extension-installer",
"phpstan/phpstan",
+ "squizlabs/php_codesniffer",
"symfony/polyfill-php73",
- "szepeviktor/phpstan-wordpress"
+ "szepeviktor/phpstan-wordpress",
+ "wp-coding-standards/wpcs"
]
}
diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php
index f1e9c0d..544b81c 100644
--- a/vendor/composer/installed.php
+++ b/vendor/composer/installed.php
@@ -3,13 +3,22 @@
'name' => 'ilovepdf/ilovepdf-wp',
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
- 'reference' => 'fc26741699cef18a91fbe824de86cfcb1c7c48da',
+ 'reference' => '83f65b08d9396b3ea5971df4ddad8f61abe1123a',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev' => true,
),
'versions' => array(
+ 'dealerdirect/phpcodesniffer-composer-installer' => array(
+ 'pretty_version' => 'v1.0.0',
+ 'version' => '1.0.0.0',
+ 'reference' => '4be43904336affa5c2f70744a348312336afd0da',
+ 'type' => 'composer-plugin',
+ 'install_path' => __DIR__ . '/../dealerdirect/phpcodesniffer-composer-installer',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
'firebase/php-jwt' => array(
'pretty_version' => 'v6.10.1',
'version' => '6.10.1.0',
@@ -29,9 +38,9 @@
'dev_requirement' => false,
),
'guzzlehttp/promises' => array(
- 'pretty_version' => '2.0.3',
- 'version' => '2.0.3.0',
- 'reference' => '6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8',
+ 'pretty_version' => '2.0.4',
+ 'version' => '2.0.4.0',
+ 'reference' => 'f9c436286ab2892c7db7be8c8da4ef61ccf7b455',
'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/promises',
'aliases' => array(),
@@ -58,7 +67,7 @@
'ilovepdf/ilovepdf-wp' => array(
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
- 'reference' => 'fc26741699cef18a91fbe824de86cfcb1c7c48da',
+ 'reference' => '83f65b08d9396b3ea5971df4ddad8f61abe1123a',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -73,6 +82,24 @@
'aliases' => array(),
'dev_requirement' => true,
),
+ 'phpcsstandards/phpcsextra' => array(
+ 'pretty_version' => '1.2.1',
+ 'version' => '1.2.1.0',
+ 'reference' => '11d387c6642b6e4acaf0bd9bf5203b8cca1ec489',
+ 'type' => 'phpcodesniffer-standard',
+ 'install_path' => __DIR__ . '/../phpcsstandards/phpcsextra',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'phpcsstandards/phpcsutils' => array(
+ 'pretty_version' => '1.0.12',
+ 'version' => '1.0.12.0',
+ 'reference' => '87b233b00daf83fb70f40c9a28692be017ea7c6c',
+ 'type' => 'phpcodesniffer-standard',
+ 'install_path' => __DIR__ . '/../phpcsstandards/phpcsutils',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
'phpstan/extension-installer' => array(
'pretty_version' => '1.4.3',
'version' => '1.4.3.0',
@@ -83,9 +110,9 @@
'dev_requirement' => true,
),
'phpstan/phpstan' => array(
- 'pretty_version' => '1.12.5',
- 'version' => '1.12.5.0',
- 'reference' => '7e6c6cb7cecb0a6254009a1a8a7d54ec99812b17',
+ 'pretty_version' => '1.12.11',
+ 'version' => '1.12.11.0',
+ 'reference' => '0d1fc20a962a91be578bcfe7cf939e6e1a2ff733',
'type' => 'library',
'install_path' => __DIR__ . '/../phpstan/phpstan',
'aliases' => array(),
@@ -145,6 +172,15 @@
'aliases' => array(),
'dev_requirement' => false,
),
+ 'squizlabs/php_codesniffer' => array(
+ 'pretty_version' => '3.11.1',
+ 'version' => '3.11.1.0',
+ 'reference' => '19473c30efe4f7b3cd42522d0b2e6e7f243c6f87',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../squizlabs/php_codesniffer',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
'symfony/deprecation-contracts' => array(
'pretty_version' => 'v3.5.0',
'version' => '3.5.0.0',
@@ -172,5 +208,14 @@
'aliases' => array(),
'dev_requirement' => true,
),
+ 'wp-coding-standards/wpcs' => array(
+ 'pretty_version' => '3.1.0',
+ 'version' => '3.1.0.0',
+ 'reference' => '9333efcbff231f10dfd9c56bb7b65818b4733ca7',
+ 'type' => 'phpcodesniffer-standard',
+ 'install_path' => __DIR__ . '/../wp-coding-standards/wpcs',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
),
);
diff --git a/vendor/guzzlehttp/promises/CHANGELOG.md b/vendor/guzzlehttp/promises/CHANGELOG.md
index 707925a..c7c49a1 100644
--- a/vendor/guzzlehttp/promises/CHANGELOG.md
+++ b/vendor/guzzlehttp/promises/CHANGELOG.md
@@ -1,6 +1,13 @@
# CHANGELOG
+## 2.0.4 - 2024-10-17
+
+### Fixed
+
+- Once settled, don't allow further rejection of additional promises
+
+
## 2.0.3 - 2024-07-18
### Changed
diff --git a/vendor/guzzlehttp/promises/src/Utils.php b/vendor/guzzlehttp/promises/src/Utils.php
index 45b0893..3193d2a 100644
--- a/vendor/guzzlehttp/promises/src/Utils.php
+++ b/vendor/guzzlehttp/promises/src/Utils.php
@@ -144,7 +144,9 @@ function ($value, $idx) use (&$results): void {
$results[$idx] = $value;
},
function ($reason, $idx, Promise $aggregate): void {
- $aggregate->reject($reason);
+ if (Is::pending($aggregate)) {
+ $aggregate->reject($reason);
+ }
}
)->then(function () use (&$results) {
ksort($results);