PluginProbe ʕ •ᴥ•ʔ
Smush – Image Optimization, Compression, Lazy Load, WebP & CDN / 3.9.8
Smush – Image Optimization, Compression, Lazy Load, WebP & CDN v3.9.8
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 / modals / onboarding.php
wp-smushit / app / modals Last commit date
checking-files.php 6 years ago directory-list.php 4 years ago onboarding.php 5 years ago progress-dialog.php 4 years ago reset-settings.php 4 years ago restore-images.php 6 years ago updated.php 4 years ago webp-delete-all.php 5 years ago
onboarding.php
178 lines
1 <?php
2 /**
3 * Onboarding modal.
4 *
5 * @since 3.1
6 * @package WP_Smush
7 */
8
9 use Smush\Core\Helper;
10
11 if ( ! defined( 'WPINC' ) ) {
12 die;
13 }
14
15 ?>
16
17 <script type="text/template" id="smush-onboarding" data-type="<?php echo WP_Smush::is_pro() ? 'pro' : 'free'; ?>" data-tracking="<?php echo ! is_multisite() ? 'true' : 'false'; ?>">
18 <div class="sui-box-header sui-flatten sui-content-center sui-spacing-sides--90">
19 <?php if ( ! apply_filters( 'wpmudev_branding_hide_branding', false ) ) : ?>
20 <figure class="sui-box-banner" aria-hidden="true">
21 <img src="<?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/onboarding/graphic-onboarding-' ); ?>{{{ data.slide }}}.png"
22 srcset="<?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/onboarding/graphic-onboarding-' ); ?>{{{ data.slide }}}.png 1x, <?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/onboarding/graphic-onboarding-' ); ?>{{{ data.slide }}}@2x.png 2x"
23 alt="<?php esc_attr_e( 'Smush Onboarding Modal', 'wp-smushit' ); ?>" class="sui-image sui-image-center"
24 >
25 </figure>
26 <?php endif; ?>
27
28 <h3 class="sui-box-title sui-lg" id="smush-title-onboarding-dialog">
29 <# if ( 'start' === data.slide ) { #>
30 <?php
31
32 /* translators: %s: current user name */
33 printf( esc_html__( 'Hey, %s!', 'wp-smushit' ), esc_html( Helper::get_user_name() ) );
34 ?>
35 <# } else if ( 'auto' === data.slide ) { #>
36 <?php esc_html_e( 'Automatic Compression', 'wp-smushit' ); ?>
37 <# } else if ( 'lossy' === data.slide ) { #>
38 <?php esc_html_e( 'Advanced Compression', 'wp-smushit' ); ?>
39 <# } else if ( 'strip_exif' === data.slide ) { #>
40 <?php esc_html_e( 'EXIF Metadata', 'wp-smushit' ); ?>
41 <# } else if ( 'original' === data.slide ) { #>
42 <?php esc_html_e( 'Full Size Images', 'wp-smushit' ); ?>
43 <# } else if ( 'lazy_load' === data.slide ) { #>
44 <?php esc_html_e( 'Lazy Load', 'wp-smushit' ); ?>
45 <# } else if ( 'usage' === data.slide ) { #>
46 <?php esc_html_e( 'Usage Data', 'wp-smushit' ); ?>
47 <# } #>
48 </h3>
49
50 <p class="sui-description" id="smush-description-onboarding-dialog">
51 <# if ( 'start' === data.slide ) { #>
52 <?php esc_html_e( 'Nice work installing Smush! Let’s get started by choosing how you want this plugin to work, and then let Smush do all the heavy lifting for you.', 'wp-smushit' ); ?>
53 <# } else if ( 'auto' === data.slide ) { #>
54 <?php esc_html_e( 'When you upload images to your site, Smush can automatically optimize and compress them for you saving you having to do this manually.', 'wp-smushit' ); ?>
55 <# } else if ( 'lossy' === data.slide ) { #>
56 <?php esc_html_e( 'Optimize images up to 2x more than regular smush with our multi-pass lossy compression.', 'wp-smushit' ); ?>
57 <# } else if ( 'strip_exif' === data.slide ) { #>
58 <?php esc_html_e( 'Photos often store camera settings in the file, i.e., focal length, date, time and location. Removing EXIF data reduces the file size. Note: it does not strip SEO metadata.', 'wp-smushit' ); ?>
59 <# } else if ( 'original' === data.slide ) { #>
60 <?php esc_html_e( 'You can also have Smush compress your original images - this is helpful if your theme serves full size images.', 'wp-smushit' ); ?>
61 <# } else if ( 'lazy_load' === data.slide ) { #>
62 <?php esc_html_e( 'This feature stops offscreen images from loading until a visitor scrolls to them. Make your page load faster, use less bandwidth and fix the “defer offscreen images” recommendation from a Google PageSpeed test.', 'wp-smushit' ); ?>
63 <# } else if ( 'usage' === data.slide ) { #>
64 <?php esc_html_e( 'Help us improve Smush by letting our product designers gain insight into what features need improvement. We don’t track any personalized data, it’s all basic stuff.', 'wp-smushit' ); ?>
65 <# } #>
66 </p>
67
68 </div>
69
70 <div class="sui-box-body sui-content-center sui-spacing-sides--0">
71 <# if ( 'start' === data.slide ) { #>
72 <a class="sui-button sui-button-blue sui-button-icon-right next" onclick="WP_Smush.onboarding.next(this)">
73 <?php esc_html_e( 'Begin setup', 'wp-smushit' ); ?>
74 <i class="sui-icon-chevron-right" aria-hidden="true"> </i>
75 </a>
76 <# } else { #>
77 <div class="sui-box-selectors">
78 <label for="{{{ data.slide }}}" class="sui-toggle">
79 <input type="checkbox" id="{{{ data.slide }}}" aria-labelledby="{{{ data.slide }}}-label" <# if ( data.value ) { #>checked<# } #>>
80 <span class="sui-toggle-slider" aria-hidden="true"> </span>
81 <span id="{{{ data.slide }}}-label" class="sui-toggle-label">
82 <# if ( 'auto' === data.slide ) { #>
83 <?php esc_html_e( 'Automatically optimize new uploads', 'wp-smushit' ); ?>
84 <# } else if ( 'lossy' === data.slide ) { #>
85 <?php esc_html_e( 'Enable enhanced multi-pass lossy compression', 'wp-smushit' ); ?>
86 <# } else if ( 'strip_exif' === data.slide ) { #>
87 <?php esc_html_e( 'Strip my image metadata', 'wp-smushit' ); ?>
88 <# } else if ( 'original' === data.slide ) { #>
89 <?php esc_html_e( 'Compress my full size images', 'wp-smushit' ); ?>
90 <# } else if ( 'lazy_load' === data.slide ) { #>
91 <?php esc_html_e( 'Enable Lazy Loading', 'wp-smushit' ); ?>
92 <# } else if ( 'usage' === data.slide ) { #>
93 <?php esc_html_e( 'Allow usage data tracking', 'wp-smushit' ); ?>
94 <# } #>
95 </span>
96 </label>
97 </div>
98 <# } #>
99
100 <# if ( 'original' === data.slide ) { #>
101 <p class="sui-description" style="padding: 0 90px">
102 <?php esc_html_e( 'Note: By default we will store a copy of your original uploads just in case you want to revert in the future - you can turn this off at any time.', 'wp-smushit' ); ?>
103 </p>
104 <# } else if ( data.last ) { #>
105 <button type="submit" class="sui-button sui-button-blue sui-button-icon-left" data-modal-close="">
106 <i class="sui-icon-check" aria-hidden="true"> </i>
107 <?php esc_html_e( 'Finish setup wizard', 'wp-smushit' ); ?>
108 </button>
109 <# } #>
110
111 <# if ( 'start' !== data.slide && ! data.last ) { #>
112 <a class="sui-button sui-button-gray next" onclick="WP_Smush.onboarding.next(this)">
113 <?php esc_html_e( 'Next', 'wp-smushit' ); ?>
114 </a>
115 <# } #>
116
117 <div class="smush-onboarding-arrows">
118 <a href="#" class="previous <# if ( data.first ) { #>sui-hidden<# } #>" onclick="WP_Smush.onboarding.next(this)">
119 <i class="sui-icon-chevron-left" aria-hidden="true"> </i>
120 </a>
121 <a href="#" class="next <# if ( data.last ) { #>sui-hidden<# } #>" onclick="WP_Smush.onboarding.next(this)">
122 <i class="sui-icon-chevron-right" aria-hidden="true"> </i>
123 </a>
124 </div>
125 </div>
126
127 <div class="sui-box-footer sui-flatten sui-content-center">
128 <div class="sui-box-steps sui-sm">
129 <button onclick="WP_Smush.onboarding.goTo('start')" class="<# if ( 'start' === data.slide ) { #>sui-current<# } #>" <# if ( 'start' === data.slide ) { #>disabled<# } #>>
130 <?php esc_html_e( 'First step', 'wp-smushit' ); ?>
131 </button>
132 <button onclick="WP_Smush.onboarding.goTo('auto')" class="<# if ( 'auto' === data.slide ) { #>sui-current<# } #>" <# if ( 'auto' === data.slide ) { #>disabled<# } #>>
133 <?php esc_html_e( 'Automatic Compression', 'wp-smushit' ); ?>
134 </button>
135 <?php if ( WP_Smush::is_pro() ) : ?>
136 <button onclick="WP_Smush.onboarding.goTo('lossy')" class="<# if ( 'lossy' === data.slide ) { #>sui-current<# } #>" <# if ( 'lossy' === data.slide ) { #>disabled<# } #>>
137 <?php esc_html_e( 'Advanced Compression', 'wp-smushit' ); ?>
138 </button>
139 <?php endif; ?>
140 <button onclick="WP_Smush.onboarding.goTo('strip_exif')" class="<# if ( 'strip_exif' === data.slide ) { #>sui-current<# } #>" <# if ( 'strip_exif' === data.slide ) { #>disabled<# } #>>
141 <?php esc_html_e( 'EXIF Metadata', 'wp-smushit' ); ?>
142 </button>
143 <?php if ( WP_Smush::is_pro() ) : ?>
144 <button onclick="WP_Smush.onboarding.goTo('original')" class="<# if ( 'original' === data.slide ) { #>sui-current<# } #>" <# if ( 'original' === data.slide ) { #>disabled<# } #>>
145 <?php esc_html_e( 'Full Size Images', 'wp-smushit' ); ?>
146 </button>
147 <?php endif; ?>
148 <button onclick="WP_Smush.onboarding.goTo('lazy_load')" class="<# if ( 'lazy_load' === data.slide ) { #>sui-current<# } #>" <# if ( 'lazy_load' === data.slide ) { #>disabled<# } #>>
149 <?php esc_html_e( 'Lazy Load', 'wp-smushit' ); ?>
150 </button>
151 <?php if ( ! is_multisite() ) : ?>
152 <button onclick="WP_Smush.onboarding.goTo('usage')" class="<# if ( 'usage' === data.slide ) { #>sui-current<# } #>" <# if ( 'usage' === data.slide ) { #>disabled<# } #>>
153 <?php esc_html_e( 'Usage Data', 'wp-smushit' ); ?>
154 </button>
155 <?php endif; ?>
156 </div>
157 </div>
158 </script>
159
160 <div class="sui-modal sui-modal-md">
161 <div
162 role="dialog"
163 id="smush-onboarding-dialog"
164 class="sui-modal-content smush-onboarding-dialog"
165 aria-modal="true"
166 aria-labelledby="smush-title-onboarding-dialog"
167 aria-describedby="smush-description-onboarding-dialog"
168 >
169 <div class="sui-box">
170 <div id="smush-onboarding-content" aria-live="polite"></div>
171 <input type="hidden" id="smush_quick_setup_nonce" name="_wpnonce" value="<?php echo wp_create_nonce( 'smush_quick_setup' ); ?>">
172 </div>
173 <button class="sui-modal-skip smush-onboarding-skip-link">
174 <?php esc_html_e( 'Skip this, I’ll set it up later', 'wp-smushit' ); ?>
175 </button>
176 </div>
177 </div>
178