| 1 |
<?php if (!defined('ABSPATH')) die('No direct access allowed'); ?> |
| 2 |
<div class='wpo_smush_single_image compression_level wpo-fieldgroup' style="<?php echo esc_attr($smush_display); ?>"> |
| 3 |
<div class="wpo-fieldgroup__subgroup"> |
| 4 |
<label for="enable_lossy_compression"> |
| 5 |
<input type="radio" id="enable_lossy_compression" name="compression_level" class="smush-options compression_level" <?php checked($smush_options['image_quality'], 60); ?>> |
| 6 |
<?php esc_html_e('Prioritize maximum compression', 'wp-optimize');?> |
| 7 |
</label> |
| 8 |
<?php |
| 9 |
$message = __('Uses lossy compression to ensure maximum savings per image.', 'wp-optimize'); |
| 10 |
$message .= ' '; |
| 11 |
$message .= __('The resulting images are of a slightly lower quality', 'wp-optimize'); |
| 12 |
?> |
| 13 |
<span tabindex="0" title="<?php echo esc_attr($message); ?>"><span class="dashicons dashicons-editor-help"></span> </span> |
| 14 |
</div> |
| 15 |
<div class="wpo-fieldgroup__subgroup"> |
| 16 |
<label for="enable_lossless_compression"> |
| 17 |
<input type="radio" id="enable_lossless_compression" name="compression_level" class="smush-options compression_level" <?php checked($smush_options['image_quality'], 92); ?>> |
| 18 |
<?php esc_html_e('Prioritize retention of detail', 'wp-optimize');?> |
| 19 |
</label> |
| 20 |
<span tabindex="0" title="<?php esc_attr_e('Uses lossless compression, which results in much better image quality but lower file size savings per image', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span> </span> |
| 21 |
</div> |
| 22 |
<div class="wpo-fieldgroup__subgroup"> |
| 23 |
<label for="enable_custom_compression"> |
| 24 |
<input id="enable_custom_compression" type="radio" name="compression_level" class="smush-options compression_level" <?php checked($custom); ?>> |
| 25 |
<?php esc_html_e('Custom', 'wp-optimize');?> |
| 26 |
</label> |
| 27 |
<div class="smush-options custom_compression" <?php if (!$custom) echo 'style="display:none;"';?>> |
| 28 |
<span class="alignleft"><?php esc_html_e('Maximum compression', 'wp-optimize');?></span> |
| 29 |
<input id="custom_compression_slider" class="compression_level" data-max="<?php esc_attr_e('Maximum Compression', 'wp-optimize'); ?>" type="range" step="5" value="<?php echo intval($smush_options['image_quality']); ?>" min="65" max="90" list="number" /> |
| 30 |
<datalist id="number"> |
| 31 |
<option value="65"/> |
| 32 |
<option value="70"/> |
| 33 |
<option value="75"/> |
| 34 |
<option value="80"/> |
| 35 |
<option value="85"/> |
| 36 |
<option value="90"/> |
| 37 |
</datalist> |
| 38 |
<span class="alignright"><?php esc_html_e('Best image quality', 'wp-optimize');?></span> |
| 39 |
</div> |
| 40 |
</div> |
| 41 |
</div> |
| 42 |
<a href="#" class="wpo-toggle-advanced-options wpo_smush_single_image" style="<?php echo esc_attr($smush_display); ?>"><?php esc_html_e('Show advanced options', 'wp-optimize');?></a> |
| 43 |
<div class='smush-advanced wpo-advanced-options'> |
| 44 |
<h4><?php esc_html_e('Service provider', 'wp-optimize');?></h4> |
| 45 |
<fieldset class="compression_server"> |
| 46 |
<label for="resmushit"> |
| 47 |
<input type="radio" id="resmushit" name="compression_server_<?php echo esc_attr($post_id); ?>" value="resmushit" <?php checked($smush_options['compression_server'], 'resmushit'); ?>> |
| 48 |
<a href="http://resmush.it" target="_blank"><?php esc_html_e('reSmush.it', 'wp-optimize');?></a> |
| 49 |
</label> |
| 50 |
</fieldset> |
| 51 |
<h4><?php esc_html_e('Other options', 'wp-optimize');?></h4> |
| 52 |
<fieldset class="other_options"> |
| 53 |
<label for='smush_backup_<?php echo esc_attr($post_id); ?>'> |
| 54 |
<input type='checkbox' name='smush_backup_<?php echo esc_attr($post_id); ?>' id='smush_backup_<?php echo esc_attr($post_id); ?>' <?php checked($smush_options['back_up_original']); ?>> |
| 55 |
<span><?php esc_html_e('Backup original', 'wp-optimize'); ?></span> |
| 56 |
</label> |
| 57 |
<label for='smush_exif_<?php echo esc_attr($post_id); ?>'> |
| 58 |
<input type='checkbox' name='smush_exif_<?php echo esc_attr($post_id); ?>' id='smush_exif_<?php echo esc_attr($post_id); ?>' class="preserve_exif" <?php checked($smush_options['preserve_exif']); ?>> |
| 59 |
<span><?php esc_html_e('Keep EXIF data', 'wp-optimize'); ?></span> |
| 60 |
</label> |
| 61 |
</fieldset> |
| 62 |
</div> |