PluginProbe
Image Optimizer – Compress Images and Convert to WebP or AVIF / 1.1.0
Image Optimizer – Compress Images and Convert to WebP or AVIF v1.1.0
1.7.7 1.7.6 1.7.5 1.7.4 trunk 1.0.0 1.0.1 1.0.2 1.1.0 1.2.0 1.2.1 1.3.0 1.4.0 1.4.1 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 All 33 releases
image-optimization / modules / optimization / templates / list-view / error.php

error.php in Image Optimizer – Compress Images and Convert to WebP or AVIF 1.1.0, at modules/optimization/templates/list-view/error.php

45 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 exit; // Exit if accessed directly.
4 }
5 ?>
6 <div class="image-optimization-control image-optimization-control--list-view image-optimization-control--error"
7 data-image-optimization-context="list-view"
8 data-image-optimization-status="error"
9 data-image-allow-retry="<?php echo esc_attr( $args['allow_retry'] ); ?>"
10 data-image-optimization-action="<?php echo esc_attr( $args['action'] ); ?>"
11 data-image-optimization-image-id="<?php echo esc_attr( $args['image_id'] ); ?>"
12 data-image-optimization-can-be-restored="<?php echo esc_attr( $args['can_be_restored'] ); ?>">
13
14 <?php
15 $message = esc_html( $args['message'] );
16
17 if ( false === $args['allow_retry'] ) {
18 $message_chunks = explode( '. ', $message, 2 );
19
20 $message = "<span class='image-optimization-control__error-title'>{$message_chunks[0]}</span>";
21
22 if ( isset( $message_chunks[1] ) ) {
23 $message .= "<span class='image-optimization-control__error-subtitle'>{$message_chunks[1]}</span>";
24 }
25 }
26 ?>
27
28 <span class='image-optimization-control__error-message'><?php echo $message; ?></span>
29
30 <?php if ( $args['allow_retry'] ) { ?>
31 <?php if ( isset( $args['images_left'] ) && 0 === $args['images_left'] ) { ?>
32 <a class="button button-secondary button-large image-optimization-control__button"
33 href="https://go.elementor.com/io-panel-upgrade/"
34 target="_blank" rel="noopener noreferrer">
35 <?php esc_html_e( 'Upgrade', 'image-optimization' ); ?>
36 </a>
37 <?php } else { ?>
38 <button class="button button-secondary button-large button-link-delete image-optimization-control__button image-optimization-control__button--try-again"
39 type="button">
40 <?php esc_html_e( 'Try again', 'image-optimization' ); ?>
41 </button>
42 <?php } ?>
43 <?php } ?>
44 </div>
45