PluginProbe
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF / 2.0
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF v2.0
2.3.4 2.3.3 2.3.2 2.3.1 2.3.0 2.2.9 2.2.8 trunk 1.10 1.3.3 1.3.4 1.3.5 1.3.5.1 1.3.5.2 1.3.6 1.3.6.1 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.5 All 103 releases
imagify / views / button / optimize-missing-sizes.php

optimize-missing-sizes.php in Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF 2.0, at views/button/optimize-missing-sizes.php

40 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' );
3
4 $html_atts = '';
5
6 if ( empty( $data['atts'] ) ) {
7 $data['atts'] = [];
8 }
9
10 if ( ! isset( $data['atts']['class'] ) ) {
11 // Class used for JS.
12 $data['atts']['class'] = 'optimize-missing-sizes';
13 }
14
15 if ( ! isset( $data['atts']['data-processing-label'] ) ) {
16 // Used for JS.
17 $data['atts']['data-processing-label'] = __( 'Optimizing...', 'imagify' );
18 }
19
20 $html_atts = $this->build_attributes( $data['atts'] );
21 ?>
22
23 <a href="<?php echo esc_url( $data['url'] ); ?>"<?php echo $html_atts; ?>>
24 <span class="dashicons dashicons-admin-generic"></span>
25 <?php
26 printf(
27 /* translators: 1 is the number of thumbnails to optimize, 2 is the opening of a HTML tag that will be hidden on small screens, 3 is the closing tag. */
28 esc_html( _n( '%2$sOptimize %3$s%1$d missing thumbnail', '%2$sOptimize %3$s%1$d missing thumbnails', $data['count'], 'imagify' ) ),
29 number_format_i18n( $data['count'] ),
30 '<span class="imagify-hide-if-small">',
31 '</span>'
32 );
33 ?>
34 </a>
35
36 <?php
37 if ( ! empty( $data['atts']['data-processing-label'] ) ) {
38 $this->print_js_template_in_footer( 'button/processing' );
39 }
40