Skip to content

Commit

Permalink
Merge pull request #43 from adamsilverstein/fix/plugin-checks
Browse files Browse the repository at this point in the history
  • Loading branch information
adamsilverstein authored Oct 27, 2023
2 parents 1c6bdc0 + 7536ad5 commit 3fb4bea
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 18 deletions.
10 changes: 0 additions & 10 deletions .gitattributes

This file was deleted.

2 changes: 0 additions & 2 deletions .gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: adamsilverstein, google
Tags: modern images, webp, avif, jpegxl
Tested up to: 6.4
Stable tag: 1.2.0
License: Apache License 2.0
License: Apache-2.0
License URI: https://www.apache.org/licenses/LICENSE-2.0

Modern images for WordPress.
Expand Down
15 changes: 10 additions & 5 deletions src/Setting.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,11 @@ public function get_sub_settings() {

);
return array(
/* translators: %s is the image format, e.g. jpeg. */
'id' => sprintf( 'modern_image_output_format_for_%s', $format ),
/* translators: %s is the image format, e.g. Jpeg. */
'title' => sprintf( __( 'For %s images', 'modern-images-wp' ), lcfirst( $format ) ),
/* translators: %s is the image format, e.g. Jpeg. */
'description' => sprintf( __( 'Uploaded %s images will be output in this format.', 'modern-images-wp' ), lcfirst( $format ) ),
'section' => 'modernimageformats',
'choices' => $choices,
Expand Down Expand Up @@ -301,8 +304,9 @@ public function get_sanitize_callback() {
$gd_supports_avif = isset( $image_info['gd_info']['AVIF Support'] ) && $image_info['gd_info']['AVIF Support'];
$gd_supports_jpegxl = isset( $image_info['gd_info']['JPEGXL Support'] ) && $image_info['gd_info']['JPEGXL Support'];
echo sprintf(
__('%1$sLibGD supported formats:%2$s %3$s%4$s%5$s%6$s', 'modern-images-wp' ),
'%1$s%2$s%3$s: %4$s%5$s%6$s%7$s',
'<strong>',
esc_html( __( 'LibGD supported formats', 'modern-images-wp' ) ),
'</strong>',
$gd_supports_webp ? " WebP" : "",
$gd_supports_avif ? " AVIF" : "",
Expand All @@ -315,12 +319,13 @@ public function get_sanitize_callback() {
$imagick_supports_avif = in_array( 'AVIF', $image_info['imagick_info'] );
$imagick_supports_jpegxl = in_array( 'JPEGXL', $image_info['imagick_info'] );
echo sprintf(
__('%1$sImagick supported formats:%2$s %3$s%4$s%5$s%6$s', 'modern-images-wp' ),
'%1$s%2$s%3$s: %4$s%5$s%6$s%7$s',
'<strong>',
esc_html( __( 'Imagick supported formats', 'modern-images-wp' ) ),
'</strong>',
$gd_supports_webp ? " WebP" : "",
$gd_supports_avif ? " AVIF" : "",
$gd_supports_jpegxl ? " JPEGXL" : "",
$imagick_supports_webp ? " WebP" : "",
$imagick_supports_avif ? " AVIF" : "",
$imagick_supports_jpegxl ? " JPEGXL" : "",
'<br />'
);
}
Expand Down

0 comments on commit 3fb4bea

Please sign in to comment.