PluginProbe
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF / 1.9.13
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF v1.9.13
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 / part-settings-library.php

part-settings-library.php in Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF 1.9.13, at views/part-settings-library.php

99 lines 3.0 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 $settings = Imagify_Settings::get_instance();
5 $options = Imagify_Options::get_instance();
6 $option_name = $options->get_option_name();
7 ?>
8 <div class="<?php echo imagify_can_optimize_custom_folders() ? 'imagify-col' : ''; ?>">
9 <h3 class="imagify-options-subtitle"><?php esc_html_e( 'Media Library', 'imagify' ); ?></h3>
10
11 <p class="imagify-setting-line">
12 <?php
13 $settings->field_checkbox(
14 [
15 'option_name' => 'resize_larger',
16 'label' => __( 'Resize larger images', 'imagify' ),
17 'attributes' => [
18 'aria-describedby' => 'describe-resize_larger',
19 ],
20 ]
21 );
22 ?>
23
24 <span class="imagify-options-line">
25 <label for="imagify_resize_larger_w">
26 <?php
27 $max_sizes = get_imagify_max_intermediate_image_size();
28 $resize_larger_w = $options->get( 'resize_larger_w' );
29 printf(
30 /* translators: 1 is a text input for a number of pixels (don't use %d). */
31 esc_html__( 'to maximum %s pixels width', 'imagify' ),
32 '<input type="number" id="imagify_resize_larger_w" min="' . $max_sizes['width'] . '" name="' . $option_name . '[resize_larger_w]" value="' . ( $resize_larger_w ? $resize_larger_w : '' ) . '" size="5">'
33 );
34 ?>
35 </label>
36 </span>
37
38 <span id="describe-resize_larger" class="imagify-info">
39 <span class="dashicons dashicons-info"></span>
40 <?php
41 printf(
42 /* translators: 1 is a number of pixels. */
43 esc_html__( 'This option is recommended to reduce larger images. You can save up to 80%% after resizing. The new width should not be less than your largest thumbnail width, which is actually %dpx.', 'imagify' ),
44 $max_sizes['width']
45 );
46 echo ' ';
47
48 if ( function_exists( 'wp_get_original_image_path' ) ) {
49 // WP 5.3+.
50 echo '<strong>' . esc_html__( 'Resizing is done on upload or during optimization.', 'imagify' ) . '</strong>';
51 } else {
52 esc_html_e( 'Resizing is done only during optimization.', 'imagify' );
53 }
54 ?>
55 </span>
56 </p>
57
58 <?php if ( ! imagify_is_active_for_network() ) : ?>
59
60 <div class="imagify-divider"></div>
61
62 <h4 class="imagify-h4-like"><?php esc_html_e( 'Files optimization', 'imagify' ); ?></h4>
63
64 <p>
65 <?php esc_html_e( 'You can choose to optimize different image sizes created by WordPress here.', 'imagify' ); ?>
66 </p>
67
68 <p>
69 <?php
70 printf(
71 /* translators: 1 is a "bold" tag start, 2 is the "bold" tag end. */
72 esc_html__( 'The %1$soriginal size%2$s is %1$sautomatically optimized%2$s by Imagify.', 'imagify' ),
73 '<strong>', '</strong>'
74 );
75 ?>
76 <br>
77 <span class="imagify-success">
78 <?php esc_html_e( 'Remember each additional image size will affect your Imagify monthly usage!', 'imagify' ); ?>
79 </span>
80 </p>
81
82 <?php
83 /**
84 * Disallowed thumbnail sizes.
85 */
86 $settings->field_checkbox_list(
87 [
88 'option_name' => 'disallowed-sizes',
89 'legend' => __( 'Choose the sizes to optimize', 'imagify' ),
90 'values' => Imagify_Settings::get_thumbnail_sizes(),
91 'reverse_check' => true,
92 ]
93 );
94 ?>
95
96 <?php endif; ?>
97 </div>
98 <?php
99