Skip to content

Commit

Permalink
Closes #772: Changed webp to avif and slight modification to UI (#780)
Browse files Browse the repository at this point in the history
  • Loading branch information
Khadreal authored Jan 15, 2024
1 parent f3c600a commit fc76130
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
4 changes: 2 additions & 2 deletions views/part-settings-webp-missing-message.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
sprintf(
/* translators: %s is a formatted number (don’t use %d). */
_n(
'It seems that you have %s optimized image without WebP versions. You can generate it here.',
'It seems that you have %s optimized images without WebP versions. You can generate them here.',
'It seems that you have %s optimized image without Next-Gen versions. You can generate it here.',
'It seems that you have %s optimized images without Next-Gen versions. You can generate them here.',
$data['count'],
'imagify'
),
Expand Down
17 changes: 12 additions & 5 deletions views/part-settings-webp.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,31 @@
$settings = Imagify_Settings::get_instance();
?>
<div>
<h3 class="imagify-options-subtitle"><?php _e( 'WebP format', 'imagify' ); ?></h3>
<h3 class="imagify-options-subtitle"><?php _e( 'Next-Gen image format', 'imagify' ); ?></h3>

<div class="imagify-setting-line">
<?php
$settings->field_checkbox( [
'option_name' => 'convert_to_webp',
'label' => __( 'Create WebP versions of images', 'imagify' ),
'option_name' => 'convert_to_avif',
'label' => __( 'Create AVIF versions of images', 'imagify' ),
'attributes' => [
'aria-describedby' => 'describe-convert_to_webp',
'aria-describedby' => 'describe-convert_to_avif',
],
] );
?>
<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">

<div class="imagify-options-line">
<?php
$settings->field_checkbox( [
'option_name' => 'display_webp',
'label' => __( 'Display images in WebP format on the site', 'imagify' ),
'label' => __( 'Display images in Next-Gen format on the site', 'imagify' ),
] );
?>

Expand Down

0 comments on commit fc76130

Please sign in to comment.