From 5321dc210ba6529697acdbe6e9042de64014eec9 Mon Sep 17 00:00:00 2001 From: Ainsley Clark Date: Tue, 21 Dec 2021 13:24:43 +0000 Subject: [PATCH] Modded version --- cli/Commands.php | 2 +- core/Admin/Fields.php | 2 +- core/Admin/Upload.php | 2 +- core/Log/Logger.php | 2 +- core/Package/Convertor.php | 2 +- core/Package/File.php | 2 +- core/Package/Service.php | 3 +-- core/Services/AVIF.php | 2 +- core/Services/JPG.php | 2 +- core/Services/PNG.php | 2 +- core/Services/WebP.php | 2 +- core/Squidge.php | 2 +- core/Types/Mimes.php | 2 +- functions/functions.php | 2 +- readme.txt | 13 +++++-------- squidge.php | 2 +- templates/health/avif.php | 2 +- templates/health/jpg.php | 2 +- templates/health/png.php | 2 +- templates/health/webp.php | 2 +- templates/info.php | 2 +- 21 files changed, 25 insertions(+), 29 deletions(-) diff --git a/cli/Commands.php b/cli/Commands.php index 411d67e..83448c4 100644 --- a/cli/Commands.php +++ b/cli/Commands.php @@ -7,7 +7,7 @@ * functions via the WP CLI. * * @package Squidge - * @version 0.1.3 + * @version 0.1.4 * @category CLI * @repo https://github.com/ainsleyclark/squidge * diff --git a/core/Admin/Fields.php b/core/Admin/Fields.php index 6093d6b..bdbdace 100644 --- a/core/Admin/Fields.php +++ b/core/Admin/Fields.php @@ -7,7 +7,7 @@ * admin part of the plugin. * * @package Squidge - * @version 0.1.3 + * @version 0.1.4 * @author Ainsley Clark * @category Class * @repo https://github.com/ainsleyclark/squidge diff --git a/core/Admin/Upload.php b/core/Admin/Upload.php index 206641e..1b1a9b0 100644 --- a/core/Admin/Upload.php +++ b/core/Admin/Upload.php @@ -8,7 +8,7 @@ * library. * * @package Squidge - * @version 0.1.3 + * @version 0.1.4 * @author Ainsley Clark * @category Admin * @repo https://github.com/ainsleyclark/squidge diff --git a/core/Log/Logger.php b/core/Log/Logger.php index d1c0d8d..6988207 100644 --- a/core/Log/Logger.php +++ b/core/Log/Logger.php @@ -7,7 +7,7 @@ * error messages for the plugin. * * @package Squidge - * @version 0.1.3 + * @version 0.1.4 * @author Ainsley Clark * @category Class * @repo https://github.com/ainsleyclark/squidge diff --git a/core/Package/Convertor.php b/core/Package/Convertor.php index a8098a7..b6c87c0 100644 --- a/core/Package/Convertor.php +++ b/core/Package/Convertor.php @@ -7,7 +7,7 @@ * coverts or compresses an image. * * @package Squidge - * @version 0.1.3 + * @version 0.1.4 * @author Ainsley Clark * @category Class * @repo https://github.com/ainsleyclark/squidge diff --git a/core/Package/File.php b/core/Package/File.php index 00ed375..7b7275f 100644 --- a/core/Package/File.php +++ b/core/Package/File.php @@ -7,7 +7,7 @@ * front end. * * @package Squidge - * @version 0.1.3 + * @version 0.1.4 * @author Ainsley Clark * @category Class * @repo https://github.com/ainsleyclark/squidge diff --git a/core/Package/Service.php b/core/Package/Service.php index 4a8132a..6695c84 100644 --- a/core/Package/Service.php +++ b/core/Package/Service.php @@ -7,7 +7,7 @@ * and executing commands. * * @package Squidge - * @version 0.1.3 + * @version 0.1.4 * @author Ainsley Clark * @category Class * @repo https://github.com/ainsleyclark/squidge @@ -190,7 +190,6 @@ private static function get_mime_type($file) public static function has_compressed($id) { $meta = get_post_meta($id, self::META_KEY . '_' . static::cmd_name()); - Logger::info("Here" . !empty($meta)); return !empty($meta); } diff --git a/core/Services/AVIF.php b/core/Services/AVIF.php index e5939a0..5f74ea5 100644 --- a/core/Services/AVIF.php +++ b/core/Services/AVIF.php @@ -8,7 +8,7 @@ * the cwebp library. * * @package Squidge - * @version 0.1.3 + * @version 0.1.4 * @author Ainsley Clark * @category Class * @repo https://github.com/ainsleyclark/squidge diff --git a/core/Services/JPG.php b/core/Services/JPG.php index 0ad3130..dbae47f 100644 --- a/core/Services/JPG.php +++ b/core/Services/JPG.php @@ -8,7 +8,7 @@ * library. * * @package Squidge - * @version 0.1.3 + * @version 0.1.4 * @author Ainsley Clark * @category Class * @repo https://github.com/ainsleyclark/squidge diff --git a/core/Services/PNG.php b/core/Services/PNG.php index 9d9ab31..6ae1a6b 100644 --- a/core/Services/PNG.php +++ b/core/Services/PNG.php @@ -8,7 +8,7 @@ * library. * * @package Squidge - * @version 0.1.3 + * @version 0.1.4 * @author Ainsley Clark * @category Class * @repo https://github.com/ainsleyclark/squidge diff --git a/core/Services/WebP.php b/core/Services/WebP.php index 580f116..e778747 100644 --- a/core/Services/WebP.php +++ b/core/Services/WebP.php @@ -8,7 +8,7 @@ * the cwebp library. * * @package Squidge - * @version 0.1.3 + * @version 0.1.4 * @author Ainsley Clark * @category Class * @repo https://github.com/ainsleyclark/squidge diff --git a/core/Squidge.php b/core/Squidge.php index a8edd3c..acee635 100644 --- a/core/Squidge.php +++ b/core/Squidge.php @@ -6,7 +6,7 @@ * Main squidge class. * * @package Squidge - * @version 0.1.3 + * @version 0.1.4 * @author Ainsley Clark * @category Class * @repo https://github.com/ainsleyclark/squidge diff --git a/core/Types/Mimes.php b/core/Types/Mimes.php index b6469fb..edb3736 100644 --- a/core/Types/Mimes.php +++ b/core/Types/Mimes.php @@ -6,7 +6,7 @@ * Mime times for files stored here. * * @package Squidge - * @version 0.1.3 + * @version 0.1.4 * @author Ainsley Clark * @category Class * @repo https://github.com/ainsleyclark/squidge diff --git a/functions/functions.php b/functions/functions.php index 64c7104..a6ba150 100644 --- a/functions/functions.php +++ b/functions/functions.php @@ -6,7 +6,7 @@ * Helper template functions. * * @package Squidge - * @version 0.1.3 + * @version 0.1.4 * @author Ainsley Clark * @category Functions * @repo https://github.com/ainsleyclark/squidge diff --git a/readme.txt b/readme.txt index ec10f7a..2868f56 100644 --- a/readme.txt +++ b/readme.txt @@ -5,7 +5,7 @@ Tags: image, compression, plugin, image compression, webp, lazy load, optimizati Requires at least: 5.5 Tested up to: 5.8 Requires PHP: 5.6 -Stable tag: 0.1.3 +Stable tag: 0.1.4 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html @@ -31,13 +31,10 @@ hard work for you. Squidge compresses and converts image files when the user has uploaded a file to WordPress. -Compresses JPG images using `jpegoptim`. - -Compresses PNG images using `optipng`. - -Converts JPG and PNG images to `.webp` files using `cwebp` with the appended extension e.g. `image.jpg.webp`. - -Converts JPG and PNG images to `.avif` files using `libavif` with the appended extension e.g. `image.jpg.avif`. +- Compresses JPG images using `jpegoptim`. +- Compresses PNG images using `optipng`. +- Converts JPG and PNG images to `.webp` files using `cwebp` with the appended extension e.g. `image.jpg.webp`. +- Converts JPG and PNG images to `.avif` files using `libavif` with the appended extension e.g. `image.jpg.avif`. == Installation == diff --git a/squidge.php b/squidge.php index 84eec92..32b5e6b 100644 --- a/squidge.php +++ b/squidge.php @@ -7,7 +7,7 @@ * Author: Ainsley Clark * Author URI: https://github.com/ainsleyclark * Text Domain: squidge - * Version: 0.1.3 + * Version: 0.1.4 * License: GNU * * @package Squidge diff --git a/templates/health/avif.php b/templates/health/avif.php index a0877cd..afad3c6 100644 --- a/templates/health/avif.php +++ b/templates/health/avif.php @@ -6,7 +6,7 @@ * AVIF health status template. * * @package Squidge - * @version 0.1.3 + * @version 0.1.4 * @author Ainsley Clark * @category Templates * @repo https://github.com/ainsleyclark/squidge diff --git a/templates/health/jpg.php b/templates/health/jpg.php index 317aa3e..de0edf8 100644 --- a/templates/health/jpg.php +++ b/templates/health/jpg.php @@ -6,7 +6,7 @@ * JPG health status template. * * @package Squidge - * @version 0.1.3 + * @version 0.1.4 * @author Ainsley Clark * @category Templates * @repo https://github.com/ainsleyclark/squidge diff --git a/templates/health/png.php b/templates/health/png.php index 1bb3a62..3fbd03c 100644 --- a/templates/health/png.php +++ b/templates/health/png.php @@ -6,7 +6,7 @@ * PNG health status template. * * @package Squidge - * @version 0.1.3 + * @version 0.1.4 * @author Ainsley Clark * @category Templates * @repo https://github.com/ainsleyclark/squidge diff --git a/templates/health/webp.php b/templates/health/webp.php index b7d5f16..235fc9a 100644 --- a/templates/health/webp.php +++ b/templates/health/webp.php @@ -6,7 +6,7 @@ * WebP health status template. * * @package Squidge - * @version 0.1.3 + * @version 0.1.4 * @author Ainsley Clark * @category Templates * @repo https://github.com/ainsleyclark/squidge diff --git a/templates/info.php b/templates/info.php index b9f9e2f..44d22b3 100644 --- a/templates/info.php +++ b/templates/info.php @@ -7,7 +7,7 @@ * about Squidge. * * @package Squidge - * @version 0.1.3 + * @version 0.1.4 * @author Ainsley Clark * @category Templates * @repo https://github.com/ainsleyclark/squidge