PluginProbe
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF / 1.9.8
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF v1.9.8
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 1.9.8, at views/page-bulk.php

232 lines 8.7 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 <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 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 ( ( ! defined( 'IMAGIFY_HIDDEN_ACCOUNT' ) || ! IMAGIFY_HIDDEN_ACCOUNT ) && Imagify_Requirements::is_api_key_valid() ) {
89 $user = new Imagify_User();
90 ?>
91 <div class="imagify-options-title">
92 <p class="imagify-meteo-title">
93 <span class="dashicons dashicons-admin-users"></span>
94 <?php esc_html_e( 'Your Account', 'imagify' ); ?>
95 </p>
96
97 <a href="<?php echo esc_url( imagify_get_external_url( 'subscription' ) ); ?>" target="_blank"><?php _e( 'View your profile', 'imagify' ); ?></a>
98
99 <p class="imagify-meteo-subs">
100 <span class="screen-reader-text"><?php _e( 'Your subscription:', 'imagify' ); ?></span>
101 <strong class="imagify-user-plan imagify-user-plan-label"><?php echo $user->plan_label; ?></strong>
102 </p>
103 </div>
104
105 <?php if ( $user && 1 === $user->plan_id ) { ?>
106 <div class="imagify-col-content">
107 <div class="imagify-flex imagify-vcenter">
108 <span class="imagify-meteo-icon imagify-noshrink"><?php echo $this->get_quota_icon(); ?></span>
109 <div class="imagify-space-left imagify-full-width">
110
111 <p>
112 <?php
113 printf(
114 /* translators: %s is a data quota. */
115 __( 'You have %s space credit left', 'imagify' ),
116 '<span class="imagify-unconsumed-percent">' . $this->get_quota_percent() . '%</span>'
117 );
118 ?>
119 </p>
120
121 <div class="<?php echo $this->get_quota_class(); ?>">
122 <div class="imagify-unconsumed-bar imagify-progress" style="width: <?php echo $this->get_quota_percent() . '%'; ?>;"></div>
123 </div>
124 </div>
125 </div>
126 <?php
127 /**
128 * Filter whether the plan chooser section is displayed.
129 *
130 * @param $show_new bool Default to true: display the section.
131 */
132 if ( apply_filters( 'imagify_show_new_to_imagify', true ) ) {
133 ?>
134 <div class="imagify-block-secondary">
135 <p class="imagify-section-title imagify-h3-like">
136 <?php
137 if ( ! $this->get_quota_percent() ) {
138 esc_html_e( 'Oops, It\'s Over!', 'imagify' );
139 } elseif ( $this->get_quota_percent() <= 20 ) {
140 esc_html_e( 'Oops, It\'s almost over!', 'imagify' );
141 } else {
142 esc_html_e( 'You\'re new to Imagify?', 'imagify' );
143 }
144 ?>
145 </p>
146 <p><?php esc_html_e( 'Let us help you by analyzing your existing images and determine the best plan for you.', 'imagify' ); ?></p>
147
148 <button id="imagify-get-pricing-modal" data-nonce="<?php echo wp_create_nonce( 'imagify_get_pricing_' . get_current_user_id() ); ?>" data-target="#imagify-pricing-modal" type="button" class="imagify-modal-trigger imagify-button imagify-button-light imagify-button-big imagify-full-width">
149 <i class="dashicons dashicons-dashboard" aria-hidden="true"></i>
150 <span class="button-text"><?php _e( 'What plan do I need?', 'imagify' ); ?></span>
151 </button>
152 </div>
153 <?php
154 }
155 ?>
156 </div><!-- .imagify-col-content -->
157 <?php } // End if(). ?>
158 <?php } // End if(). ?>
159
160 </div><!-- .imagify-account-info-col -->
161
162 </div><!-- .imagify-columns -->
163
164 <?php
165 $this->print_template( 'part-bulk-optimization-success' );
166
167 $this->print_template( 'part-bulk-optimization-table', $data );
168
169 // New Feature!
170 if ( ! empty( $data['no-custom-folders'] ) ) {
171 $this->print_template( 'part-bulk-optimization-newbie' );
172 }
173 ?>
174
175 <div class="imagify-bulk-submit imagify-flex imagify-vcenter">
176 <div class="imagify-pr2">
177 <p>
178 <?php wp_nonce_field( 'imagify-bulk-optimize', 'imagifybulkuploadnonce' ); ?>
179 <button id="imagify-bulk-action" type="button" class="button button-primary">
180 <span class="dashicons dashicons-admin-generic"></span>
181 <span class="button-text"><?php _e( 'Imagif’em all', 'imagify' ); ?></span>
182 </button>
183 </p>
184 </div>
185 <?php if ( ! is_wp_error( get_imagify_max_image_size() ) ) { ?>
186 <p>
187 <?php
188 printf(
189 /* translators: %s is a file size. */
190 esc_html__( 'All images greater than %s (after resizing, if any) will be optimized when using a paid plan.', 'imagify' ),
191 esc_html( imagify_size_format( get_imagify_max_image_size() ) )
192 );
193 ?>
194 </p>
195 <?php } ?>
196 </div><!-- .imagify-bulk-submit -->
197 </div><!-- .imagify-settings-section -->
198
199 <?php
200 $this->print_template( 'modal-payment' );
201
202 if ( Imagify_Requirements::is_api_key_valid() ) {
203 $display_infos = get_transient( 'imagify_bulk_optimization_infos' );
204
205 ?>
206 <script type="text/html" id="tmpl-imagify-overquota-alert">
207 <?php $this->print_template( 'part-bulk-optimization-overquota-alert' ); ?>
208 </script>
209 <?php
210
211 if ( ! $display_infos ) {
212 ?>
213 <script type="text/html" id="tmpl-imagify-bulk-infos">
214 <?php
215 $this->print_template( 'part-bulk-optimization-infos', array(
216 'quota' => $data['unconsumed_quota'],
217 'quota_class' => $data['quota_class'],
218 'library' => ! empty( $data['groups']['library'] ),
219 ) );
220 ?>
221 </script>
222 <?php
223 }
224 }
225 ?>
226
227 <script type="text/html" id="tmpl-imagify-spinner">
228 <?php $this->print_template( 'part-bulk-optimization-spinner' ); ?>
229 </script>
230 </div>
231 <?php
232