| @@ -1,5 +1,5 @@ | ||
| 1 | -<?php if (!defined('WPO_VERSION')) die('No direct access allowed'); ?> | |
| 1 | +<?php if (!defined('ABSPATH')) die('No direct access allowed'); ?> | |
| 2 | 2 | <?php |
| 3 | 3 | $fcp_link = 'https://getwpo.com/first-contentful-paint/'; |
| 4 | 4 | $cls_link = 'https://getwpo.com/cumulative-layout-shift/'; |
| 5 | 5 | ?> |
| @@ -5,14 +5,18 @@ | ||
| 5 | 5 | ?> |
| 6 | 6 | |
| 7 | 7 | <div class="wpo-fieldgroup wpo-first-child dimensions-options"> |
| 8 | 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> | |
| 9 | + <a class="wpo-images-dimensions__premium-link" href="<?php echo esc_url($wp_optimize->premium_version_link);?>&utm_content=auto-add-image-dimensions" target="_blank"><?php esc_html_e('Auto add images dimensions with WP-Optimize Premium.', 'wp-optimize'); ?></a> | |
| 10 | 10 | </div> |
| 11 | 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)); | |
| 12 | + // translators: %1$s - First Contentful Paint link, %2$s - Cumulative Layout Shift link (articles about core web vitals, FCP and CLS). | |
| 13 | + printf(esc_html__('WP-Optimize will automatically detect images with missing width or height, and add those attributes for improving %1$s and %2$s.', 'wp-optimize'), | |
| 14 | + // phpcs:disable | |
| 15 | + // WordPress.Security.EscapeOutput.OutputNotEscaped - Output is already escaped | |
| 16 | + $wp_optimize->wp_optimize_url($fcp_link, esc_html__('First Contentful Paint time', 'wp-optimize'), '', '', true), | |
| 17 | + $wp_optimize->wp_optimize_url($cls_link, esc_html__('Cumulative Layout Shift', 'wp-optimize'), '', '', true)); | |
| 18 | + // phpcs:enable | |
| 15 | 19 | ?></p> |
| 16 | 20 | <div class="switch-container"> |
| 17 | 21 | <label class="switch"> |
| 18 | 22 | <input name="images_dimensions" id="images_dimensions" class="dimensions-settings" type="checkbox"> |