From b56c9fb7a17390bbbe8f99a47e6e19bcf7189c54 Mon Sep 17 00:00:00 2001 From: Khoi Nguyen Date: Fri, 22 May 2026 16:13:43 +0700 Subject: [PATCH] PHP 8.2-8.4 compatibility: fix missing property in Gravity Forms class, fix manifest key mismatch, bump to 1.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add missing $options property declaration in Codetot_Optimization_Gravity_Forms (PHP 8.2+ dynamic properties deprecation) - Fix disable_manifest → disable_wlw_manifest key mismatch in Process class - Bump Requires PHP from 7.3 to 7.4 - Bump version to 1.2.0, update tested up to WP 6.8 --- README.txt | 10 ++++++++-- codetot-optimization.php | 6 +++--- includes/class-codetot-optimization-gravity-forms.php | 7 +++++++ includes/class-codetot-optimization-process.php | 2 +- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/README.txt b/README.txt index 0f22c7e..1593b2d 100644 --- a/README.txt +++ b/README.txt @@ -3,8 +3,8 @@ Contributors: khoipro, codetot Donate link: https://codetot.com Tags: optimization, compress, settings, codetot Requires at least: 5.0 -Tested up to: 6.6 -Stable tag: 1.1.1 +Tested up to: 6.8 +Stable tag: 1.2.0 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -77,6 +77,12 @@ Yes, if you are using our themes. == Changelog == += 1.2.0 = +* PHP 8.2-8.4 compatibility: fix missing property declaration in Gravity Forms class +* Fix manifest option key mismatch (disable_manifest → disable_wlw_manifest) +* Bump minimum PHP requirement to 7.4 +* Tested up to WordPress 6.8 + = 1.1.1 = * Fix PHP 8.1+ deprecation warnings for null/false passed to strip_tags() and strtotime() * Fix parse_url() return value not checked in get_domain_from_url() diff --git a/codetot-optimization.php b/codetot-optimization.php index 95fd1a5..e387c4c 100644 --- a/codetot-optimization.php +++ b/codetot-optimization.php @@ -8,9 +8,9 @@ * Plugin Name: CT Optimization * Plugin URI: https://codetot.com * Description: Provides settings for enable/disable WordPress core features and some tweaks for ACF, Gravity Forms, such like Enable CDN, Lazyload assets. - * Version: 1.1.1 + * Version: 1.2.0 * Requires at least: 5.0 - * Requires PHP: 7.3 + * Requires PHP: 7.4 * Author: CODE TOT JSC * Author URI: https://codetot.com * License: GPL-2.0+ @@ -24,7 +24,7 @@ die; } -define( 'CODETOT_OPTIMIZATION_VERSION', '1.1.1' ); +define( 'CODETOT_OPTIMIZATION_VERSION', '1.2.0' ); define( 'CODETOT_OPTIMIZATION_PATH', plugin_dir_path(__FILE__) ); define( 'CODETOT_OPTIMIZATION_URL', plugin_dir_url(__FILE__) ); diff --git a/includes/class-codetot-optimization-gravity-forms.php b/includes/class-codetot-optimization-gravity-forms.php index 42d076c..ab8b47d 100644 --- a/includes/class-codetot-optimization-gravity-forms.php +++ b/includes/class-codetot-optimization-gravity-forms.php @@ -16,6 +16,13 @@ class Codetot_Optimization_Gravity_Forms */ private static $instance; + /** + * Plugin options. + * + * @var array + */ + private $options; + /** * Get singleton instance. * diff --git a/includes/class-codetot-optimization-process.php b/includes/class-codetot-optimization-process.php index a7c0bfb..2cc76ad 100644 --- a/includes/class-codetot-optimization-process.php +++ b/includes/class-codetot-optimization-process.php @@ -329,7 +329,7 @@ public function check_short_link() public function check_manifest() { - if (!empty($this->options['disable_manifest'])) { + if (!empty($this->options['disable_wlw_manifest'])) { remove_action('wp_head', 'wlwmanifest_link'); } }