PluginProbe
QuickWebP – WebP & AVIF Image Optimizer, Compression & SEO for WordPress / 3.2.2
QuickWebP – WebP & AVIF Image Optimizer, Compression & SEO for WordPress v3.2.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.2.2, at admin/templates/page-settings.php

261 lines 10.6 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 <?php $this->render_component( array(
59 'type' => 'checkbox',
60 'name' => 'quickwebp_settings_conversion_save_original',
61 'label' => __( "Save original images", QUICKWEBP_TEXT_DOMAIN ),
62 'default' => quickwebp_settings_default('quickwebp_settings_conversion_save_original'),
63 'options' => array(
64 array(
65 'label' => '',
66 'value' => 'checked'
67 )
68 )
69 )); ?>
70
71 <tr>
72 <th>
73 <label><?php _e( 'Before saving, test your configuration with preview mode.', QUICKWEBP_TEXT_DOMAIN ); ?></label>
74 </th>
75 <td>
76 <?php include QUICKWEBP_PLUGIN_PATH . 'admin/templates/popup-settings-preview.php'; ?>
77 </td>
78 </tr>
79
80 <?php
81 $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) : '';
82
83 $this->render_component( array(
84 'type' => 'radio',
85 'name' => 'quickwebp_settings_conversion_display_webp_mode',
86 'label' => __( "Display images in WebP format on the site", QUICKWEBP_TEXT_DOMAIN ),
87 '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 ),
88 'default' => quickwebp_settings_default('quickwebp_settings_conversion_display_webp_mode'),
89 'options' => array(
90 array(
91 'label' => __( 'Deactivate', QUICKWEBP_TEXT_DOMAIN ),
92 'value' => 'disabled'
93 ),
94 array(
95 'label' => __( 'Use <picture> tags', QUICKWEBP_TEXT_DOMAIN ),
96 'value' => 'picture'
97 ),
98 array(
99 'label' => sprintf( __( 'Use rewrite rules %s', QUICKWEBP_TEXT_DOMAIN ), $is_nginx ? '(beta)' : '' ),
100 'value' => 'rewrite'
101 )
102 )
103 ));
104 ?>
105
106 <tr>
107 <th>
108 <label><?php _e( 'Bulk optimization', QUICKWEBP_TEXT_DOMAIN ); ?></label>
109 </th>
110 <td>
111 <?php include QUICKWEBP_PLUGIN_PATH . 'admin/templates/bulk-optimization.php'; ?>
112 </td>
113 </tr>
114
115 </tbody>
116
117 </table>
118
119 <hr>
120
121 <table class="form-table">
122
123 <?php $this->render_component( array(
124 'type' => 'toggle',
125 'name' => 'quickwebp_settings_resize',
126 'label' => __( "Enable/disable image resizing", QUICKWEBP_TEXT_DOMAIN ),
127 'default' => quickwebp_settings_default('quickwebp_settings_resize'),
128 'classes' => 'toggle-with-children',
129 'description' => __( "By default, WordPress limits the maximum width of uploaded images to 2560 pixels.", QUICKWEBP_TEXT_DOMAIN ),
130 )); ?>
131
132 <tbody class="form-table children">
133
134 <?php $this->render_component( array(
135 'type' => 'number',
136 'name' => 'quickwebp_settings_resize_value',
137 'label' => __( 'Max size', QUICKWEBP_TEXT_DOMAIN ),
138 'default' => quickwebp_settings_default('quickwebp_settings_resize_value')
139 )); ?>
140
141 </tbody>
142
143 </table>
144
145 <hr>
146
147 <table class="form-table">
148
149 <?php $this->render_component( array(
150 'type' => 'toggle',
151 'name' => 'quickwebp_settings_completion',
152 'label' => __( "Enable/disable smart media completion for SEO", QUICKWEBP_TEXT_DOMAIN ),
153 'default' => quickwebp_settings_default('quickwebp_settings_completion'),
154 'classes' => 'toggle-with-children',
155 'description' => __( "This feature will automatically complete the media information (title, caption, alt text, description) from the image name.", QUICKWEBP_TEXT_DOMAIN ),
156 )); ?>
157
158 <tbody class="form-table children">
159
160 <?php $this->render_component( array(
161 'type' => 'checkbox',
162 'name' => 'quickwebp_settings_completion_options',
163 'default' => quickwebp_settings_default('quickwebp_settings_completion_options'),
164 'options' => array(
165 array(
166 'label' => __( 'Title completion from image name', QUICKWEBP_TEXT_DOMAIN ),
167 'value' => 'title',
168 ),
169 array(
170 'label' => __( 'Caption completion from image name.', QUICKWEBP_TEXT_DOMAIN ),
171 'value' => 'caption',
172 ),
173 array(
174 'label' => __( 'Alt text completion from image name.', QUICKWEBP_TEXT_DOMAIN ),
175 'value' => 'alt',
176 ),
177 array(
178 'label' => __( 'Description completion from image name.', QUICKWEBP_TEXT_DOMAIN ),
179 'value' => 'description',
180 )
181 )
182 )); ?>
183
184 </tbody>
185
186 </table>
187
188 <hr>
189
190 <table class="form-table">
191
192 <?php $this->render_component( array(
193 'type' => 'toggle',
194 'name' => 'quickwebp_settings_cleanup',
195 'label' => __( "Enable/disable file name cleanup", QUICKWEBP_TEXT_DOMAIN ),
196 'default' => quickwebp_settings_default('quickwebp_settings_cleanup'),
197 'description' => __( "Remove special characters from file names.", QUICKWEBP_TEXT_DOMAIN ),
198 )); ?>
199
200 </table>
201
202 <hr>
203
204 <table class="form-table">
205
206 <?php $this->render_component( array(
207 'type' => 'toggle',
208 'name' => 'quickwebp_settings_paste_image',
209 'label' => __( "Enable/disable paste picture directly (beta)", QUICKWEBP_TEXT_DOMAIN ),
210 'default' => quickwebp_settings_default('quickwebp_settings_paste_image'),
211 'description' => __( "With this feature you can paste directly your picture in WordPress media.", QUICKWEBP_TEXT_DOMAIN ),
212 )); ?>
213
214 </table>
215
216 <hr>
217
218 <table class="form-table">
219
220 <?php $this->render_component( array(
221 'type' => 'select',
222 'options' => array(
223 array(
224 'value' => 'gd',
225 'label' => 'GD'
226 ),
227 array(
228 'value' => 'imagick',
229 'label' => 'Imagick'
230 )
231 ),
232 'name' => 'quickwebp_settings_library',
233 'label' => __( "Library to use", QUICKWEBP_TEXT_DOMAIN ),
234 'default' => quickwebp_settings_default('quickwebp_settings_library'),
235 '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 )
236 )); ?>
237
238 </table>
239
240 <hr>
241
242 <h2>
243 <?php _e( "Credits", QUICKWEBP_TEXT_DOMAIN ); ?>
244 </h2>
245 <p>
246 <?php _e( "This plugin is developed by", QUICKWEBP_TEXT_DOMAIN ); ?>
247 <a href="https://webdeclic.com/" target="_blank">Webdeclic</a>.
248 <?php _e( "You can support this project here:", QUICKWEBP_TEXT_DOMAIN ); ?>
249 </p>
250 <p>
251 <a class="buymeacoffee" href="https://www.buymeacoffee.com/ludwig" target="_blank"><img style="height: 60px;" src="<?php echo esc_url( QUICKWEBP_PLUGIN_URL . 'public/assets/img/buy-me-a-coffee.webp' ); ?>" alt="Buy Me A Coffee"></a>
252 </p>
253 <p>
254 <?php _e( "You can show all Webdeclic's plugins on ", QUICKWEBP_TEXT_DOMAIN ); ?>
255 <a href="https://wordpress.org/plugins/search/webdeclic/" target="_blank"><?php _e( "wordpress.org", QUICKWEBP_TEXT_DOMAIN ); ?></a>.
256 </p>
257
258 <hr>
259
260 <?php submit_button(); ?>
261 </form>