Skip to content

Commit a415d00

Browse files
Improve size display for medium_large images.
1 parent b890995 commit a415d00

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/class-tiny-settings.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,14 @@ private function render_size_checkbox( $size, $option ) {
383383
} else if ( Tiny_Image::is_retina( $size ) ) {
384384
$label = esc_html__( 'WP Retina 2x sizes', 'tiny-compress-images' );
385385
} else {
386-
$label = esc_html__( ucfirst( $size ) )
387-
. ' - ' . $option['width'] . 'x' . $option['height'];
386+
$width = $option['width'];
387+
if ( ! $width ) $width = '?';
388+
389+
$height = $option['height'];
390+
if ( ! $height ) $height = '?';
391+
392+
$label = esc_html__( ucfirst( str_replace( '_', ' ', $size ) ) )
393+
. ' - ' . $width . 'x' . $height;
388394
}
389395
echo '<p>';
390396
echo '<input type="checkbox" id="' . $id . '" name="' . $name .

0 commit comments

Comments
 (0)