PluginProbe
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF / 2.3.0
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF v2.3.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 / page-bulk.php

page-bulk.php in Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF 2.3.0, at views/page-bulk.php

187 lines 6.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 defined( 'ABSPATH' ) || exit;
3 ?>
4 <div class="wrap imagify-settings imagify-bulk">
5
6 <?php $this->print_template( 'part-bulk-optimization-header' ); ?>
7
8 <div class="imagify-settings-section">
9
10 <div class="imagify-columns">
11 <div class="imagify-col col-overview">
12 <h2 class="imagify-h2-like">
13 <span class="dashicons dashicons-chart-line"></span>
14 <?php esc_html_e( 'Overview', 'imagify' ); ?>
15 </h2>
16
17 <div class="imagify-columns">
18 <div class="imagify-col col-statistics">
19 <h3 class="screen-reader-text"><?php esc_html_e( 'Statistics', 'imagify' ); ?></h3>
20
21 <div class="imagify-number-you-optimized">
22 <p>
23 <span id="imagify-total-optimized-attachments" class="number"><?php echo esc_html( $data['already_optimized_attachments'] ); ?></span>
24 <span class="text">
25 <?php
26 printf(
27 /* translators: you can use %s to include a line break. */
28 esc_html__( 'that\'s the number of original images%s you optimized with Imagify', 'imagify' ),
29 '<br>'
30 );
31 ?>
32 </span>
33 </p>
34 </div>
35
36 <div class="imagify-bars">
37 <p><?php esc_html_e( 'Original size', 'imagify' ); ?></p>
38 <div class="imagify-bar-negative base-transparent right-outside-number">
39 <div id="imagify-original-bar" class="imagify-progress" style="width: 100%"><span class="imagify-barnb"><?php echo esc_html( $data['original_human'] ); ?></span></div>
40 </div>
41
42 <p><?php esc_html_e( 'Optimized size', 'imagify' ); ?></p>
43 <div class="imagify-bar-primary base-transparent right-outside-number">
44 <div id="imagify-optimized-bar" class="imagify-progress" style="width: <?php echo esc_attr( max( 100 - $data['optimized_percent'], 0 ) ); ?>%"><span class="imagify-barnb"><?php echo esc_html( $data['optimized_human'] ); ?></span></div>
45 </div>
46
47 </div>
48
49 <div class="imagify-number-you-optimized">
50 <p>
51 <span id="imagify-total-optimized-attachments-pct" class="number"><?php echo esc_html( number_format_i18n( $data['optimized_percent'] ) ); ?>%</span>
52 <span class="text">
53 <?php
54 printf(
55 /* translators: %s is a line break. */
56 esc_html__( 'that\'s the size you saved %sby using Imagify', 'imagify' ),
57 '<br>'
58 );
59 ?>
60 </span>
61 </p>
62 </div>
63 </div><!-- .imagify-col.col-statistics -->
64
65 <div class="imagify-col col-chart">
66 <div class="imagify-chart-container imagify-overview-chart-container">
67 <canvas id="imagify-overview-chart" width="180" height="180" data-unoptimized="<?php echo esc_attr( $data['unoptimized_attachments'] ); ?>" data-optimized="<?php echo esc_attr( $data['optimized_attachments'] ); ?>" data-errors="<?php echo esc_attr( $data['errors_attachments'] ); ?>"></canvas>
68 <div id="imagify-overview-chart-percent" class="imagify-chart-percent"><?php echo esc_html( min( $data['optimized_attachments_percent'], 100 ) ); ?><span>%</span></div>
69 </div>
70 <div id="imagify-overview-chart-legend"></div>
71
72 <p class="imagify-global-optim-phrase imagify-clear">
73 <?php
74 printf(
75 /* translators: %s is a percentage. */
76 esc_html__( 'You optimized %s of your website\'s images', 'imagify' ),
77 '<span class="imagify-total-percent">' . esc_html( min( $data['optimized_attachments_percent'], 100 ) ) . '%</span>'
78 );
79 ?>
80 </p>
81 </div><!-- .imagify-col -->
82 </div>
83 </div><!-- .imagify-col.col-overview -->
84
85 <div class="imagify-col imagify-account-info-col">
86
87 <?php
88 if (
89 ( ! defined( 'IMAGIFY_HIDDEN_ACCOUNT' ) || ! IMAGIFY_HIDDEN_ACCOUNT )
90 &&
91 Imagify_Requirements::is_api_key_valid()
92 ) {
93 ?>
94 <div class="imagify-options-title">
95 <div class="imagify-th-titles imagify-flex imagify-vcenter">
96 <span class="dashicons dashicons-admin-users"></span>
97 <p class="imagify-meteo-title">
98 <?php esc_html_e( 'Your Account', 'imagify' ); ?>
99 </p>
100 </div>
101 <a href="<?php echo esc_url( imagify_get_external_url( 'subscription' ) ); ?>" target="_blank"><?php esc_html_e( 'View your profile', 'imagify' ); ?></a>
102 </div>
103 <?php $this->print_template( 'part-upsell' ); ?>
104 <?php } ?>
105
106 </div><!-- .imagify-account-info-col -->
107
108 </div><!-- .imagify-columns -->
109
110 <?php
111 $this->print_template( 'part-bulk-optimization-success' );
112
113 $this->print_template( 'part-bulk-optimization-table', $data );
114
115 if ( ! empty( $data['no-custom-folders'] ) ) {
116 $this->print_template( 'part-bulk-optimization-newbie' );
117 }
118 ?>
119
120 <div class="imagify-bulk-submit imagify-flex imagify-vcenter">
121 <div class="imagify-pr2">
122 <p>
123 <?php wp_nonce_field( 'imagify-bulk-optimize', 'imagifybulkuploadnonce' ); ?>
124 <?php
125 $disabled = '';
126 $class = '';
127
128 if (
129 false !== get_transient( 'imagify_wp_optimize_running' )
130 ||
131 false !== get_transient( 'imagify_custom-folders_optimize_running' )
132 ) {
133 $disabled = 'disabled="disabled"';
134 $class = 'rotate';
135 }
136
137 ?>
138 <button id="imagify-bulk-action" type="button" class="button button-primary" <?php echo $disabled; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
139 <span class="dashicons dashicons-admin-generic <?php echo esc_attr( $class ); ?>"></span>
140 <span class="button-text"><?php esc_html_e( 'Imagif’em all', 'imagify' ); ?></span>
141 </button>
142 </p>
143 </div>
144 <?php if ( ! is_wp_error( get_imagify_max_image_size() ) ) { ?>
145 <p>
146 <?php
147 printf(
148 /* translators: %s is a file size. */
149 esc_html__( 'All images greater than %s (after resizing, if any) will be optimized when using a paid plan.', 'imagify' ),
150 esc_html( imagify_size_format( get_imagify_max_image_size() ) )
151 );
152 ?>
153 </p>
154 <?php } ?>
155 </div><!-- .imagify-bulk-submit -->
156 </div><!-- .imagify-settings-section -->
157
158 <?php
159 if ( Imagify_Requirements::is_api_key_valid() ) {
160 $display_infos = get_transient( 'imagify_bulk_optimization_infos' );
161
162 ?>
163 <script type="text/html" id="tmpl-imagify-overquota-alert">
164 <?php $this->print_template( 'part-bulk-optimization-overquota-alert' ); ?>
165 </script>
166 <?php
167
168 if ( ! $display_infos ) {
169 ?>
170 <script type="text/html" id="tmpl-imagify-bulk-infos">
171 <?php
172 $this->print_template(
173 'part-bulk-optimization-infos',
174 [
175 'quota' => $data['unconsumed_quota'],
176 'quota_class' => $data['quota_class'],
177 'library' => ! empty( $data['groups']['library'] ),
178 ]
179 );
180 ?>
181 </script>
182 <?php
183 }
184 }
185 ?>
186 </div>
187