| 1 |
<?php if (!defined('WPO_VERSION')) die('No direct access allowed'); ?> |
| 2 |
<?php |
| 3 |
$fcp_link = 'https://getwpo.com/first-contentful-paint/'; |
| 4 |
$cls_link = 'https://getwpo.com/cumulative-layout-shift/'; |
| 5 |
?> |
| 6 |
|
| 7 |
<div class="wpo-fieldgroup wpo-first-child dimensions-options"> |
| 8 |
<div class="wpo-images-dimensions__premium-mask"> |
| 9 |
<a class="wpo-images-dimensions__premium-link" href="<?php echo esc_url($wp_optimize->premium_version_link); ?>" target="_blank"><?php esc_html_e('Auto add images dimensions with WP-Optimize Premium.', 'wp-optimize'); ?></a> |
| 10 |
</div> |
| 11 |
<p class="wpo-images-dimension-show-links"><?php |
| 12 |
printf(esc_html__('WP-Optimize will automatically detect images with missing width or height, and add those attributes for improving %s and %s.', 'wp-optimize'), |
| 13 |
$wp_optimize->wp_optimize_url($fcp_link, __('First Contentful Paint time', 'wp-optimize'), '', '', true), |
| 14 |
$wp_optimize->wp_optimize_url($cls_link, __('Cumulative Layout Shift', 'wp-optimize'), '', '', true)); |
| 15 |
?></p> |
| 16 |
<div class="switch-container"> |
| 17 |
<label class="switch"> |
| 18 |
<input name="images_dimensions" id="images_dimensions" class="dimensions-settings" type="checkbox"> |
| 19 |
<span class="slider round"></span> |
| 20 |
</label> |
| 21 |
<label for="images_dimensions"> |
| 22 |
<?php esc_html_e('Enable images dimensions', 'wp-optimize'); ?> |
| 23 |
</label> |
| 24 |
</div> |
| 25 |
<div> |
| 26 |
<p><?php esc_html_e('Skip image CSS classes', 'wp-optimize'); ?></p> |
| 27 |
<input type="text" name="image_dimensions_ignore_classes" id="image_dimensions_ignore_classes" value="<?php echo esc_attr($ignore_classes); ?>"> |
| 28 |
<p><small><?php |
| 29 |
esc_html_e('Enter the image class or classes comma-separated.', 'wp-optimize'); |
| 30 |
echo ' '; |
| 31 |
esc_html_e('Supports wildcards.', 'wp-optimize'); |
| 32 |
echo ' '; |
| 33 |
esc_html_e('Example: image-class1, image-class2, thumbnail*, ...', 'wp-optimize'); |
| 34 |
?> |
| 35 |
</small></p> |
| 36 |
|
| 37 |
</div> |
| 38 |
<p> |
| 39 |
<small><?php esc_html_e("For advanced users: use `data-no-image-dimensions` in image tags to bypass this feature.", 'wp-optimize'); ?></small> |
| 40 |
</p> |
| 41 |
</div> |