auto-patch 638-dev-dev01-2024-05-14T20_44_36
This commit is contained in:
@@ -908,6 +908,7 @@ p.imagify-section-title.imagify-section-title {
|
||||
z-index: 2;
|
||||
-webkit-transition: all .275s;
|
||||
transition: all .275s;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.imagify-inline-options input[type="radio"]:not(:checked) + label:first-of-type,
|
||||
@@ -924,6 +925,12 @@ p.imagify-section-title.imagify-section-title {
|
||||
background: #8BC34A
|
||||
}
|
||||
|
||||
.imagify-inline-options input[type="radio"]:disabled + label {
|
||||
background: #ccc;
|
||||
color: #999;
|
||||
cursor:not-allowed;
|
||||
}
|
||||
|
||||
.imagify-inline-options .imagify-info {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -127,12 +127,22 @@ p.imagify-api-key-invite-title {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.imagify-setting-optim-level {
|
||||
padding: 8px 0 18px;
|
||||
}
|
||||
.imagify-setting-optim-level > p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.imagify-setting-optim-level .imagify-info {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.imagify-setting-optim-level .imagify-error {
|
||||
margin: 10px 0 0 0;
|
||||
}
|
||||
|
||||
.imagify-setting-optim-level .imagify-error a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.imagify-setting-optim-level .imagify-inline-options {
|
||||
flex-basis: 60%;
|
||||
flex-grow: 1;
|
||||
@@ -141,6 +151,10 @@ p.imagify-api-key-invite-title {
|
||||
background: #2E3243;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.imagify-setting-optim-level .imagify-inline-options-error {
|
||||
background: #ccc;
|
||||
}
|
||||
|
||||
.imagify-setting-optim-level .imagify-inline-options label {
|
||||
display: block !important;
|
||||
width: 100%;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -112,10 +112,10 @@ abstract class AbstractBulk implements BulkInterface {
|
||||
* @return int The number of media.
|
||||
*/
|
||||
public function has_optimized_media_without_nextgen() {
|
||||
$format = 'webp';
|
||||
$format = get_imagify_option( 'optimization_format' );
|
||||
|
||||
if ( get_imagify_option( 'convert_to_avif' ) ) {
|
||||
$format = 'avif';
|
||||
if ( 'off' === $format ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return count( $this->get_optimized_media_ids_without_format( $format )['ids'] );
|
||||
|
||||
@@ -586,11 +586,20 @@ class Bulk {
|
||||
* @return void
|
||||
*/
|
||||
public function maybe_generate_missing_nextgen( $old_value, $value ) {
|
||||
if ( empty( $old_value['convert_to_avif'] ) === empty( $value['convert_to_avif'] ) ) {
|
||||
if ( ! isset( $old_value['optimization_format'], $value['optimization_format'] ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( $old_value['optimization_format'] === $value['optimization_format'] ) {
|
||||
// Old value = new value so do nothing.
|
||||
return;
|
||||
}
|
||||
|
||||
if ( 'off' === $value['optimization_format'] ) {
|
||||
// No need to generate next-gen images.
|
||||
return;
|
||||
}
|
||||
|
||||
$contexts = $this->get_contexts();
|
||||
$formats = imagify_nextgen_images_formats();
|
||||
|
||||
|
||||
@@ -182,10 +182,10 @@ class Actions {
|
||||
|
||||
$bulk = Bulk::get_instance();
|
||||
|
||||
$format = 'webp';
|
||||
$format = get_imagify_option( 'optimization_format' );
|
||||
|
||||
if ( get_imagify_option( 'convert_to_avif' ) ) {
|
||||
$format = 'avif';
|
||||
if ( 'off' === $format ) {
|
||||
return $response;
|
||||
}
|
||||
|
||||
foreach ( $data[ $imagifybeat_id ] as $context ) {
|
||||
|
||||
@@ -745,10 +745,9 @@ class File {
|
||||
/**
|
||||
* Get the file extension.
|
||||
*
|
||||
* @since 1.9
|
||||
* @author Grégory Viguier
|
||||
* @since 1.9
|
||||
*
|
||||
* @return string|null
|
||||
* @return string|false
|
||||
*/
|
||||
public function get_extension() {
|
||||
return $this->get_file_type()->ext;
|
||||
|
||||
@@ -581,11 +581,21 @@ abstract class AbstractProcess implements ProcessInterface {
|
||||
// This file type is not supported.
|
||||
$extension = $file->get_extension();
|
||||
|
||||
if ( '' === $extension ) {
|
||||
if ( ! $extension ) {
|
||||
$response = new WP_Error(
|
||||
'extension_not_mime',
|
||||
__( 'This file has an extension that does not match a mime type.', 'imagify' )
|
||||
);
|
||||
} elseif ( '' === $extension ) {
|
||||
$response = new WP_Error(
|
||||
'no_extension',
|
||||
__( 'With no extension, this file cannot be optimized.', 'imagify' )
|
||||
);
|
||||
} elseif ( ! $extension ) {
|
||||
$response = new WP_Error(
|
||||
'extension_not_mime',
|
||||
__( 'This file has an extension that does not match a mime type.', 'imagify' )
|
||||
);
|
||||
} else {
|
||||
$response = new WP_Error(
|
||||
'extension_not_supported',
|
||||
@@ -1532,7 +1542,9 @@ abstract class AbstractProcess implements ProcessInterface {
|
||||
* @return string Current format we are targeting.
|
||||
*/
|
||||
public function get_current_format() {
|
||||
return $this->get_option( 'convert_to_avif' ) ? static::AVIF_SUFFIX : static::WEBP_SUFFIX;
|
||||
$format = get_imagify_option( 'optimization_format' );
|
||||
|
||||
return ( 'avif' === $format ) ? static::AVIF_SUFFIX : static::WEBP_SUFFIX;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1551,7 +1563,7 @@ abstract class AbstractProcess implements ProcessInterface {
|
||||
foreach ( $formats as $format ) {
|
||||
$suffix = preg_quote( $this->get_suffix_from_format( $format ), '/' );
|
||||
|
||||
if ( preg_match( '/^(?<size>.+)' . $suffix . '$/', $size_name, $matches ) ) {
|
||||
if ( preg_match( '/^(?<size>.+)' . $suffix . '$/', (string) $size_name, $matches ) ) {
|
||||
return $matches['size'];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ class OptimizedMediaWithoutNextGen implements StatInterface, SubscriberInterface
|
||||
$new_sizes = array_intersect_key( $sizes, $new_sizes );
|
||||
$size_name = 'full' . $process::WEBP_SUFFIX;
|
||||
|
||||
if ( get_imagify_option( 'convert_to_avif' ) ) {
|
||||
if ( 'avif' === get_imagify_option( 'optimization_format' ) ) {
|
||||
$size_name = 'full' . $process::AVIF_SUFFIX;
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ class OptimizedMediaWithoutNextGen implements StatInterface, SubscriberInterface
|
||||
$sizes = isset( $data['sizes'] ) ? (array) $data['sizes'] : [];
|
||||
$size_name = 'full' . $process::WEBP_SUFFIX;
|
||||
|
||||
if ( get_imagify_option( 'convert_to_avif' ) ) {
|
||||
if ( 'avif' === get_imagify_option( 'optimization_format' ) ) {
|
||||
$size_name = 'full' . $process::AVIF_SUFFIX;
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ class OptimizedMediaWithoutNextGen implements StatInterface, SubscriberInterface
|
||||
$sizes = isset( $data['sizes'] ) ? (array) $data['sizes'] : [];
|
||||
$size_name = 'full' . $process::WEBP_SUFFIX;
|
||||
|
||||
if ( get_imagify_option( 'convert_to_avif' ) ) {
|
||||
if ( 'avif' === get_imagify_option( 'optimization_format' ) ) {
|
||||
$size_name = 'full' . $process::AVIF_SUFFIX;
|
||||
}
|
||||
|
||||
@@ -198,11 +198,11 @@ class OptimizedMediaWithoutNextGen implements StatInterface, SubscriberInterface
|
||||
* @return void
|
||||
*/
|
||||
public function maybe_clear_stat_cache( $old_value, $value ) {
|
||||
if ( isset( $old_value['convert_to_avif'] ) && isset( $value['convert_to_avif'] ) ) {
|
||||
if ( ! isset( $old_value['optimization_format'], $value['optimization_format'] ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! isset( $old_value['convert_to_avif'] ) && ! isset( $value['convert_to_avif'] ) ) {
|
||||
if ( $old_value['optimization_format'] === $value['optimization_format'] ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -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.1
|
||||
* Version: 2.2.2
|
||||
* Requires at least: 5.3
|
||||
* Requires PHP: 7.3
|
||||
* Author: Imagify – Optimize Images & Convert WebP & Avif
|
||||
@@ -19,7 +19,7 @@
|
||||
defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' );
|
||||
|
||||
// Imagify defines.
|
||||
define( 'IMAGIFY_VERSION', '2.2.1' );
|
||||
define( 'IMAGIFY_VERSION', '2.2.2' );
|
||||
define( 'IMAGIFY_SLUG', 'imagify' );
|
||||
define( 'IMAGIFY_FILE', __FILE__ );
|
||||
define( 'IMAGIFY_PATH', realpath( plugin_dir_path( IMAGIFY_FILE ) ) . '/' );
|
||||
|
||||
@@ -124,7 +124,7 @@ class NGG extends AbstractBulk {
|
||||
$data_table = DB::get_instance()->get_table_name();
|
||||
$suffix = constant( imagify_get_optimization_process_class_name( 'ngg' ) . '::WEBP_SUFFIX' );
|
||||
|
||||
if ( get_imagify_option( 'convert_to_avif' ) ) {
|
||||
if ( 'avif' === get_imagify_option( 'optimization_format' ) ) {
|
||||
$suffix = constant( imagify_get_optimization_process_class_name( 'ngg' ) . '::AVIF_SUFFIX' );
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ class NGG extends AbstractBulk {
|
||||
$data_table = DB::get_instance()->get_table_name();
|
||||
$suffix = constant( imagify_get_optimization_process_class_name( 'ngg' ) . '::WEBP_SUFFIX' );
|
||||
|
||||
if ( get_imagify_option( 'convert_to_avif' ) ) {
|
||||
if ( 'avif' === get_imagify_option( 'optimization_format' ) ) {
|
||||
$suffix = constant( imagify_get_optimization_process_class_name( 'ngg' ) . '::AVIF_SUFFIX' );
|
||||
}
|
||||
|
||||
|
||||
@@ -291,7 +291,7 @@ function _imagify_new_upgrade( $network_version, $site_version ) {
|
||||
|
||||
// 1.8.2
|
||||
if ( version_compare( $site_version, '1.8.2' ) < 0 ) {
|
||||
Imagify_Options::get_instance()->set( 'partner_links', 1 );
|
||||
$options->set( 'partner_links', 1 );
|
||||
}
|
||||
|
||||
// 1.9.6
|
||||
@@ -305,12 +305,20 @@ function _imagify_new_upgrade( $network_version, $site_version ) {
|
||||
}
|
||||
|
||||
if ( version_compare( $site_version, '2.0' ) < 0 ) {
|
||||
Imagify_Options::get_instance()->set( 'optimization_level', 2 );
|
||||
$options->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' ) );
|
||||
$options->set( 'display_nextgen', $options->get( 'display_webp', 0 ) );
|
||||
$options->set( 'display_nextgen_method', $options->get( 'display_webp_method' ) );
|
||||
}
|
||||
|
||||
if ( version_compare( $site_version, '2.2.2', '<' ) ) {
|
||||
if ( $options->get( 'convert_to_avif' ) ) {
|
||||
$options->set( 'optimization_format', 'avif' );
|
||||
} else {
|
||||
$options->set( 'optimization_format', 'webp' );
|
||||
}
|
||||
}
|
||||
}
|
||||
add_action( 'imagify_upgrade', '_imagify_new_upgrade', 10, 2 );
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
<?php
|
||||
defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' );
|
||||
|
||||
if ( ! class_exists( 'WP_List_Table' ) ) {
|
||||
require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* Class that display the "custom folders" files.
|
||||
*
|
||||
|
||||
@@ -44,6 +44,7 @@ class Imagify_Options extends Imagify_Abstract_Options {
|
||||
'partner_links' => 0,
|
||||
'convert_to_avif' => 0,
|
||||
'convert_to_webp' => 0,
|
||||
'optimization_format' => 'webp',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -96,10 +97,6 @@ class Imagify_Options extends Imagify_Abstract_Options {
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/** ----------------------------------------------------------------------------------------- */
|
||||
/** SANITIZATION, VALIDATION ================================================================ */
|
||||
/** ----------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* Sanitize and validate an option value. Basic casts have been made.
|
||||
*
|
||||
@@ -127,7 +124,13 @@ class Imagify_Options extends Imagify_Abstract_Options {
|
||||
return $reset_values[ $key ];
|
||||
}
|
||||
return $value;
|
||||
|
||||
case 'optimization_format':
|
||||
if ( ! in_array( $value, [ 'off', 'webp', 'avif' ], true ) ) {
|
||||
// For an invalid value, return the "reset" value.
|
||||
$reset_values = $this->get_reset_values();
|
||||
return $reset_values[ $key ];
|
||||
}
|
||||
return $value;
|
||||
case 'auto_optimize':
|
||||
case 'backup':
|
||||
case 'lossless':
|
||||
|
||||
@@ -748,6 +748,74 @@ class Imagify_Settings {
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Display styled radio list group.
|
||||
*
|
||||
* @param array $args Arguments:
|
||||
* {option_name} string The option name. E.g. 'disallowed-sizes'. Mandatory.
|
||||
* {values} array List of values to display, in the form of 'value' => 'Label'. Mandatory.
|
||||
* {attributes} array A list of HTML attributes, as 'attribute' => 'value'.
|
||||
* {current_value} int|bool USE ONLY WHEN DEALING WITH DATA THAT IS NOT SAVED IN THE PLUGIN OPTIONS. If not provided, the field will automatically get the value from the options.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function field_inline_radio_list( $args ) {
|
||||
$args = array_merge(
|
||||
[
|
||||
'option_name' => '',
|
||||
'values' => [],
|
||||
'info' => '',
|
||||
'attributes' => [],
|
||||
'current_value' => false,
|
||||
],
|
||||
$args
|
||||
);
|
||||
|
||||
if ( ! $args['option_name'] || ! $args['values'] ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( is_numeric( $args['current_value'] ) || is_string( $args['current_value'] ) ) {
|
||||
$current_value = $args['current_value'];
|
||||
} else {
|
||||
$current_value = $this->options->get( $args['option_name'] );
|
||||
}
|
||||
|
||||
$option_name_class = sanitize_html_class( $args['option_name'] );
|
||||
$attributes = array_merge( [
|
||||
'name' => $this->option_name . '[' . $args['option_name'] . ']',
|
||||
'id' => 'imagify_' . $option_name_class . '_%s',
|
||||
'class' => 'imagify-row-radio',
|
||||
], $args['attributes'] );
|
||||
|
||||
$id_attribute = $attributes['id'];
|
||||
unset( $attributes['id'] );
|
||||
$args['attributes'] = self::build_attributes( $attributes );
|
||||
?>
|
||||
<div class="imagify-setting-optim-level">
|
||||
<p class="imagify-inline-options imagify-inline-options-<?php echo esc_attr( $args['info_class'] ); ?>">
|
||||
<?php
|
||||
foreach ( $args['values'] as $value => $label ) {
|
||||
$input_id = sprintf( $id_attribute, sanitize_html_class( $value ) );
|
||||
?>
|
||||
<input type="radio" value="<?php echo esc_attr( $value ); ?>" id="<?php echo $input_id; ?>"<?php echo $args['attributes']; ?> <?php checked( $current_value, $value ); ?> />
|
||||
<label for="<?php echo $input_id; ?>" onclick=""><?php echo $label; ?></label>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
<span id="<?php
|
||||
echo $attributes['aria-describedby'];
|
||||
?>" class="imagify-<?php echo esc_attr( $args['info_class'] ); ?>">
|
||||
<span class="dashicons dashicons-info"></span>
|
||||
<?php
|
||||
echo $args['info'];
|
||||
?>
|
||||
</span>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a text box.
|
||||
*
|
||||
|
||||
@@ -75,14 +75,11 @@ add_filter( 'big_image_size_threshold', [ imagify_get_context( 'wp' ), 'get_resi
|
||||
* @return array
|
||||
*/
|
||||
function imagify_nextgen_images_formats() {
|
||||
$formats = [
|
||||
'webp' => 'webp',
|
||||
];
|
||||
$value = get_imagify_option( 'optimization_format' );
|
||||
$formats = [];
|
||||
|
||||
if ( get_imagify_option( 'convert_to_avif' ) ) {
|
||||
$formats['avif'] = 'avif';
|
||||
|
||||
unset( $formats['webp'] );
|
||||
if ( 'off' !== $value ) {
|
||||
$formats[ $value ] = $value;
|
||||
}
|
||||
|
||||
$default = $formats;
|
||||
|
||||
@@ -342,8 +342,10 @@ function get_imagify_attachment_generate_nextgen_versions_link( $process ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$format = get_imagify_option( 'optimization_format' );
|
||||
|
||||
if (
|
||||
get_imagify_option( 'convert_to_avif' )
|
||||
'avif' === $format
|
||||
&&
|
||||
'image/avif' === $media->get_mime_type()
|
||||
) {
|
||||
|
||||
@@ -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.5
|
||||
Stable tag: 2.2.1
|
||||
Stable tag: 2.2.2
|
||||
Requires PHP: 7.3
|
||||
License: GPLv2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
@@ -262,6 +262,12 @@ You can report any security bugs found in the source code of the site-reviews pl
|
||||
4. Other Media Page
|
||||
|
||||
== Changelog ==
|
||||
= 2.2.2 =
|
||||
- Enhancement: Allow to choose which Next-Gen images should be generated in UI
|
||||
- Enhancement: Guard against image size that’s not a string
|
||||
- Enhancement: Guard against file type that doesn’t match existing mime type
|
||||
- Bugfix: Fix a fatal error related to “WP_List_Table”
|
||||
|
||||
= 2.2.1 =
|
||||
- Enhancement: Prevent updating .htaccess when switching between AVIF and WEBP generation features
|
||||
- Enhancement: Display the smallest size of the image in the Media Library image details section
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php return array(
|
||||
'root' => array(
|
||||
'name' => 'wp-media/imagify-plugin',
|
||||
'pretty_version' => 'v2.2.1',
|
||||
'version' => '2.2.1.0',
|
||||
'reference' => '4f51e4e733650db2daf440926fa9ff911bc1da27',
|
||||
'pretty_version' => 'v2.2.2',
|
||||
'version' => '2.2.2.0',
|
||||
'reference' => '33e23dd026fd905ae6ae703be9456c84ae9ca591',
|
||||
'type' => 'wordpress-plugin',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
@@ -29,9 +29,9 @@
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'wp-media/imagify-plugin' => array(
|
||||
'pretty_version' => 'v2.2.1',
|
||||
'version' => '2.2.1.0',
|
||||
'reference' => '4f51e4e733650db2daf440926fa9ff911bc1da27',
|
||||
'pretty_version' => 'v2.2.2',
|
||||
'version' => '2.2.2.0',
|
||||
'reference' => '33e23dd026fd905ae6ae703be9456c84ae9ca591',
|
||||
'type' => 'wordpress-plugin',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
|
||||
@@ -12,18 +12,47 @@ $settings = Imagify_Settings::get_instance();
|
||||
|
||||
<div class="imagify-setting-line">
|
||||
<?php
|
||||
$settings->field_checkbox( [
|
||||
'option_name' => 'convert_to_avif',
|
||||
'label' => __( 'Create AVIF versions of images', 'imagify' ),
|
||||
'attributes' => [
|
||||
'aria-describedby' => 'describe-convert_to_avif',
|
||||
],
|
||||
] );
|
||||
$message = __( 'Select WebP for high compatibility, AVIF for superior compression. Please note that the generation process will start automatically after saving the settings.', 'imagify' );
|
||||
$message_class = 'info';
|
||||
$disabled = false;
|
||||
|
||||
if ( has_filter( 'imagify_nextgen_images_formats' ) ) {
|
||||
$message = sprintf(
|
||||
// translators: %1$s and %2$s are <code> tag opening and closing, %3$s and %4$s are <a> tag opening and closing.
|
||||
__( 'Next-Gen Images format is currently defined by the %1$simagify_nextgen_images_format%2$s filter. %3$sRead more%4$s', 'imagify' ),
|
||||
'<code>',
|
||||
'</code>',
|
||||
'<a href="https://imagify.io/documentation/how-to-use-the-next-gen-image-format-filter/" target="_blank">',
|
||||
'</a>'
|
||||
);
|
||||
|
||||
$message_class = 'error';
|
||||
$disabled = true;
|
||||
}
|
||||
|
||||
$attributes = [
|
||||
'aria-describedby' => 'describe-optimization_format',
|
||||
];
|
||||
|
||||
if ( $disabled ) {
|
||||
$attributes['disabled'] = true;
|
||||
}
|
||||
|
||||
$settings->field_inline_radio_list(
|
||||
[
|
||||
'option_name' => 'optimization_format',
|
||||
'legend' => __( 'Next-gen image format', 'imagify' ),
|
||||
'info' => $message,
|
||||
'info_class' => $message_class,
|
||||
'values' => [
|
||||
'off' => __( 'Off', 'imagify' ),
|
||||
'avif' => __( 'AVIF', 'imagify' ),
|
||||
'webp' => __( 'WebP', 'imagify' ),
|
||||
],
|
||||
'attributes' => $attributes,
|
||||
]
|
||||
);
|
||||
?>
|
||||
<div class="imagify-info">
|
||||
<span class="dashicons dashicons-info"></span>
|
||||
<?php esc_html_e( 'Enabling this option will start the process of creating AVIF version of your images automatically.', 'imagify' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="imagify-setting-line">
|
||||
|
||||
Reference in New Issue
Block a user