Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2.2.0.1 #852

Merged
merged 8 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions imagify.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Imagify
* Plugin URI: https://wordpress.org/plugins/imagify/
* Description: Dramatically reduce image file sizes without losing quality, make your website load faster, boost your SEO and save money on your bandwidth using Imagify, the new most advanced image optimization tool.
* Version: 2.2
* Version: 2.2.0.1
* Requires at least: 5.3
* Requires PHP: 7.0
* Author: Imagify – Optimize Images & Convert WebP & Avif
Expand All @@ -19,7 +19,7 @@
defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' );

// Imagify defines.
define( 'IMAGIFY_VERSION', '2.2' );
define( 'IMAGIFY_VERSION', '2.2.0.1' );
define( 'IMAGIFY_SLUG', 'imagify' );
define( 'IMAGIFY_FILE', __FILE__ );
define( 'IMAGIFY_PATH', realpath( plugin_dir_path( IMAGIFY_FILE ) ) . '/' );
Expand Down
5 changes: 5 additions & 0 deletions inc/admin/upgrader.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,11 @@ function _imagify_new_upgrade( $network_version, $site_version ) {
if ( version_compare( $site_version, '2.0' ) < 0 ) {
Imagify_Options::get_instance()->set( 'optimization_level', 2 );
}

if ( version_compare( $site_version, '2.2' ) < 0 ) {
Imagify_Options::get_instance()->set( 'display_nextgen', Imagify_Options::get_instance()->get( 'display_webp', 0 ) );
Imagify_Options::get_instance()->set( 'display_nextgen_method', Imagify_Options::get_instance()->get( 'display_webp_method' ) );
}
}
add_action( 'imagify_upgrade', '_imagify_new_upgrade', 10, 2 );

Expand Down
5 changes: 5 additions & 0 deletions inc/classes/class-imagify-options.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,14 @@ class Imagify_Options extends Imagify_Abstract_Options {
'resize_larger_w' => 0,
'display_nextgen' => 0,
'display_nextgen_method' => 'picture',
'display_webp' => 0,
'display_webp_method' => 'picture',
'cdn_url' => '',
'disallowed-sizes' => [],
'admin_bar_menu' => 0,
'partner_links' => 0,
'convert_to_avif' => 0,
'convert_to_webp' => 0,
];

/**
Expand Down Expand Up @@ -131,6 +134,7 @@ public function sanitize_and_validate_value( $key, $value, $default ) {
case 'resize_larger':
case 'convert_to_webp':
case 'display_nextgen':
case 'display_webp':
case 'admin_bar_menu':
case 'partner_links':
case 'convert_to_avif':
Expand Down Expand Up @@ -160,6 +164,7 @@ public function sanitize_and_validate_value( $key, $value, $default ) {
return array_fill_keys( $value, 1 );

case 'display_nextgen_method':
case 'display_webp_method':
$values = [
'picture' => 1,
'rewrite' => 1,
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Contributors: wp_rocket, imagify
Tags: optimize images, convert webp, webp converter, convert AVIF, webp to AVIF, AVIF plugin, AVIF converter, image optimization, compress images, image compressor, resize images, reduce image size, performance, image optimizer, core web vitals, best image optimization plugin
Tested up to: 6.4
Stable tag: 2.2
Stable tag: 2.2.0.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -261,6 +261,9 @@ You can report any security bugs found in the source code of the site-reviews pl
4. Other Media Page

== Changelog ==
= 2.2.0.1 =
- Bugfix: Preserve "Display images in webp format" configuration when updating.

= 2.2 =
- New Feature: Introduce AVIF generation feature

Expand Down
Loading