PluginProbe
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF / 2.3.3
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF v2.3.3
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 / generate-webp.php

generate-webp.php in Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF 2.3.3, at views/button/generate-webp.php

34 lines 875 B
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'] = 'button-imagify-generate-webp';
13 }
14
15 if ( ! isset( $data['atts']['data-processing-label'] ) ) {
16 // Used for JS.
17 $data['atts']['data-processing-label'] = __( 'Generating...', '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; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
24 <span class="dashicons dashicons-admin-generic"></span>
25 <?php
26 esc_html_e( 'Generate Next-Gen images versions', 'imagify' );
27 ?>
28 </a>
29
30 <?php
31 if ( ! empty( $data['atts']['data-processing-label'] ) ) {
32 $this->print_js_template_in_footer( 'button/processing' );
33 }
34