Skip to content

Commit

Permalink
rearrange translations to avoid translating html
Browse files Browse the repository at this point in the history
  • Loading branch information
adamsilverstein committed Oct 27, 2023
1 parent 7a5015b commit f3ed185
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/Setting.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,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>',
__( 'LibGD supported formats', 'modern-images-wp' ),

Check failure on line 309 in src/Setting.php

View workflow job for this annotation

GitHub Actions / test

WordPress.Security.EscapeOutput.OutputNotEscaped

All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '__'.
'</strong>',
$gd_supports_webp ? " WebP" : "",
$gd_supports_avif ? " AVIF" : "",
Expand All @@ -318,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>',
__( 'Imagick supported formats', 'modern-images-wp' ),

Check failure on line 324 in src/Setting.php

View workflow job for this annotation

GitHub Actions / test

WordPress.Security.EscapeOutput.OutputNotEscaped

All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '__'.
'</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 f3ed185

Please sign in to comment.