PluginProbe ʕ •ᴥ•ʔ
Smush – Image Optimization, Compression, Lazy Load, WebP & CDN / 3.9.9
Smush – Image Optimization, Compression, Lazy Load, WebP & CDN v3.9.9
4.1.0 4.0.3 4.0.2 2.8.1 2.9.1 3.0.0 3.0.1 3.0.2 3.1.1 3.10.1 3.10.2 3.10.3 3.11.1 3.12.3 3.12.4 3.12.5 3.12.6 3.13.0 3.13.1 3.13.2 3.14.0 3.14.1 3.14.2 3.15.0 3.15.1 3.15.2 3.15.3 3.15.4 3.15.5 3.16.2 3.16.4 3.16.5 3.16.6 3.17.0 3.17.1 3.18.0 3.18.1 3.2.0.1 3.2.1 3.2.2.1 3.2.4 3.20.0 3.21.1 3.22.1 3.22.3 3.23.0 3.23.1 3.23.2 3.23.3 3.23.4 3.24.0 3.24.0-beta.2 3.3.0 3.3.1 3.3.2 3.4.1 3.4.2 3.6.1 3.6.3 3.7.0 3.7.1 3.7.2 3.7.3 3.8.2 3.8.3 3.8.4 3.8.5 3.8.7 3.8.8 3.9.0 3.9.1 3.9.11 3.9.2 3.9.4 3.9.5 3.9.8 3.9.9 trunk 1.0.0 1.0.1 1.0.2 1.1 1.1.1 1.1.2 1.1.3 1.2 1.2.1 1.2.10 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.1 1.3.2 1.3.3 1.3.4 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.5.1 1.6.5.2 1.6.5.3 1.6.5.4 1.7 1.7.1 1.7.1.1 2.0 2.0.1 2.0.3 2.0.4 2.0.5 2.0.6 2.0.6.2 2.0.6.3 2.0.6.5 2.0.7 2.0.7.1 2.1 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.2 2.2.1 2.2.2 2.3 2.3.1 2.4 2.4.2 2.4.3 2.4.4 2.4.5 2.5.2 2.5.3 2.6.1 2.6.2 2.6.3 2.7 2.7.1 2.7.4 2.7.4.1 2.7.5 2.7.6 2.7.8 2.7.8.1 2.7.9.1 2.8.0 2.8.0.1
wp-smushit / app / pages / class-bulk.php
wp-smushit / app / pages Last commit date
class-bulk.php 4 years ago class-cdn.php 4 years ago class-dashboard.php 4 years ago class-directory.php 4 years ago class-integrations.php 4 years ago class-lazy.php 4 years ago class-nextgen.php 4 years ago class-settings.php 4 years ago class-tools.php 4 years ago class-tutorials.php 4 years ago class-upgrade.php 4 years ago class-webp.php 4 years ago
class-bulk.php
588 lines
1 <?php
2 /**
3 * Bulk compress page.
4 *
5 * @since 2.9.0
6 * @package Smush\App\Pages
7 */
8
9 namespace Smush\App\Pages;
10
11 use Smush\App\Abstract_Summary_Page;
12 use Smush\App\Interface_Page;
13 use Smush\Core\Core;
14 use Smush\Core\Settings;
15 use WP_Smush;
16
17 if ( ! defined( 'WPINC' ) ) {
18 die;
19 }
20
21 /**
22 * Class Bulk
23 */
24 class Bulk extends Abstract_Summary_Page implements Interface_Page {
25 /**
26 * Function triggered when the page is loaded before render any content.
27 */
28 public function on_load() {
29 parent::on_load();
30
31 // If a free user, update the limits.
32 if ( ! WP_Smush::is_pro() ) {
33 // Reset transient.
34 Core::check_bulk_limit( true );
35 }
36
37 add_action( 'smush_setting_column_right_inside', array( $this, 'settings_desc' ), 10, 2 );
38 add_action( 'smush_setting_column_right_inside', array( $this, 'auto_smush' ), 15, 2 );
39 add_action( 'smush_setting_column_right_inside', array( $this, 'image_sizes' ), 15, 2 );
40 add_action( 'smush_setting_column_right_additional', array( $this, 'resize_settings' ), 20 );
41 add_action( 'smush_setting_column_right_outside', array( $this, 'full_size_options' ), 20, 2 );
42 add_action( 'smush_setting_column_right_outside', array( $this, 'scale_options' ), 20, 2 );
43 }
44
45 /**
46 * Register meta boxes.
47 */
48 public function register_meta_boxes() {
49 parent::register_meta_boxes();
50
51 if ( ! is_network_admin() ) {
52 $this->add_meta_box(
53 'bulk',
54 __( 'Bulk Smush', 'wp-smushit' ),
55 array( $this, 'bulk_smush_metabox' ),
56 null,
57 null,
58 'main',
59 array(
60 'box_class' => 'sui-box bulk-smush-wrapper',
61 )
62 );
63 }
64
65 // Only for the Free version and when there aren't images to smush.
66 if ( ! WP_Smush::is_pro() ) {
67 $this->add_meta_box(
68 'bulk/upgrade',
69 '',
70 null,
71 null,
72 null,
73 'main',
74 array(
75 'box_class' => 'sui-box sui-hidden',
76 )
77 );
78 }
79
80 $class = WP_Smush::is_pro() ? 'wp-smush-pro' : '';
81 $this->add_meta_box(
82 'bulk-settings',
83 __( 'Settings', 'wp-smushit' ),
84 array( $this, 'bulk_settings_meta_box' ),
85 null,
86 array( $this, 'common_meta_box_footer' ),
87 'main',
88 array(
89 'box_class' => "sui-box smush-settings-wrapper {$class}",
90 )
91 );
92
93 // Do not show if pro user.
94 if ( ! WP_Smush::is_pro() ) {
95 $this->add_meta_box(
96 'pro-features',
97 __( 'Upgrade to Smush Pro', 'wp-smushit' ),
98 function () {
99 $this->view( 'pro-features/meta-box' );
100 }
101 );
102 }
103 }
104
105 /**
106 * Prints Dimensions required for Resizing
107 *
108 * @param string $name Setting name.
109 */
110 public function resize_settings( $name = '' ) {
111 // Add only to full size settings.
112 if ( 'resize' !== $name ) {
113 return;
114 }
115
116 // Dimensions.
117 $resize_sizes = $this->settings->get_setting(
118 'wp-smush-resize_sizes',
119 array(
120 'width' => '',
121 'height' => '',
122 )
123 );
124
125 // Get max dimensions.
126 $max_sizes = WP_Smush::get_instance()->core()->get_max_image_dimensions();
127
128 $setting_status = $this->settings->get( 'resize' );
129 ?>
130 <div tabindex="0" class="sui-toggle-content">
131 <div class="sui-border-frame<?php echo $setting_status ? '' : ' sui-hidden'; ?>" id="smush-resize-settings-wrap" style="margin-bottom: 10px;">
132 <div class="sui-row">
133 <div class="sui-col-md-6">
134 <div class="sui-form-field">
135 <label aria-labelledby="wp-smush-label-max-width" for="<?php echo 'wp-smush-' . esc_attr( $name ) . '_width'; ?>" class="sui-label">
136 <?php esc_html_e( 'Max width', 'wp-smushit' ); ?>
137 </label>
138 <input aria-required="true" type="number" class="sui-form-control wp-smush-resize-input"
139 aria-describedby="wp-smush-resize-note"
140 id="<?php echo 'wp-smush-' . esc_attr( $name ) . '_width'; ?>"
141 name="<?php echo 'wp-smush-' . esc_attr( $name ) . '_width'; ?>"
142 value="<?php echo isset( $resize_sizes['width'] ) && ! empty( $resize_sizes['width'] ) ? absint( $resize_sizes['width'] ) : 2560; ?>">
143 </div>
144 </div>
145 <div class="sui-col-md-6">
146 <div class="sui-form-field">
147 <label aria-labelledby="wp-smush-label-max-height" for="<?php echo 'wp-smush-' . esc_attr( $name ) . '_height'; ?>" class="sui-label">
148 <?php esc_html_e( 'Max height', 'wp-smushit' ); ?>
149 </label>
150 <input aria-required="true" type="number" class="sui-form-control wp-smush-resize-input"
151 aria-describedby="wp-smush-resize-note"
152 id="<?php echo 'wp-smush-' . esc_attr( $name ) . '_height'; ?>"
153 name="<?php echo 'wp-smush-' . esc_attr( $name ) . '_height'; ?>"
154 value="<?php echo isset( $resize_sizes['height'] ) && ! empty( $resize_sizes['height'] ) ? absint( $resize_sizes['height'] ) : 2560; ?>">
155 </div>
156 </div>
157 </div>
158 <div class="sui-description" id="wp-smush-resize-note">
159 <?php
160 printf( /* translators: %1$s: strong tag, %2$d: max width size, %3$s: tag, %4$d: max height size, %5$s: closing strong tag */
161 esc_html__( 'Currently, your largest image size is set at %1$s%2$dpx wide %3$s %4$dpx high%5$s.', 'wp-smushit' ),
162 '<strong>',
163 esc_html( $max_sizes['width'] ),
164 '&times;',
165 esc_html( $max_sizes['height'] ),
166 '</strong>'
167 );
168 ?>
169 <div class="sui-notice sui-notice-info wp-smush-update-width sui-no-margin-bottom sui-hidden">
170 <div class="sui-notice-content">
171 <div class="sui-notice-message">
172 <i class="sui-notice-icon sui-icon-info sui-md" aria-hidden="true"></i>
173 <p><?php esc_html_e( "Just to let you know, the width you've entered is less than your largest image and may result in pixelation.", 'wp-smushit' ); ?></p>
174 </div>
175 </div>
176 </div>
177 <div class="sui-notice sui-notice-info wp-smush-update-height sui-no-margin-bottom sui-hidden">
178 <div class="sui-notice-content">
179 <div class="sui-notice-message">
180 <i class="sui-notice-icon sui-icon-info sui-md" aria-hidden="true"></i>
181 <p><?php esc_html_e( 'Just to let you know, the height you’ve entered is less than your largest image and may result in pixelation.', 'wp-smushit' ); ?></p>
182 </div>
183 </div>
184 </div>
185 </div>
186 </div>
187 <span class="sui-description">
188 <?php
189 printf( /* translators: %s: link to gifgifs.com */
190 esc_html__(
191 'Note: Image resizing happens automatically when you upload attachments. To support
192 retina devices, we recommend using 2x the dimensions of your image size. Animated GIFs will not be
193 resized as they will lose their animation, please use a tool such as %s to resize
194 then re-upload.',
195 'wp-smushit'
196 ),
197 '<a href="http://gifgifs.com/resizer/" target="_blank">http://gifgifs.com/resizer/</a>'
198 );
199 ?>
200 </span>
201 </div>
202 <?php
203 }
204
205 /**
206 * Show additional descriptions for settings.
207 *
208 * @param string $setting_key Setting key.
209 */
210 public function settings_desc( $setting_key = '' ) {
211 if ( empty( $setting_key ) || ! in_array(
212 $setting_key,
213 array( 'resize', 'original', 'strip_exif', 'png_to_jpg' ),
214 true
215 ) ) {
216 return;
217 }
218
219 if ( 'png_to_jpg' === $setting_key ) {
220 ?>
221 <div class="sui-toggle-content">
222 <div class="sui-notice sui-notice-info" style="margin-top: 10px">
223 <div class="sui-notice-content">
224 <div class="sui-notice-message">
225 <i class="sui-notice-icon sui-icon-info sui-md" aria-hidden="true"></i>
226 <p>
227 <?php
228 printf( /* translators: %1$s - <strong>, %2$s - </strong> */
229 esc_html__( 'Note: Any PNGs with transparency will be ignored. Smush will only convert PNGs if it results in a smaller file size. The resulting file will have a new filename and extension (JPEG), and %1$sany hard-coded URLs on your site that contain the original PNG filename will need to be updated manually%2$s.', 'wp-smushit' ),
230 '<strong>',
231 '</strong>'
232 );
233 ?>
234 </p>
235 </div>
236 </div>
237 </div>
238 </div>
239 <?php
240 return;
241 }
242
243 global $wp_version;
244
245 ?>
246 <span class="sui-description sui-toggle-description" id="<?php echo esc_attr( $setting_key . '-desc' ); ?>">
247 <?php
248 switch ( $setting_key ) {
249 case 'resize':
250 if ( version_compare( $wp_version, '5.2.999', '>' ) ) {
251 esc_html_e( 'As of WordPress 5.3, large image uploads are resized down to a specified max width and height. If you require images larger than 2560px, you can override this setting here.', 'wp-smushit' );
252 } else {
253 esc_html_e( 'Save a ton of space by not storing over-sized images on your server. Set a maximum height and width for all images uploaded to your site so that any unnecessarily large images are automatically resized before they are added to the media gallery. This setting does not apply to images smushed using Directory Smush feature.', 'wp-smushit' );
254 }
255 break;
256 case 'original':
257 esc_html_e( 'By default, WordPress won’t compress the images that you upload, only its generated attachments. Enable this feature to compress your uploaded images.', 'wp-smushit' );
258 break;
259 case 'strip_exif':
260 esc_html_e(
261 'Note: This data adds to the size of the image. While this information might be
262 important to photographers, it’s unnecessary for most users and safe to remove.',
263 'wp-smushit'
264 );
265 break;
266 default:
267 break;
268 }
269 ?>
270 </span>
271 <?php
272 }
273
274 /**
275 * Prints notice after auto compress settings.
276 *
277 * @since 3.2.1
278 *
279 * @param string $name Setting key.
280 */
281 public function auto_smush( $name = '' ) {
282 // Add only to auto smush settings.
283 if ( 'auto' !== $name ) {
284 return;
285 }
286 ?>
287 <div class="sui-toggle-content">
288 <div class="sui-notice <?php echo $this->settings->get( 'auto' ) ? '' : ' sui-hidden'; ?>" style="margin-top: 10px">
289 <div class="sui-notice-content">
290 <div class="sui-notice-message">
291 <i class="sui-notice-icon sui-icon-info sui-md" aria-hidden="true"></i>
292 <p><?php esc_html_e( 'Note: We will only automatically compress the image sizes selected above.', 'wp-smushit' ); ?></p>
293 </div>
294 </div>
295 </div>
296 </div>
297 <?php
298 }
299
300 /**
301 * Prints all the registered image sizes, to be selected/unselected for smushing.
302 *
303 * @param string $name Setting key.
304 *
305 * @return void
306 */
307 public function image_sizes( $name = '' ) {
308 // Add only to bulk smush settings.
309 if ( 'bulk' !== $name ) {
310 return;
311 }
312
313 // Additional image sizes.
314 $image_sizes = $this->settings->get_setting( 'wp-smush-image_sizes', false );
315 $sizes = WP_Smush::get_instance()->core()->image_dimensions();
316
317 $all_selected = false === $image_sizes || count( $image_sizes ) === count( $sizes );
318 ?>
319 <?php if ( ! empty( $sizes ) ) : ?>
320 <div class="sui-side-tabs sui-tabs">
321 <div data-tabs="">
322 <label for="all-image-sizes" class="sui-tab-item <?php echo $all_selected ? 'active' : ''; ?>">
323 <input type="radio" name="wp-smush-auto-image-sizes" value="all" id="all-image-sizes" <?php checked( $all_selected ); ?>>
324 <?php esc_html_e( 'All', 'wp-smushit' ); ?>
325 </label>
326 <label for="custom-image-sizes" class="sui-tab-item <?php echo $all_selected ? '' : 'active'; ?>">
327 <input type="radio" name="wp-smush-auto-image-sizes" value="custom" id="custom-image-sizes" <?php checked( $all_selected, false ); ?>>
328 <?php esc_html_e( 'Custom', 'wp-smushit' ); ?>
329 </label>
330 </div><!-- end data-tabs -->
331 <div data-panes>
332 <div class="sui-tab-boxed <?php echo $all_selected ? 'active' : ''; ?>" style="display:none"></div>
333 <div class="sui-tab-boxed <?php echo $all_selected ? '' : 'active'; ?>">
334 <span class="sui-label"><?php esc_html_e( 'Included image sizes', 'wp-smushit' ); ?></span>
335 <?php
336 foreach ( $sizes as $size_k => $size ) {
337 // If image sizes array isn't set, mark all checked ( Default Values ).
338 if ( false === $image_sizes ) {
339 $checked = true;
340 } else {
341 // WPMDUDEV hosting support: cast $size_k to string to properly work with object cache.
342 $checked = is_array( $image_sizes ) ? in_array( (string) $size_k, $image_sizes, true ) : false;
343 }
344 ?>
345 <label class="sui-checkbox sui-checkbox-stacked sui-checkbox-sm">
346 <input type="checkbox" <?php checked( $checked, true ); ?>
347 id="wp-smush-size-<?php echo esc_attr( $size_k ); ?>"
348 name="wp-smush-image_sizes[]"
349 value="<?php echo esc_attr( $size_k ); ?>">
350 <span aria-hidden="true">&nbsp;</span>
351 <span>
352 <?php if ( isset( $size['width'], $size['height'] ) ) : ?>
353 <?php echo esc_html( $size_k . ' (' . $size['width'] . 'x' . $size['height'] . ') ' ); ?>
354 <?php else : ?>
355 <?php echo esc_attr( $size_k ); ?>
356 <?php endif; ?>
357 </span>
358 </label>
359 <?php
360 }
361 ?>
362 </div>
363 </div>
364 </div>
365 <?php endif; ?>
366 <?php if ( has_filter( 'wp_image_editors', 'photon_subsizes_override_image_editors' ) ) : ?>
367 <?php
368 $text = sprintf( /* translators: %1$s - <a>, %2$s - </a> */
369 esc_html__( "We noticed Jetpack's %1\$sSite Accelerator%2\$s is active with the “Speed up image load times” option enabled. Since Site Accelerator completely offloads intermediate thumbnail sizes (they don't exist in your Media Library), Smush can't optimize those images.", 'wp-smushit' ),
370 '<a href="https://jetpack.com/support/site-accelerator/" target="_blank">',
371 '</a>'
372 );
373
374 if ( WP_Smush::is_pro() ) {
375 $text .= ' ' . sprintf( /* translators: %1$s - <a>, %2$s - </a> */
376 esc_html__( 'You can still optimize your %1$sOriginal Images%2$s if you want to.', 'wp-smushit' ),
377 '<a href="#wp-smush-original">',
378 '</a>'
379 );
380 }
381 ?>
382 <div class="sui-notice sui-notice-warning" style="margin-top: -20px">
383 <div class="sui-notice-content">
384 <div class="sui-notice-message">
385 <i class="sui-notice-icon sui-icon-info sui-md" aria-hidden="true"></i>
386 <p><?php echo wp_kses_post( $text ); ?></p>
387 </div>
388 </div>
389 </div>
390 <?php endif; ?>
391 <?php
392 }
393
394 /**
395 * Prints Resize, Smush Original, and Backup settings.
396 *
397 * @param string $name Name of the current setting being processed.
398 */
399 public function full_size_options( $name = '' ) {
400 // Continue only if original image option.
401 if ( 'original' !== $name ) {
402 return;
403 }
404
405 $value = $this->settings->get( 'backup' );
406 ?>
407 <div class="sui-form-field">
408 <label for="backup" class="sui-toggle">
409 <input
410 type="checkbox"
411 value="1"
412 id="backup"
413 name="backup"
414 aria-labelledby="backup-label"
415 aria-describedby="backup-desc"
416 <?php checked( $value, 1 ); ?>
417 />
418 <span class="sui-toggle-slider" aria-hidden="true"></span>
419 <span id="backup-label" class="sui-toggle-label">
420 <?php echo esc_html( Settings::get_setting_data( 'backup', 'label' ) ); ?>
421 </span>
422 <span class="sui-description sui-toggle-description" id="backup-desc">
423 <?php echo esc_html( Settings::get_setting_data( 'backup', 'desc' ) ); ?>
424 </span>
425 </label>
426
427 <div class="sui-toggle-content <?php echo $this->settings->get( 'original' ) ? 'sui-hidden' : ''; ?>" id="backup-notice">
428 <div class="sui-notice" style="margin-top: 10px">
429 <div class="sui-notice-content">
430 <div class="sui-notice-message">
431 <i class="sui-notice-icon sui-icon-info sui-md" aria-hidden="true"></i>
432 <p>
433 <?php
434 printf( /* translators: %1$s - <strong>, %2$s - </strong> */
435 esc_html__( '%1$sCompress Uploaded Images%2$s is disabled, which means that enabling %1$sBackup Uploaded Images%2$s won’t yield additional benefits and will use more storage space. We recommend enabling %1$sBackup Uploaded Images%2$s only if %1$sCompress Uploaded Images%2$s is also enabled.', 'wp-smushit' ),
436 '<strong>',
437 '</strong>'
438 );
439 ?>
440 </p>
441 </div>
442 </div>
443 </div>
444 </div>
445 </div>
446 <?php
447 }
448
449 /**
450 * Add scale image settings.
451 *
452 * @since 3.9.1
453 *
454 * @param string $name Name of the current setting being processed.
455 */
456 public function scale_options( $name = '' ) {
457 if ( 'resize' !== $name ) {
458 return;
459 }
460
461 // Not available on WordPress before 5.3.
462 global $wp_version;
463 if ( version_compare( $wp_version, '5.3', '<' ) ) {
464 return;
465 }
466
467 $value = $this->settings->get( 'no_scale' );
468 ?>
469 <div class="sui-form-field">
470 <label for="no_scale" class="sui-toggle">
471 <input
472 type="checkbox"
473 value="1"
474 id="no_scale"
475 name="no_scale"
476 aria-labelledby="no_scale-label"
477 aria-describedby="no_scale-desc"
478 <?php checked( $value, 1 ); ?>
479 />
480 <span class="sui-toggle-slider" aria-hidden="true"></span>
481 <span id="no_scale-label" class="sui-toggle-label">
482 <?php echo esc_html( Settings::get_setting_data( 'no_scale', 'label' ) ); ?>
483 </span>
484 <span class="sui-description sui-toggle-description" id="no_scale-desc">
485 <?php echo esc_html( Settings::get_setting_data( 'no_scale', 'desc' ) ); ?>
486 </span>
487 </label>
488 </div>
489 <?php
490 }
491
492 /**************************
493 * META BOXES
494 */
495
496 /**
497 * Common footer meta box.
498 *
499 * @since 3.2.0
500 */
501 public function common_meta_box_footer() {
502 $this->view( 'meta-box-footer', array(), 'common' );
503 }
504
505 /**
506 * Bulk smush meta box.
507 *
508 * Container box to handle bulk smush actions. Show progress bars,
509 * bulk smush action buttons etc. in this box.
510 */
511 public function bulk_smush_metabox() {
512 $core = WP_Smush::get_instance()->core();
513
514 $total_images_to_smush = $this->get_total_images_to_smush();
515
516 // This is the same calculation used for $core->remaining_count,
517 // except that we don't add the re-smushed count here.
518 $unsmushed_count = $core->total_count - $core->smushed_count - $core->skipped_count;
519
520 $upgrade_url = add_query_arg(
521 array(
522 'utm_source' => 'smush',
523 'utm_medium' => 'plugin',
524 'utm_campaign' => 'smush_bulksmush_completed_pagespeed_upgradetopro',
525 ),
526 $this->upgrade_url
527 );
528
529 $bulk_upgrade_url = add_query_arg(
530 array(
531 'coupon' => 'SMUSH30OFF',
532 'checkout' => 0,
533 'utm_source' => 'smush',
534 'utm_medium' => 'plugin',
535 'utm_campaign' => Core::$max_free_bulk < $total_images_to_smush ? 'smush_bulksmush_morethan50images_tryproforfree' : 'smush_bulksmush_lessthan50images_tryproforfree',
536 ),
537 $this->upgrade_url
538 );
539
540 $this->view(
541 'bulk/meta-box',
542 array(
543 'core' => $core,
544 'hide_pagespeed' => get_site_option( 'wp-smush-hide_pagespeed_suggestion' ),
545 'is_pro' => WP_Smush::is_pro(),
546 'unsmushed_count' => $unsmushed_count > 0 ? $unsmushed_count : 0,
547 'resmush_count' => count( get_option( 'wp-smush-resmush-list', array() ) ),
548 'total_images_to_smush' => $total_images_to_smush,
549 'upgrade_url' => $upgrade_url,
550 'bulk_upgrade_url' => $bulk_upgrade_url,
551 )
552 );
553 }
554
555 /**
556 * Settings meta box.
557 *
558 * Free and pro version settings are shown in same section. For free users, pro settings won't be shown.
559 * To print full size smush, resize and backup in group, we hook at `smush_setting_column_right_end`.
560 */
561 public function bulk_settings_meta_box() {
562 $fields = $this->settings->get_bulk_fields();
563
564 // Remove backups setting, as it's added separately.
565 $key = array_search( 'backup', $fields, true );
566 if ( false !== $key ) {
567 unset( $fields[ $key ] );
568 }
569
570 // Remove no_scale setting, as it's added separately.
571 $key = array_search( 'no_scale', $fields, true );
572 if ( false !== $key ) {
573 unset( $fields[ $key ] );
574 }
575
576 $this->view(
577 'bulk-settings/meta-box',
578 array(
579 'basic_features' => Settings::$basic_features,
580 'cdn_enabled' => $this->settings->get( 'cdn' ),
581 'grouped_settings' => $fields,
582 'settings' => $this->settings->get(),
583 )
584 );
585 }
586
587 }
588