diff --git a/README.txt b/README.txt index fdd2a16..4642b4f 100644 --- a/README.txt +++ b/README.txt @@ -1,13 +1,13 @@ === PDF Compressor & Watermark - iLovePDF === Plugin Name: Image Compressor & Optimizer - iLovePDF -Version: 2.1.5 +Version: 2.1.6 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.7 -Stable tag: 2.1.5 +Stable tag: 2.1.6 Requires PHP: 7.4 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html @@ -81,6 +81,11 @@ We will send you an email before limit is reached. When limit is reached, no mor == Changelog == += 2.1.6 = +Improved +* Update Libraries. +* Improved multisite support. + = 2.1.5 = Improved * Update Libraries. diff --git a/assets/js/main.min.js b/assets/js/main.min.js index 7b32abe..5fc8f40 100644 --- a/assets/js/main.min.js +++ b/assets/js/main.min.js @@ -1,4 +1,4 @@ -!function(n){"use strict";n(function(){jQuery(".color-field").wpColorPicker()}),n("#check-all-compress").on("click",function(){this.checked?n(".nslb-input").each(function(){this.checked=!0}):n(".nslb-input").each(function(){this.checked=!1})}),n(".nslb-input").on("click",function(){n(".nslb-input:checked").length==n(".nslb-input").length?n("#check-all-compress").prop("checked",!0):n("#check-all-compress").prop("checked",!1)}),n("#check-all-watermark").on("click",function(){this.checked?n(".nslb-input").each(function(){this.checked=!0}):n(".nslb-input").each(function(){this.checked=!1})}),n(".nslb-input").on("click",function(){n(".nslb-input:checked").length==n(".nslb-input").length?n("#check-all-watermark").prop("checked",!0):n("#check-all-watermark").prop("checked",!1)}),n("input[name$='ilove_pdf_display_settings_format_watermark[ilove_pdf_format_watermark_mode]']").on("change",function(){var e=n(this).val();n("div.watermark-mode").hide(),n("#div-mode"+e).show()});var r=!0,e=(n(".btn-cancel").on("click",function(){r=!1}),0),l=0;function a(i){0==e&&(l=i.length);var s=n("#file-row-"+i[0]).find("td:eq(3)");s.find("a").hide(),n(".all-compressing").show(),s.find(".compressing").show(),e++,n(".all-compressing span").html(e+"/"+l),n(".all-compressing .progress-percent").width(100*e/l+"%"),n.post("admin-post.php?action=ilovepdf_compress&id="+i[0]+"&ajax=1",function(e){var t;""==e||1!=e.status||e.api_error?"error_auth"==e.api_error?(tb_show("HAI","#TB_inline?height=240&width=405&inlineId=pricing_ilovepdf&modal=true",null),s.show()):(s.find(".compressing").hide(),(t=document.createElement("div")).innerHTML=e.api_error,s.find(".error").html(t.innerText).show(),i.splice(0,1),!jQuery.isEmptyObject(i)&&r?a(i):(n(".all-compressing").hide(),n(r?".compress-success":".compress-abort").show(),n("#cancel-compress").hide())):(s.find(".compressing").hide(),s.find(".success").show(),n("#file-row-"+i[0]).find("td:eq(2)").html(e.compress_size),i.splice(0,1),!jQuery.isEmptyObject(i)&&r?a(i):(n(".all-compressing").hide(),n(r?".compress-success":".compress-abort").show(),n("#cancel-compress").hide(),window.setTimeout(function(){n("#stats_total_files_compressed").html(e.total_files),n("#stats_initial_size").html(e.initial_size),n("#stats_current_size").html(e.current_size),n("#stats_total_percentage").html(e.percentage+"%"),n("#stats_total_percentage").parent(".c100").addClass("p"+e.percentage),n("#compress-pdf-list").load(document.URL+" #compress-pdf-list")},2e3)))},"json")}function o(i){0==e&&(l=i.length);var s=n("#file-row-"+i[0]).find("td:eq(2)");s.find("a").hide(),n(".all-applying-watermark").show(),s.find(".applying-watermark").show(),e++,n(".all-applying-watermark span").html(e+"/"+l),n(".all-applying-watermark .progress-percent").width(100*e/l+"%"),n.post("admin-post.php?action=ilovepdf_watermark&id="+i[0]+"&ajax=1",function(e){var t;""==e||1!=e.status||e.api_error?"error_auth"==e.api_error?(tb_show("HAI","#TB_inline?height=240&width=405&inlineId=pricing_ilovepdf&modal=true",null),s.show()):(s.find(".applying-watermark").hide(),(t=document.createElement("div")).innerHTML=e.api_error,s.find(".error").html(t.innerText).show(),i.splice(0,1),!jQuery.isEmptyObject(i)&&r?o(i):(n(".all-applying-watermark").hide(),n(r?".applied-success":".applied-abort").show(),n("#cancel-watermark").hide())):(s.find(".applying-watermark").hide(),s.find(".success").show(),i.splice(0,1),!jQuery.isEmptyObject(i)&&r?o(i):(n(".all-applying-watermark").hide(),n(r?".applied-success":".applied-abort").show(),n("#cancel-watermark").hide(),window.setTimeout(function(){n("#stats_total_files_watermarked").html(e.total_files),n("#watermark-pdf-list").load(document.URL+" #watermark-pdf-list")},2e3)))},"json")}n(".btn-compress-all").on("click",function(){n("#cancel-compress").css("display","inline-block"),n.ajax({type:"POST",url:"admin-post.php?action=ilovepdf_compress_list",success:function(e){var t,e=n.parseJSON(e);""!=e&&1==e.status?(l=e.list_pdf.length,a(e.list_pdf)):((t=document.createElement("div")).innerHTML=e,n(".compress-error").html(t.innerText).show())}})}),window.exportedCompressMultiPDF=a,n(".btn-watermark-all").on("click",function(){n("#cancel-watermark").css("display","inline-block"),n.ajax({type:"POST",url:"admin-post.php?action=ilovepdf_watermark_list",success:function(e){var t,e=n.parseJSON(e);""!=e&&1==e.status?(l=e.list_pdf.length,o(e.list_pdf)):((t=document.createElement("div")).innerHTML=e,n(".applied-error").html(t.innerText).show())}})}),window.exportedWatermarkMultiPDF=o,n(".btn-compress").on("click",function(e){var i=n(this),s=n(this).parent(),r=!1;e.preventDefault(),i.closest(".row-library").find(".btn-watermark").is(":visible")&&(r=!0),i.closest(".row-library").find(".btn-watermark").hide(),n(this).hide(),n(this).nextAll(".compressing").show(),n(this).nextAll(".success").hide(),n.post(n(this).prop("href")+"&ajax=1",function(e){var t;i.nextAll(".compressing").hide(),r&&i.closest(".row-library").find(".btn-watermark").show(),""==e||1!=e.status||e.api_error?("error_auth"==e.api_error?(tb_show("HAI","#TB_inline?height=240&width=405&inlineId=pricing_ilovepdf&modal=true",null),i):((t=document.createElement("div")).innerHTML=e.api_error,1==e.editpdf&&i.nextAll(".error").before("

"),i.nextAll(".error").html(t.innerText))).show():(console.log(e.api_error),i.nextAll(".success").show(),n("#stats_total_files_compressed").html(parseInt(n("#stats_total_files_compressed").html())+1),n("#stats_initial_size").html(e.initial_size),n("#stats_current_size").html(e.current_size),n("#stats_total_percentage").html(e.percentage+"%"),n("#stats_total_percentage").parent(".c100").addClass("p"+e.percentage),window.setTimeout(function(){i.nextAll(".success").hide(),1==e.library?i.nextAll(".stats-compress").html(' Compressed
Savings '+e.percent+"%"):(1==e.editpdf?i.prevAll("#current-size").find("strong"):(s.html(e.percent+"%"),s.closest("td").prev("td"))).html(e.compress_size)},3e3))},"json")}),n(".btn-watermark").on("click",function(e){var i=n(this),s=n(this).parent(),r=!1;e.preventDefault(),i.closest(".row-library").find(".btn-compress").is(":visible")&&(r=!0),i.closest(".row-library").find(".btn-compress").hide(),n(this).hide(),n(this).nextAll(".applying-watermark").show(),n(this).prevAll(".stats-compress").hide(),n(this).nextAll(".success").hide(),n.post(n(this).prop("href")+"&ajax=1",function(e){var t;i.nextAll(".applying-watermark").hide(),r&&i.closest(".row-library").find(".btn-compress").show(),""==e||1!=e.status||e.api_error?("error_auth"==e.api_error?(tb_show("HAI","#TB_inline?height=240&width=405&inlineId=pricing_ilovepdf&modal=true",null),i):((t=document.createElement("div")).innerHTML=e.api_error,1==e.editpdf&&i.nextAll(".error").before("

"),i.nextAll(".error").html(t.innerText))).show():(i.nextAll(".success").show(),n("#stats_total_files_watermarked").html(parseInt(n("#stats_total_files_watermarked").html())+1),window.setTimeout(function(){i.nextAll(".success").hide(),1==e.library?s.html(' Stamped'):1==e.editpdf&&s.append(' Stamped')},3e3))},"json")});const c=` +(n=>{n(function(){jQuery(".color-field").wpColorPicker()}),n("#check-all-compress").on("click",function(){this.checked?n(".nslb-input").each(function(){this.checked=!0}):n(".nslb-input").each(function(){this.checked=!1})}),n(".nslb-input").on("click",function(){n(".nslb-input:checked").length==n(".nslb-input").length?n("#check-all-compress").prop("checked",!0):n("#check-all-compress").prop("checked",!1)}),n("#check-all-watermark").on("click",function(){this.checked?n(".nslb-input").each(function(){this.checked=!0}):n(".nslb-input").each(function(){this.checked=!1})}),n(".nslb-input").on("click",function(){n(".nslb-input:checked").length==n(".nslb-input").length?n("#check-all-watermark").prop("checked",!0):n("#check-all-watermark").prop("checked",!1)}),n("input[name$='ilove_pdf_display_settings_format_watermark[ilove_pdf_format_watermark_mode]']").on("change",function(){var e=n(this).val();n("div.watermark-mode").hide(),n("#div-mode"+e).show()});var r=!0,e=(n(".btn-cancel").on("click",function(){r=!1}),0),l=0;function a(i){0==e&&(l=i.length);var s=n("#file-row-"+i[0]).find("td:eq(3)");s.find("a").hide(),n(".all-compressing").show(),s.find(".compressing").show(),e++,n(".all-compressing span").html(e+"/"+l),n(".all-compressing .progress-percent").width(100*e/l+"%"),n.post("admin-post.php?action=ilovepdf_compress&id="+i[0]+"&ajax=1",function(e){var t;""==e||1!=e.status||e.api_error?"error_auth"==e.api_error?(tb_show("HAI","#TB_inline?height=240&width=405&inlineId=pricing_ilovepdf&modal=true",null),s.show()):(s.find(".compressing").hide(),(t=document.createElement("div")).innerHTML=e.api_error,s.find(".error").html(t.innerText).show(),i.splice(0,1),!jQuery.isEmptyObject(i)&&r?a(i):(n(".all-compressing").hide(),n(r?".compress-success":".compress-abort").show(),n("#cancel-compress").hide())):(s.find(".compressing").hide(),s.find(".success").show(),n("#file-row-"+i[0]).find("td:eq(2)").html(e.compress_size),i.splice(0,1),!jQuery.isEmptyObject(i)&&r?a(i):(n(".all-compressing").hide(),n(r?".compress-success":".compress-abort").show(),n("#cancel-compress").hide(),window.setTimeout(function(){n("#stats_total_files_compressed").html(e.total_files),n("#stats_initial_size").html(e.initial_size),n("#stats_current_size").html(e.current_size),n("#stats_total_percentage").html(e.percentage+"%"),n("#stats_total_percentage").parent(".c100").addClass("p"+e.percentage),n("#compress-pdf-list").load(document.URL+" #compress-pdf-list")},2e3)))},"json")}function o(i){0==e&&(l=i.length);var s=n("#file-row-"+i[0]).find("td:eq(2)");s.find("a").hide(),n(".all-applying-watermark").show(),s.find(".applying-watermark").show(),e++,n(".all-applying-watermark span").html(e+"/"+l),n(".all-applying-watermark .progress-percent").width(100*e/l+"%"),n.post("admin-post.php?action=ilovepdf_watermark&id="+i[0]+"&ajax=1",function(e){var t;""==e||1!=e.status||e.api_error?"error_auth"==e.api_error?(tb_show("HAI","#TB_inline?height=240&width=405&inlineId=pricing_ilovepdf&modal=true",null),s.show()):(s.find(".applying-watermark").hide(),(t=document.createElement("div")).innerHTML=e.api_error,s.find(".error").html(t.innerText).show(),i.splice(0,1),!jQuery.isEmptyObject(i)&&r?o(i):(n(".all-applying-watermark").hide(),n(r?".applied-success":".applied-abort").show(),n("#cancel-watermark").hide())):(s.find(".applying-watermark").hide(),s.find(".success").show(),i.splice(0,1),!jQuery.isEmptyObject(i)&&r?o(i):(n(".all-applying-watermark").hide(),n(r?".applied-success":".applied-abort").show(),n("#cancel-watermark").hide(),window.setTimeout(function(){n("#stats_total_files_watermarked").html(e.total_files),n("#watermark-pdf-list").load(document.URL+" #watermark-pdf-list")},2e3)))},"json")}n(".btn-compress-all").on("click",function(){n("#cancel-compress").css("display","inline-block"),n.ajax({type:"POST",url:"admin-post.php?action=ilovepdf_compress_list",success:function(e){var t,e=n.parseJSON(e);""!=e&&1==e.status?(l=e.list_pdf.length,a(e.list_pdf)):((t=document.createElement("div")).innerHTML=e,n(".compress-error").html(t.innerText).show())}})}),window.exportedCompressMultiPDF=a,n(".btn-watermark-all").on("click",function(){n("#cancel-watermark").css("display","inline-block"),n.ajax({type:"POST",url:"admin-post.php?action=ilovepdf_watermark_list",success:function(e){var t,e=n.parseJSON(e);""!=e&&1==e.status?(l=e.list_pdf.length,o(e.list_pdf)):((t=document.createElement("div")).innerHTML=e,n(".applied-error").html(t.innerText).show())}})}),window.exportedWatermarkMultiPDF=o,n(".btn-compress").on("click",function(e){var i=n(this),s=n(this).parent(),r=!1;e.preventDefault(),i.closest(".row-library").find(".btn-watermark").is(":visible")&&(r=!0),i.closest(".row-library").find(".btn-watermark").hide(),n(this).hide(),n(this).nextAll(".compressing").show(),n(this).nextAll(".success").hide(),n.post(n(this).prop("href")+"&ajax=1",function(e){var t;i.nextAll(".compressing").hide(),r&&i.closest(".row-library").find(".btn-watermark").show(),""==e||1!=e.status||e.api_error?("error_auth"==e.api_error?(tb_show("HAI","#TB_inline?height=240&width=405&inlineId=pricing_ilovepdf&modal=true",null),i):((t=document.createElement("div")).innerHTML=e.api_error,1==e.editpdf&&i.nextAll(".error").before("

"),i.nextAll(".error").html(t.innerText))).show():(console.log(e.api_error),i.nextAll(".success").show(),n("#stats_total_files_compressed").html(parseInt(n("#stats_total_files_compressed").html())+1),n("#stats_initial_size").html(e.initial_size),n("#stats_current_size").html(e.current_size),n("#stats_total_percentage").html(e.percentage+"%"),n("#stats_total_percentage").parent(".c100").addClass("p"+e.percentage),window.setTimeout(function(){i.nextAll(".success").hide(),1==e.library?i.nextAll(".stats-compress").html(' Compressed
Savings '+e.percent+"%"):(1==e.editpdf?i.prevAll("#current-size").find("strong"):(s.html(e.percent+"%"),s.closest("td").prev("td"))).html(e.compress_size)},3e3))},"json")}),n(".btn-watermark").on("click",function(e){var i=n(this),s=n(this).parent(),r=!1;e.preventDefault(),i.closest(".row-library").find(".btn-compress").is(":visible")&&(r=!0),i.closest(".row-library").find(".btn-compress").hide(),n(this).hide(),n(this).nextAll(".applying-watermark").show(),n(this).prevAll(".stats-compress").hide(),n(this).nextAll(".success").hide(),n.post(n(this).prop("href")+"&ajax=1",function(e){var t;i.nextAll(".applying-watermark").hide(),r&&i.closest(".row-library").find(".btn-compress").show(),""==e||1!=e.status||e.api_error?("error_auth"==e.api_error?(tb_show("HAI","#TB_inline?height=240&width=405&inlineId=pricing_ilovepdf&modal=true",null),i):((t=document.createElement("div")).innerHTML=e.api_error,1==e.editpdf&&i.nextAll(".error").before("

"),i.nextAll(".error").html(t.innerText))).show():(i.nextAll(".success").show(),n("#stats_total_files_watermarked").html(parseInt(n("#stats_total_files_watermarked").html())+1),window.setTimeout(function(){i.nextAll(".success").hide(),1==e.library?s.html(' Stamped'):1==e.editpdf&&s.append(' Stamped')},3e3))},"json")});let c=`

Attention!

The changes applied by all the tools will be lost. Do you want to continue?

@@ -6,4 +6,4 @@ -
`;n(".btn-restore").on("click",function(e){var i=n(this);e.preventDefault(),n(this).parent().append(c);const t=document.getElementById("ilovepdf-restore-dialog");var e=document.getElementById("ilovepdf-dialog-aceptted"),s=document.getElementById("ilovepdf-dialog-close");t.showModal(),e.addEventListener("click",e=>{e.preventDefault(),t.close(),n(this).hide(),n(this).prev().hide(),n(this).nextAll(".loading").show(),n(this).parent().prevAll(".row-compress-tool").hide(),n(this).parent().prevAll(".row-watermark-tool").hide(),n.post(n(this).prop("href")+"&ajax=1",function(e){var t;i.nextAll(".loading").hide(),(""===e?i.nextAll(".success"):((t=document.createElement("div")).innerHTML=e,i.nextAll(".error").html(t.innerText))).show()})}),s.addEventListener("click",e=>{e.preventDefault(),t.close()})}),n(".ilovepdf--meta-box-container .link-restore, .compat-field-iLovePDF-tools .link-restore").on("click",function(e){const t=n(this)[0].href,i=(e.preventDefault(),n(".ilovepdf--meta-box-container").append(c),document.getElementById("ilovepdf-restore-dialog"));var e=document.getElementById("ilovepdf-dialog-aceptted"),s=document.getElementById("ilovepdf-dialog-close");i.showModal(),e.addEventListener("click",e=>{e.preventDefault(),i.close(),location.href=t}),s.addEventListener("click",e=>{e.preventDefault(),i.close()})})}(jQuery); \ No newline at end of file + `;n(".btn-restore").on("click",function(e){var i=n(this);e.preventDefault(),n(this).parent().append(c);let t=document.getElementById("ilovepdf-restore-dialog");var e=document.getElementById("ilovepdf-dialog-aceptted"),s=document.getElementById("ilovepdf-dialog-close");t.showModal(),e.addEventListener("click",e=>{e.preventDefault(),t.close(),n(this).hide(),n(this).prev().hide(),n(this).nextAll(".loading").show(),n(this).parent().prevAll(".row-compress-tool").hide(),n(this).parent().prevAll(".row-watermark-tool").hide(),n.post(n(this).prop("href")+"&ajax=1",function(e){var t;i.nextAll(".loading").hide(),(""===e?i.nextAll(".success"):((t=document.createElement("div")).innerHTML=e,i.nextAll(".error").html(t.innerText))).show()})}),s.addEventListener("click",e=>{e.preventDefault(),t.close()})}),n(".ilovepdf--meta-box-container .link-restore, .compat-field-iLovePDF-tools .link-restore").on("click",function(e){let t=n(this),i=t[0].href,s=(e.preventDefault(),n(".ilovepdf--meta-box-container").append(c),document.getElementById("ilovepdf-restore-dialog"));var e=document.getElementById("ilovepdf-dialog-aceptted"),r=document.getElementById("ilovepdf-dialog-close");s.showModal(),e.addEventListener("click",e=>{e.preventDefault(),s.close(),location.href=i}),r.addEventListener("click",e=>{e.preventDefault(),s.close()})})})(jQuery); \ No newline at end of file diff --git a/composer.json b/composer.json index 65714aa..ef01b50 100644 --- a/composer.json +++ b/composer.json @@ -15,8 +15,8 @@ "ilovepdf/ilovepdf-php": "^1.2" }, "require-dev": { - "phpstan/phpstan": "^1.12", - "szepeviktor/phpstan-wordpress": "^1.3", + "phpstan/phpstan": "^2.1", + "szepeviktor/phpstan-wordpress": "^2.0", "phpstan/extension-installer": "^1.4", "wp-coding-standards/wpcs": "^3.0" }, diff --git a/ilove-pdf.php b/ilove-pdf.php index fddc6e0..57d93d0 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.5 + * Version: 2.1.6 * 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; } - Ilove_Pdf::update_option( 'ilove_pdf_display_general_settings', $get_options ); + Ilove_Pdf::update_option( 'ilove_pdf_display_general_settings', $get_options, true ); } } diff --git a/includes/Ilove_Pdf.php b/includes/Ilove_Pdf.php index 56dfd4a..46cba9e 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.5'; + $this->version = 'wp.2.1.6'; $this->load_dependencies(); $this->set_locale(); @@ -179,37 +179,31 @@ 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 $update_all_sites Optional. Whether to update all sites in the network. * @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 ) { + public static function update_option( $option, $value, $update_all_sites = false, $autoload = null ) { - if ( ! self::is_multisite() ) { + if ( ! 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(); - } + if ( ! $update_all_sites ) { + self::switch_update_blog( get_current_blog_id(), $option, $value, $autoload ); + return; + } + + $sites = get_sites(); + foreach ( $sites as $site ) { + self::switch_update_blog( (int) $site->blog_id, $option, $value, $autoload ); + } } /** @@ -224,7 +218,7 @@ public static function create_dir( $directories ) { $directories = array( $directories ); } - if ( ! self::is_multisite() ) { + if ( ! is_multisite() ) { foreach ( $directories as $directory ) { $upload_dir = wp_upload_dir(); $directory = $upload_dir['basedir'] . $directory; @@ -252,4 +246,19 @@ public static function create_dir( $directories ) { restore_current_blog(); } } + + /** + * Switch to blog and update option + * + * @since 2.1.6 + * @param int $blog_id ID of the blog to switch to. + * @param string $option Name of the option to update. + * @param mixed $value Option value. + * @param bool|null $autoload Whether to load the option when WordPress starts up. + */ + private static function switch_update_blog( $blog_id, $option, $value, $autoload ) { + switch_to_blog( $blog_id ); + update_option( $option, $value, $autoload ); + restore_current_blog(); + } } diff --git a/package.json b/package.json index a95cf2f..5bb90a0 100644 --- a/package.json +++ b/package.json @@ -13,9 +13,9 @@ "gulp-autoprefixer": "^9.0.0", "gulp-clean-css": "^4.3.0", "gulp-rename": "^2.0.0", - "gulp-sass": "^5.1.0", + "gulp-sass": "^6.0.0", "gulp-uglify": "^3.0.2", "merge-stream": "^2.0.0", - "sass": "^1.80" + "sass": "^1.83" } } diff --git a/phpstan.neon b/phpstan.neon index 00b3825..0935c56 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -8,6 +8,6 @@ parameters: excludePaths: analyseAndScan: - vendor - - node_modules + - node_modules? analyse: - vendor/ilovepdf \ No newline at end of file diff --git a/vendor/autoload.php b/vendor/autoload.php index 47d3c3f..5c7da03 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -22,4 +22,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit634bd29bd263e33ce5cb3f59c562e5cc::getLoader(); +return ComposerAutoloaderInit52f8510a30b66ec23034f2df95e5df31::getLoader(); diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php index 51e734a..07b32ed 100644 --- a/vendor/composer/InstalledVersions.php +++ b/vendor/composer/InstalledVersions.php @@ -322,6 +322,7 @@ private static function getInstalled() } $installed = array(); + $copiedLocalDir = false; if (self::$canGetVendors) { foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { @@ -330,9 +331,11 @@ private static function getInstalled() } elseif (is_file($vendorDir.'/composer/installed.php')) { /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ $required = require $vendorDir.'/composer/installed.php'; - $installed[] = self::$installedByVendor[$vendorDir] = $required; - if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { - self::$installed = $installed[count($installed) - 1]; + self::$installedByVendor[$vendorDir] = $required; + $installed[] = $required; + if (strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { + self::$installed = $required; + $copiedLocalDir = true; } } } @@ -350,7 +353,7 @@ private static function getInstalled() } } - if (self::$installed !== array()) { + if (self::$installed !== array() && !$copiedLocalDir) { $installed[] = self::$installed; } diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index f1eb999..e4c9cad 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit634bd29bd263e33ce5cb3f59c562e5cc +class ComposerAutoloaderInit52f8510a30b66ec23034f2df95e5df31 { private static $loader; @@ -22,16 +22,16 @@ public static function getLoader() return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit634bd29bd263e33ce5cb3f59c562e5cc', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit52f8510a30b66ec23034f2df95e5df31', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInit634bd29bd263e33ce5cb3f59c562e5cc', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit52f8510a30b66ec23034f2df95e5df31', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit634bd29bd263e33ce5cb3f59c562e5cc::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit52f8510a30b66ec23034f2df95e5df31::getInitializer($loader)); $loader->register(true); - $filesToLoad = \Composer\Autoload\ComposerStaticInit634bd29bd263e33ce5cb3f59c562e5cc::$files; + $filesToLoad = \Composer\Autoload\ComposerStaticInit52f8510a30b66ec23034f2df95e5df31::$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 1b32e8c..2c9d366 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit634bd29bd263e33ce5cb3f59c562e5cc +class ComposerStaticInit52f8510a30b66ec23034f2df95e5df31 { public static $files = array ( '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php', @@ -83,9 +83,9 @@ class ComposerStaticInit634bd29bd263e33ce5cb3f59c562e5cc public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit634bd29bd263e33ce5cb3f59c562e5cc::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit634bd29bd263e33ce5cb3f59c562e5cc::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit634bd29bd263e33ce5cb3f59c562e5cc::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit52f8510a30b66ec23034f2df95e5df31::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit52f8510a30b66ec23034f2df95e5df31::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit52f8510a30b66ec23034f2df95e5df31::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 2b72f5a..3763d57 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -83,17 +83,17 @@ }, { "name": "firebase/php-jwt", - "version": "v6.10.1", - "version_normalized": "6.10.1.0", + "version": "v6.10.2", + "version_normalized": "6.10.2.0", "source": { "type": "git", "url": "https://github.com/firebase/php-jwt.git", - "reference": "500501c2ce893c824c801da135d02661199f60c5" + "reference": "30c19ed0f3264cb660ea496895cfb6ef7ee3653b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/firebase/php-jwt/zipball/500501c2ce893c824c801da135d02661199f60c5", - "reference": "500501c2ce893c824c801da135d02661199f60c5", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/30c19ed0f3264cb660ea496895cfb6ef7ee3653b", + "reference": "30c19ed0f3264cb660ea496895cfb6ef7ee3653b", "shasum": "" }, "require": { @@ -111,7 +111,7 @@ "ext-sodium": "Support EdDSA (Ed25519) signatures", "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present" }, - "time": "2024-05-18T18:05:11+00:00", + "time": "2024-11-24T11:22:49+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -143,7 +143,7 @@ ], "support": { "issues": "https://github.com/firebase/php-jwt/issues", - "source": "https://github.com/firebase/php-jwt/tree/v6.10.1" + "source": "https://github.com/firebase/php-jwt/tree/v6.10.2" }, "install-path": "../firebase/php-jwt" }, @@ -534,17 +534,17 @@ }, { "name": "php-stubs/wordpress-stubs", - "version": "v6.6.2", - "version_normalized": "6.6.2.0", + "version": "v6.7.1", + "version_normalized": "6.7.1.0", "source": { "type": "git", "url": "https://github.com/php-stubs/wordpress-stubs.git", - "reference": "f50fd7ed45894d036e4fef9ab7e5bbbaff6a30cc" + "reference": "83448e918bf06d1ed3d67ceb6a985fc266a02fd1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/f50fd7ed45894d036e4fef9ab7e5bbbaff6a30cc", - "reference": "f50fd7ed45894d036e4fef9ab7e5bbbaff6a30cc", + "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/83448e918bf06d1ed3d67ceb6a985fc266a02fd1", + "reference": "83448e918bf06d1ed3d67ceb6a985fc266a02fd1", "shasum": "" }, "require-dev": { @@ -553,9 +553,9 @@ "php": "^7.4 || ^8.0", "php-stubs/generator": "^0.8.3", "phpdocumentor/reflection-docblock": "^5.4.1", - "phpstan/phpstan": "^1.10.49", + "phpstan/phpstan": "^1.11", "phpunit/phpunit": "^9.5", - "szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset": "^1.0", + "szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset": "^1.1.1", "wp-coding-standards/wpcs": "3.1.0 as 2.3.0" }, "suggest": { @@ -563,7 +563,7 @@ "symfony/polyfill-php80": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", "szepeviktor/phpstan-wordpress": "WordPress extensions for PHPStan" }, - "time": "2024-09-30T07:10:48+00:00", + "time": "2024-11-24T03:57:09+00:00", "type": "library", "installation-source": "dist", "notification-url": "https://packagist.org/downloads/", @@ -579,7 +579,7 @@ ], "support": { "issues": "https://github.com/php-stubs/wordpress-stubs/issues", - "source": "https://github.com/php-stubs/wordpress-stubs/tree/v6.6.2" + "source": "https://github.com/php-stubs/wordpress-stubs/tree/v6.7.1" }, "install-path": "../php-stubs/wordpress-stubs" }, @@ -808,26 +808,26 @@ }, { "name": "phpstan/phpstan", - "version": "1.12.11", - "version_normalized": "1.12.11.0", + "version": "2.1.1", + "version_normalized": "2.1.1.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "0d1fc20a962a91be578bcfe7cf939e6e1a2ff733" + "reference": "cd6e973e04b4c2b94c86e8612b5a65f0da0e08e7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/0d1fc20a962a91be578bcfe7cf939e6e1a2ff733", - "reference": "0d1fc20a962a91be578bcfe7cf939e6e1a2ff733", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/cd6e973e04b4c2b94c86e8612b5a65f0da0e08e7", + "reference": "cd6e973e04b4c2b94c86e8612b5a65f0da0e08e7", "shasum": "" }, "require": { - "php": "^7.2|^8.0" + "php": "^7.4|^8.0" }, "conflict": { "phpstan/phpstan-shim": "*" }, - "time": "2024-11-17T14:08:01+00:00", + "time": "2025-01-05T16:43:48+00:00", "bin": [ "phpstan", "phpstan.phar" @@ -1085,17 +1085,17 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.11.1", - "version_normalized": "3.11.1.0", + "version": "3.11.2", + "version_normalized": "3.11.2.0", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "19473c30efe4f7b3cd42522d0b2e6e7f243c6f87" + "reference": "1368f4a58c3c52114b86b1abe8f4098869cb0079" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/19473c30efe4f7b3cd42522d0b2e6e7f243c6f87", - "reference": "19473c30efe4f7b3cd42522d0b2e6e7f243c6f87", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/1368f4a58c3c52114b86b1abe8f4098869cb0079", + "reference": "1368f4a58c3c52114b86b1abe8f4098869cb0079", "shasum": "" }, "require": { @@ -1107,7 +1107,7 @@ "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", + "time": "2024-12-11T16:04:26+00:00", "bin": [ "bin/phpcbf", "bin/phpcs" @@ -1168,31 +1168,31 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.5.0", - "version_normalized": "3.5.0.0", + "version": "v3.5.1", + "version_normalized": "3.5.1.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", - "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", "shasum": "" }, "require": { "php": ">=8.1" }, - "time": "2024-04-18T09:32:20+00:00", + "time": "2024-09-25T14:20:29+00:00", "type": "library", "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, "branch-alias": { "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" } }, "installation-source": "dist", @@ -1218,7 +1218,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" }, "funding": [ { @@ -1236,119 +1236,39 @@ ], "install-path": "../symfony/deprecation-contracts" }, - { - "name": "symfony/polyfill-php73", - "version": "v1.31.0", - "version_normalized": "1.31.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f68c03565dcaaf25a890667542e8bd75fe7e5bb", - "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "time": "2024-09-09T11:45:10+00:00", - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.31.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/polyfill-php73" - }, { "name": "szepeviktor/phpstan-wordpress", - "version": "v1.3.5", - "version_normalized": "1.3.5.0", + "version": "v2.0.1", + "version_normalized": "2.0.1.0", "source": { "type": "git", "url": "https://github.com/szepeviktor/phpstan-wordpress.git", - "reference": "7f8cfe992faa96b6a33bbd75c7bace98864161e7" + "reference": "f7beb13cd22998e3d913fdb897a1e2553ccd637e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/szepeviktor/phpstan-wordpress/zipball/7f8cfe992faa96b6a33bbd75c7bace98864161e7", - "reference": "7f8cfe992faa96b6a33bbd75c7bace98864161e7", + "url": "https://api.github.com/repos/szepeviktor/phpstan-wordpress/zipball/f7beb13cd22998e3d913fdb897a1e2553ccd637e", + "reference": "f7beb13cd22998e3d913fdb897a1e2553ccd637e", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "php-stubs/wordpress-stubs": "^4.7 || ^5.0 || ^6.0", - "phpstan/phpstan": "^1.10.31", - "symfony/polyfill-php73": "^1.12.0" + "php": "^7.4 || ^8.0", + "php-stubs/wordpress-stubs": "^6.6.2", + "phpstan/phpstan": "^2.0" }, "require-dev": { "composer/composer": "^2.1.14", "dealerdirect/phpcodesniffer-composer-installer": "^1.0", "php-parallel-lint/php-parallel-lint": "^1.1", - "phpstan/phpstan-strict-rules": "^1.2", - "phpunit/phpunit": "^8.0 || ^9.0", + "phpstan/phpstan-strict-rules": "^2.0", + "phpunit/phpunit": "^9.0", "szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset": "^1.0", "wp-coding-standards/wpcs": "3.1.0 as 2.3.0" }, "suggest": { "swissspidy/phpstan-no-private": "Detect usage of internal core functions, classes and methods" }, - "time": "2024-06-28T22:27:19+00:00", + "time": "2024-12-01T02:13:05+00:00", "type": "phpstan-extension", "extra": { "phpstan": { @@ -1377,7 +1297,7 @@ ], "support": { "issues": "https://github.com/szepeviktor/phpstan-wordpress/issues", - "source": "https://github.com/szepeviktor/phpstan-wordpress/tree/v1.3.5" + "source": "https://github.com/szepeviktor/phpstan-wordpress/tree/v2.0.1" }, "install-path": "../szepeviktor/phpstan-wordpress" }, @@ -1460,7 +1380,6 @@ "phpstan/extension-installer", "phpstan/phpstan", "squizlabs/php_codesniffer", - "symfony/polyfill-php73", "szepeviktor/phpstan-wordpress", "wp-coding-standards/wpcs" ] diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 544b81c..3498eb5 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'ilovepdf/ilovepdf-wp', 'pretty_version' => 'dev-develop', 'version' => 'dev-develop', - 'reference' => '83f65b08d9396b3ea5971df4ddad8f61abe1123a', + 'reference' => '7f4c5eee2d7205b8ff3b601e5845e6457c8cf675', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -20,9 +20,9 @@ 'dev_requirement' => true, ), 'firebase/php-jwt' => array( - 'pretty_version' => 'v6.10.1', - 'version' => '6.10.1.0', - 'reference' => '500501c2ce893c824c801da135d02661199f60c5', + 'pretty_version' => 'v6.10.2', + 'version' => '6.10.2.0', + 'reference' => '30c19ed0f3264cb660ea496895cfb6ef7ee3653b', 'type' => 'library', 'install_path' => __DIR__ . '/../firebase/php-jwt', 'aliases' => array(), @@ -67,16 +67,16 @@ 'ilovepdf/ilovepdf-wp' => array( 'pretty_version' => 'dev-develop', 'version' => 'dev-develop', - 'reference' => '83f65b08d9396b3ea5971df4ddad8f61abe1123a', + 'reference' => '7f4c5eee2d7205b8ff3b601e5845e6457c8cf675', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => false, ), 'php-stubs/wordpress-stubs' => array( - 'pretty_version' => 'v6.6.2', - 'version' => '6.6.2.0', - 'reference' => 'f50fd7ed45894d036e4fef9ab7e5bbbaff6a30cc', + 'pretty_version' => 'v6.7.1', + 'version' => '6.7.1.0', + 'reference' => '83448e918bf06d1ed3d67ceb6a985fc266a02fd1', 'type' => 'library', 'install_path' => __DIR__ . '/../php-stubs/wordpress-stubs', 'aliases' => array(), @@ -110,9 +110,9 @@ 'dev_requirement' => true, ), 'phpstan/phpstan' => array( - 'pretty_version' => '1.12.11', - 'version' => '1.12.11.0', - 'reference' => '0d1fc20a962a91be578bcfe7cf939e6e1a2ff733', + 'pretty_version' => '2.1.1', + 'version' => '2.1.1.0', + 'reference' => 'cd6e973e04b4c2b94c86e8612b5a65f0da0e08e7', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpstan', 'aliases' => array(), @@ -173,36 +173,27 @@ 'dev_requirement' => false, ), 'squizlabs/php_codesniffer' => array( - 'pretty_version' => '3.11.1', - 'version' => '3.11.1.0', - 'reference' => '19473c30efe4f7b3cd42522d0b2e6e7f243c6f87', + 'pretty_version' => '3.11.2', + 'version' => '3.11.2.0', + 'reference' => '1368f4a58c3c52114b86b1abe8f4098869cb0079', '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', - 'reference' => '0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1', + 'pretty_version' => 'v3.5.1', + 'version' => '3.5.1.0', + 'reference' => '74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', 'aliases' => array(), 'dev_requirement' => false, ), - 'symfony/polyfill-php73' => array( - 'pretty_version' => 'v1.31.0', - 'version' => '1.31.0.0', - 'reference' => '0f68c03565dcaaf25a890667542e8bd75fe7e5bb', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/polyfill-php73', - 'aliases' => array(), - 'dev_requirement' => true, - ), 'szepeviktor/phpstan-wordpress' => array( - 'pretty_version' => 'v1.3.5', - 'version' => '1.3.5.0', - 'reference' => '7f8cfe992faa96b6a33bbd75c7bace98864161e7', + 'pretty_version' => 'v2.0.1', + 'version' => '2.0.1.0', + 'reference' => 'f7beb13cd22998e3d913fdb897a1e2553ccd637e', 'type' => 'phpstan-extension', 'install_path' => __DIR__ . '/../szepeviktor/phpstan-wordpress', 'aliases' => array(), diff --git a/vendor/firebase/php-jwt/CHANGELOG.md b/vendor/firebase/php-jwt/CHANGELOG.md index 2662b05..5feeb5a 100644 --- a/vendor/firebase/php-jwt/CHANGELOG.md +++ b/vendor/firebase/php-jwt/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [6.10.2](https://github.com/firebase/php-jwt/compare/v6.10.1...v6.10.2) (2024-11-24) + + +### Bug Fixes + +* Mitigate PHP8.4 deprecation warnings ([#570](https://github.com/firebase/php-jwt/issues/570)) ([76808fa](https://github.com/firebase/php-jwt/commit/76808fa227f3811aa5cdb3bf81233714b799a5b5)) +* support php 8.4 ([#583](https://github.com/firebase/php-jwt/issues/583)) ([e3d68b0](https://github.com/firebase/php-jwt/commit/e3d68b044421339443c74199edd020e03fb1887e)) + ## [6.10.1](https://github.com/firebase/php-jwt/compare/v6.10.0...v6.10.1) (2024-05-18) diff --git a/vendor/firebase/php-jwt/src/CachedKeySet.php b/vendor/firebase/php-jwt/src/CachedKeySet.php index 65bab74..8e8e8d6 100644 --- a/vendor/firebase/php-jwt/src/CachedKeySet.php +++ b/vendor/firebase/php-jwt/src/CachedKeySet.php @@ -80,9 +80,9 @@ public function __construct( ClientInterface $httpClient, RequestFactoryInterface $httpFactory, CacheItemPoolInterface $cache, - int $expiresAfter = null, + ?int $expiresAfter = null, bool $rateLimit = false, - string $defaultAlg = null + ?string $defaultAlg = null ) { $this->jwksUri = $jwksUri; $this->httpClient = $httpClient; @@ -180,7 +180,7 @@ private function keyIdExists(string $keyId): bool $jwksResponse = $this->httpClient->sendRequest($request); if ($jwksResponse->getStatusCode() !== 200) { throw new UnexpectedValueException( - sprintf('HTTP Error: %d %s for URI "%s"', + \sprintf('HTTP Error: %d %s for URI "%s"', $jwksResponse->getStatusCode(), $jwksResponse->getReasonPhrase(), $this->jwksUri, diff --git a/vendor/firebase/php-jwt/src/JWK.php b/vendor/firebase/php-jwt/src/JWK.php index 63fb248..6efc2fe 100644 --- a/vendor/firebase/php-jwt/src/JWK.php +++ b/vendor/firebase/php-jwt/src/JWK.php @@ -52,7 +52,7 @@ class JWK * * @uses parseKey */ - public static function parseKeySet(array $jwks, string $defaultAlg = null): array + public static function parseKeySet(array $jwks, ?string $defaultAlg = null): array { $keys = []; @@ -93,7 +93,7 @@ public static function parseKeySet(array $jwks, string $defaultAlg = null): arra * * @uses createPemFromModulusAndExponent */ - public static function parseKey(array $jwk, string $defaultAlg = null): ?Key + public static function parseKey(array $jwk, ?string $defaultAlg = null): ?Key { if (empty($jwk)) { throw new InvalidArgumentException('JWK must not be empty'); @@ -212,7 +212,7 @@ private static function createPemFromCrvAndXYCoordinates(string $crv, string $x, ) ); - return sprintf( + return \sprintf( "-----BEGIN PUBLIC KEY-----\n%s\n-----END PUBLIC KEY-----\n", wordwrap(base64_encode($pem), 64, "\n", true) ); diff --git a/vendor/firebase/php-jwt/src/JWT.php b/vendor/firebase/php-jwt/src/JWT.php index e9d7563..dd9292a 100644 --- a/vendor/firebase/php-jwt/src/JWT.php +++ b/vendor/firebase/php-jwt/src/JWT.php @@ -96,7 +96,7 @@ class JWT public static function decode( string $jwt, $keyOrKeyArray, - stdClass &$headers = null + ?stdClass &$headers = null ): stdClass { // Validate JWT $timestamp = \is_null(static::$timestamp) ? \time() : static::$timestamp; @@ -200,11 +200,11 @@ public static function encode( array $payload, $key, string $alg, - string $keyId = null, - array $head = null + ?string $keyId = null, + ?array $head = null ): string { $header = ['typ' => 'JWT']; - if (isset($head) && \is_array($head)) { + if (isset($head)) { $header = \array_merge($header, $head); } $header['alg'] = $alg; @@ -387,12 +387,7 @@ public static function jsonDecode(string $input) */ public static function jsonEncode(array $input): string { - if (PHP_VERSION_ID >= 50400) { - $json = \json_encode($input, \JSON_UNESCAPED_SLASHES); - } else { - // PHP 5.3 only - $json = \json_encode($input); - } + $json = \json_encode($input, \JSON_UNESCAPED_SLASHES); if ($errno = \json_last_error()) { self::handleJsonError($errno); } elseif ($json === 'null') { diff --git a/vendor/symfony/polyfill-php73/LICENSE b/vendor/symfony/polyfill-php73/LICENSE deleted file mode 100644 index 7536cae..0000000 --- a/vendor/symfony/polyfill-php73/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018-present Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/polyfill-php73/Php73.php b/vendor/symfony/polyfill-php73/Php73.php deleted file mode 100644 index 65c35a6..0000000 --- a/vendor/symfony/polyfill-php73/Php73.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Php73; - -/** - * @author Gabriel Caruso - * @author Ion Bazan - * - * @internal - */ -final class Php73 -{ - public static $startAt = 1533462603; - - /** - * @param bool $asNum - * - * @return array|float|int - */ - public static function hrtime($asNum = false) - { - $ns = microtime(false); - $s = substr($ns, 11) - self::$startAt; - $ns = 1E9 * (float) $ns; - - if ($asNum) { - $ns += $s * 1E9; - - return \PHP_INT_SIZE === 4 ? $ns : (int) $ns; - } - - return [$s, (int) $ns]; - } -} diff --git a/vendor/symfony/polyfill-php73/README.md b/vendor/symfony/polyfill-php73/README.md deleted file mode 100644 index 032fafb..0000000 --- a/vendor/symfony/polyfill-php73/README.md +++ /dev/null @@ -1,18 +0,0 @@ -Symfony Polyfill / Php73 -======================== - -This component provides functions added to PHP 7.3 core: - -- [`array_key_first`](https://php.net/array_key_first) -- [`array_key_last`](https://php.net/array_key_last) -- [`hrtime`](https://php.net/function.hrtime) -- [`is_countable`](https://php.net/is_countable) -- [`JsonException`](https://php.net/JsonException) - -More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). - -License -======= - -This library is released under the [MIT license](LICENSE). diff --git a/vendor/symfony/polyfill-php73/Resources/stubs/JsonException.php b/vendor/symfony/polyfill-php73/Resources/stubs/JsonException.php deleted file mode 100644 index f06d6c2..0000000 --- a/vendor/symfony/polyfill-php73/Resources/stubs/JsonException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -if (\PHP_VERSION_ID < 70300) { - class JsonException extends Exception - { - } -} diff --git a/vendor/symfony/polyfill-php73/bootstrap.php b/vendor/symfony/polyfill-php73/bootstrap.php deleted file mode 100644 index d6b2153..0000000 --- a/vendor/symfony/polyfill-php73/bootstrap.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Php73 as p; - -if (\PHP_VERSION_ID >= 70300) { - return; -} - -if (!function_exists('is_countable')) { - function is_countable($value) { return is_array($value) || $value instanceof Countable || $value instanceof ResourceBundle || $value instanceof SimpleXmlElement; } -} -if (!function_exists('hrtime')) { - require_once __DIR__.'/Php73.php'; - p\Php73::$startAt = (int) microtime(true); - function hrtime($as_number = false) { return p\Php73::hrtime($as_number); } -} -if (!function_exists('array_key_first')) { - function array_key_first(array $array) { foreach ($array as $key => $value) { return $key; } } -} -if (!function_exists('array_key_last')) { - function array_key_last(array $array) { return key(array_slice($array, -1, 1, true)); } -} diff --git a/vendor/symfony/polyfill-php73/composer.json b/vendor/symfony/polyfill-php73/composer.json deleted file mode 100644 index 09d98cb..0000000 --- a/vendor/symfony/polyfill-php73/composer.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "symfony/polyfill-php73", - "type": "library", - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "keywords": ["polyfill", "shim", "compatibility", "portable"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2" - }, - "autoload": { - "psr-4": { "Symfony\\Polyfill\\Php73\\": "" }, - "files": [ "bootstrap.php" ], - "classmap": [ "Resources/stubs" ] - }, - "minimum-stability": "dev", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - } -}