PluginProbe ʕ •ᴥ•ʔ
Smush – Image Optimization, Compression, Lazy Load, WebP & CDN / 1.6.0
Smush – Image Optimization, Compression, Lazy Load, WebP & CDN v1.6.0
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 / settings.php
wp-smushit Last commit date
JSON 17 years ago bulk.php 14 years ago license.txt 17 years ago readme.txt 13 years ago screenshot-1.jpg 17 years ago settings.php 13 years ago wp-smushit.php 14 years ago
settings.php
51 lines
1 <?php
2
3 /*
4
5 Each service has a setting specifying whether it should be used automatically on upload.
6
7 Values are:
8 -1 Don't use (until manually enabled via Media > Settings)
9 0 Use automatically
10 n Any other number is a Unix timestamp indicating when the service can be used again
11
12 */
13
14 define('WP_SMUSHIT_AUTO_OK', 0);
15 define('WP_SMUSHIT_AUTO_NEVER', -1);
16
17
18 function wp_smushit_register_settings() {
19 add_settings_section( 'wp_smushit_settings', 'WP Smush.it', 'wp_smushit_settings_cb', 'media' );
20 add_settings_field( 'wp_smushit_smushit_auto', 'Use Smush.it on upload?', 'wp_smushit_render_auto_opts', 'media', 'wp_smushit_settings' );
21 add_settings_field( 'wp_smushit_smushit_timeout', 'How many seconds should we wait for a response from Smush.it?', 'wp_smushit_render_timeout_opts', 'media', 'wp_smushit_settings' );
22 register_setting( 'media', 'wp_smushit_smushit_auto');
23 }
24 add_action('admin_init', 'wp_smushit_register_settings');
25
26 function wp_smushit_settings_cb() {
27 }
28
29 function wp_smushit_render_auto_opts() {
30 $key = 'wp_smushit_smushit_auto';
31 $val = intval( get_option( $key, WP_SMUSHIT_AUTO_OK ) );
32 printf( "<select name='%1\$s' id='%1\$s'>", esc_attr( $key ) );
33 echo '<option value=' . WP_SMUSHIT_AUTO_OK . ' ' . selected( WP_SMUSHIT_AUTO_OK, $val ) . '>Automatically process on upload</option>';
34 echo '<option value=' . WP_SMUSHIT_AUTO_NEVER . ' ' . selected( WP_SMUSHIT_AUTO_NEVER, $val ) . '>Do not process on upload</option>';
35
36 if ( $val > 0 ) {
37 printf( '<option value="%d" selected="selected">Temporarily disabled until %s</option>', $val, date( 'M j, Y \a\t H:i', $val ) );
38 }
39 echo '</select>';
40 }
41
42 function wp_smushit_render_timeout_opts( $key ) {
43 $key = 'wp_smushit_smushit_timeout';
44 $val = intval( get_option( $key, WP_SMUSHIT_AUTO_OK ) );
45 printf( "<input type='text' name='%1\$s' id='%1\$s'>", esc_attr( $key ), intval( get_option( $key, 60 ) ) );
46 }
47
48 // default is 6hrs
49 function wp_smushit_temporarily_disable( $seconds = 21600) {
50 update_option( 'wp_smushit_smushit_auto', time() + $seconds );
51 }