PluginProbe
QuickWebP – WebP & AVIF Image Optimizer, Compression & SEO for WordPress / 3.1.0
QuickWebP – WebP & AVIF Image Optimizer, Compression & SEO for WordPress v3.1.0
4.1.2 4.1.1 4.1.0 4.0.1 4.0.0 3.3.1 3.3.0 trunk 1.0.0 2.0.0 2.1.0 3.0.0 3.1.0 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8
quickwebp / admin / templates / page-settings.php

page-settings.php in QuickWebP – WebP & AVIF Image Optimizer, Compression & SEO for WordPress 3.1.0, at admin/templates/page-settings.php

228 lines 9.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The admin settings of the plugin.
4 * @since 1.0.0
5 */
6 ?>
7 <h1><?php _e( "QuickWebp Settings", QUICKWEBP_TEXT_DOMAIN ); ?></h1>
8
9 <form action="" method="post">
10
11 <table class="form-table">
12
13 <?php $this->render_component( array(
14 'type' => 'toggle',
15 'name' => 'quickwebp_settings_conversion',
16 'label' => __( "Enable/disable image conversion to WEBP format", QUICKWEBP_TEXT_DOMAIN ),
17 'default' => quickwebp_settings_default('quickwebp_settings_conversion'),
18 'classes' => 'toggle-with-children',
19 )); ?>
20
21 <tbody class="form-table children">
22
23 <?php $this->render_component( array(
24 'type' => 'range-slider',
25 'min' => 0,
26 'max' => 100,
27 'step' => 1,
28 'unit' => '%',
29 'name' => 'quickwebp_settings_conversion_quality',
30 'label' => __( 'Quality', QUICKWEBP_TEXT_DOMAIN ),
31 'default' => quickwebp_settings_default('quickwebp_settings_conversion_quality')
32 )); ?>
33
34 <?php $this->render_component( array(
35 'type' => 'range-slider',
36 'min' => 0,
37 'max' => 100,
38 'step' => 1,
39 'unit' => '%',
40 'name' => 'quickwebp_settings_conversion_sharpen',
41 'label' => __( 'Sharpen', QUICKWEBP_TEXT_DOMAIN ),
42 'default' => quickwebp_settings_default('quickwebp_settings_conversion_sharpen')
43 )); ?>
44
45 <?php $this->render_component( array(
46 'type' => 'checkbox',
47 'name' => 'quickwebp_settings_conversion_ignore_webp',
48 'label' => __( "Do not compress images already in WebP", QUICKWEBP_TEXT_DOMAIN ),
49 'default' => quickwebp_settings_default('quickwebp_settings_conversion_ignore_webp'),
50 'options' => array(
51 array(
52 'label' => '',
53 'value' => 'checked'
54 )
55 )
56 )); ?>
57
58 <tr>
59 <th>
60 <label><?php _e( 'Before saving, test your configuration with preview mode.', QUICKWEBP_TEXT_DOMAIN ); ?></label>
61 </th>
62 <td>
63 <?php include QUICKWEBP_PLUGIN_PATH . 'admin/templates/popup-settings-preview.php'; ?>
64 </td>
65 </tr>
66
67 <?php
68 $description_for_nginx = $is_nginx ? __("If you choose to use rewrite rules, the file conf/quickwebp.conf will be created and must be included into the server's configuration file (then restart the server).", QUICKWEBP_TEXT_DOMAIN) : '';
69
70 $this->render_component( array(
71 'type' => 'radio',
72 'name' => 'quickwebp_settings_conversion_display_webp_mode',
73 'label' => __( "Display images in WebP format on the site", QUICKWEBP_TEXT_DOMAIN ),
74 'description' => sprintf( __('If activated, this option allows to deliver optimized images in bulk via QuickWebP in WebP format (useless for images converted to import). %s', QUICKWEBP_TEXT_DOMAIN), $description_for_nginx ),
75 'default' => quickwebp_settings_default('quickwebp_settings_conversion_display_webp_mode'),
76 'options' => array(
77 array(
78 'label' => __( 'Deactivate', QUICKWEBP_TEXT_DOMAIN ),
79 'value' => 'disabled'
80 ),
81 array(
82 'label' => __( 'Use <picture> tags', QUICKWEBP_TEXT_DOMAIN ),
83 'value' => 'picture'
84 ),
85 array(
86 'label' => sprintf( __( 'Use rewrite rules %s', QUICKWEBP_TEXT_DOMAIN ), $is_nginx ? '(beta)' : '' ),
87 'value' => 'rewrite'
88 )
89 )
90 ));
91 ?>
92
93 <tr>
94 <th>
95 <label><?php _e( 'Bulk optimization', QUICKWEBP_TEXT_DOMAIN ); ?></label>
96 </th>
97 <td>
98 <?php include QUICKWEBP_PLUGIN_PATH . 'admin/templates/bulk-optimization.php'; ?>
99 </td>
100 </tr>
101
102 </tbody>
103
104 </table>
105
106 <hr>
107
108 <table class="form-table">
109
110 <?php $this->render_component( array(
111 'type' => 'toggle',
112 'name' => 'quickwebp_settings_resize',
113 'label' => __( "Enable/disable image resizing", QUICKWEBP_TEXT_DOMAIN ),
114 'default' => quickwebp_settings_default('quickwebp_settings_resize'),
115 'classes' => 'toggle-with-children',
116 'description' => __( "By default, WordPress limits the maximum width of uploaded images to 2560 pixels.", QUICKWEBP_TEXT_DOMAIN ),
117 )); ?>
118
119 <tbody class="form-table children">
120
121 <?php $this->render_component( array(
122 'type' => 'number',
123 'name' => 'quickwebp_settings_resize_value',
124 'label' => __( 'Max size', QUICKWEBP_TEXT_DOMAIN ),
125 'default' => quickwebp_settings_default('quickwebp_settings_resize_value')
126 )); ?>
127
128 </tbody>
129
130 </table>
131
132 <hr>
133
134 <table class="form-table">
135
136 <?php $this->render_component( array(
137 'type' => 'toggle',
138 'name' => 'quickwebp_settings_completion',
139 'label' => __( "Enable/disable smart media completion for SEO", QUICKWEBP_TEXT_DOMAIN ),
140 'default' => quickwebp_settings_default('quickwebp_settings_completion'),
141 'classes' => 'toggle-with-children',
142 'description' => __( "This feature will automatically complete the media information (title, caption, alt text, description) from the image name.", QUICKWEBP_TEXT_DOMAIN ),
143 )); ?>
144
145 <tbody class="form-table children">
146
147 <?php $this->render_component( array(
148 'type' => 'checkbox',
149 'name' => 'quickwebp_settings_completion_options',
150 'default' => quickwebp_settings_default('quickwebp_settings_completion_options'),
151 'options' => array(
152 array(
153 'label' => __( 'Title completion from image name', QUICKWEBP_TEXT_DOMAIN ),
154 'value' => 'title',
155 ),
156 array(
157 'label' => __( 'Caption completion from image name.', QUICKWEBP_TEXT_DOMAIN ),
158 'value' => 'caption',
159 ),
160 array(
161 'label' => __( 'Alt text completion from image name.', QUICKWEBP_TEXT_DOMAIN ),
162 'value' => 'alt',
163 ),
164 array(
165 'label' => __( 'Description completion from image name.', QUICKWEBP_TEXT_DOMAIN ),
166 'value' => 'description',
167 )
168 )
169 )); ?>
170
171 </tbody>
172
173 </table>
174
175 <hr>
176
177 <table class="form-table">
178
179 <?php $this->render_component( array(
180 'type' => 'toggle',
181 'name' => 'quickwebp_settings_cleanup',
182 'label' => __( "Enable/disable file name cleanup", QUICKWEBP_TEXT_DOMAIN ),
183 'default' => quickwebp_settings_default('quickwebp_settings_cleanup'),
184 'description' => __( "Remove special characters from file names.", QUICKWEBP_TEXT_DOMAIN ),
185 )); ?>
186
187 </table>
188
189 <hr>
190
191 <table class="form-table">
192
193 <?php $this->render_component( array(
194 'type' => 'toggle',
195 'name' => 'quickwebp_settings_paste_image',
196 'label' => __( "Enable/disable paste picture directly (beta)", QUICKWEBP_TEXT_DOMAIN ),
197 'default' => quickwebp_settings_default('quickwebp_settings_paste_image'),
198 'description' => __( "With this feature you can paste directly your picture in WordPress media.", QUICKWEBP_TEXT_DOMAIN ),
199 )); ?>
200
201 </table>
202
203 <hr>
204
205 <table class="form-table">
206
207 <?php $this->render_component( array(
208 'type' => 'select',
209 'options' => array(
210 array(
211 'value' => 'gd',
212 'label' => 'GD'
213 ),
214 array(
215 'value' => 'imagick',
216 'label' => 'Imagick'
217 )
218 ),
219 'name' => 'quickwebp_settings_library',
220 'label' => __( "Library to use", QUICKWEBP_TEXT_DOMAIN ),
221 'default' => quickwebp_settings_default('quickwebp_settings_library'),
222 'description' => __( "We use the GD library as the default option. However, if the GD library is not available, we will use Imagick instead.", QUICKWEBP_TEXT_DOMAIN )
223 )); ?>
224
225 </table>
226
227 <?php submit_button(); ?>
228 </form>