@@ -68,7 +68,7 @@ public function admin_init() {
6868 }
6969
7070 public function image_sizes_notice () {
71- $ this ->render_image_sizes_notice ($ _GET ["image_sizes_selected " ]);
71+ $ this ->render_image_sizes_notice ($ _GET ["image_sizes_selected " ], $ _GET [ " resize_original " ] );
7272 exit ();
7373 }
7474
@@ -217,7 +217,7 @@ public function render_sizes() {
217217 }
218218
219219 echo '<div id="tiny-image-sizes-notice"> ' ;
220- $ this ->render_image_sizes_notice (count (self ::get_active_tinify_sizes ()));
220+ $ this ->render_image_sizes_notice (count (self ::get_active_tinify_sizes ()), self :: get_resize_enabled () );
221221 echo '</div> ' ;
222222 }
223223
@@ -234,8 +234,11 @@ private function render_size_checkbox($size, $option) {
234234<?php
235235 }
236236
237- public function render_image_sizes_notice ($ active_image_sizes_count ) {
238- echo '<br/> ' ;
237+ public function render_image_sizes_notice ($ active_image_sizes_count , $ resize_original_enabled ) {
238+ echo '<br> ' ;
239+ if ($ resize_original_enabled ) {
240+ $ active_image_sizes_count ++;
241+ }
239242 if ($ active_image_sizes_count < 1 ) {
240243 echo '<p> ' . self ::translate_escape ('With these settings no images will be compressed ' ) . '.</p> ' ;
241244 }
@@ -245,27 +248,34 @@ public function render_image_sizes_notice($active_image_sizes_count) {
245248 echo '<p> ' ;
246249 echo self ::translate_escape ('With these settings you can compress ' );
247250 echo ' <strong> ' ;
248- printf (self ::translate_escape ('%s images ' ), $ free_images_per_month );
251+ printf (self ::translate_escape ('at least %s images ' ), $ free_images_per_month );
249252 echo '</strong> ' ;
250253 echo self ::translate_escape ('for free each month ' ) . '. ' ;
251254 echo '</p> ' ;
252255 }
253256 }
254257
255258 public function render_resize () {
256- echo '<p> ' . self ::translate_escape ("Automatically resize the orginal image to a lower resolution. Enabling this option will resize the original image when it exceeds the specified width or height, using the TinyPNG API " ) . '.</p> ' ;
257259 echo '<p class="tiny-resize-unavailable" style="display: none"> ' . self ::translate_escape ("Enable the compression of the original image size to configure resizing " ) . '.</p> ' ;
258260
259261 $ id = self ::get_prefixed_name ("resize_original_enabled " );
260262 $ field = self ::get_prefixed_name ("resize_original[enabled] " );
261- $ label = self ::translate_escape ('fit original image within ' );
262- $ class = "tiny-resize-available " ;
263+ $ label = self ::translate_escape ('Resize orginal images larger than ' );
264+
265+ echo '<p class="tiny-resize-available"> ' ;
263266 ?>
264- <p><input class="<?php echo $ class ?> " type="checkbox" id="<?php echo $ id ?> " name="<?php echo $ field ?> " value="on" <?php if ($ this ->get_resize_enabled ()) { echo ' checked="checked" ' ; } ?> />
265- <label class="<?php echo $ class ?> " for="<?php echo $ id ; ?> "><?php echo $ label ; ?>
266- <?php $ this ->render_resize_input ('width ' ) ?> x <?php $ this ->render_resize_input ('height ' ) ?> <?php printf ("%s (%s x %s) " , self ::translate_escape ('pixels ' ), self ::translate_escape ('width ' ), self ::translate_escape ('height ' )) ?> </label></p>
267+ <input type="checkbox" id="<?php echo $ id ?> " name="<?php echo $ field ?> " value="on" <?php if ($ this ->get_resize_enabled ()) { echo ' checked="checked" ' ; } ?> />
268+ <label for="<?php echo $ id ; ?> "><?php echo $ label ; ?> :</label><br>
267269 <?php
268- echo '<p class="tiny-resize-available"> ' . sprintf (self ::translate_escape ("Resizing takes %s per image larger than the specified resolution " ), '<strong> ' . self ::translate_escape ('1 additional compression ' ) . '</strong> ' ) . '.</p> ' ;
270+
271+ echo '</p> ' ;
272+ echo '<p class="tiny-resize-available tiny-resize-resolution"> ' ;
273+
274+ printf ("%s: " , self ::translate_escape ('Max Width ' ));
275+ $ this ->render_resize_input ('width ' );
276+ printf ("%s: " , self ::translate_escape ('Max Height ' ));
277+ $ this ->render_resize_input ('height ' );
278+ echo '</p> ' ;
269279 }
270280
271281 public function render_resize_input ($ name ) {
0 commit comments