PluginProbe ʕ •ᴥ•ʔ
Hustle – Email Marketing, Lead Generation, Optins, Popups / 7.4.6
Hustle – Email Marketing, Lead Generation, Optins, Popups v7.4.6
7.8.13 7.8.13.1 trunk 3.0 3.1 3.1.1 3.1.2 3.1.3 3.1.4 4.3.2 4.4.4 4.4.5 4.4.5.1 4.4.5.4 4.6 4.6.1.1 4.6.1.4 4.7.0.2 4.7.0.3 4.7.0.7 4.7.0.9 4.7.1.0 4.7.1.1 4.8.0.0 5.0.0 5.0.1 5.0.1.1 5.0.1.2 5.1 5.1.1 5.1.2 5.1.3 5.1.3.1 5.1.3.2 5.1.4 5.1.5 6.0 6.0.1 6.0.2 6.0.3 6.0.4.2 6.0.5 6.0.6.1 6.0.7 6.0.8.1 6.0.9 7.0.0.1 7.0.2 7.0.3 7.0.4 7.1.0 7.1.1 7.2.0 7.2.1 7.3.0 7.3.1 7.3.3 7.3.5 7.3.6 7.3.7 7.4.0 7.4.1 7.4.11 7.4.13 7.4.13.1 7.4.2 7.4.3 7.4.4 7.4.5 7.4.5.1 7.4.5.2 7.4.6 7.4.7 7.5.0 7.6.0 7.6.1 7.6.3 7.6.4 7.6.6 7.7.0 7.7.1 7.8.0 7.8.1 7.8.10 7.8.10.1 7.8.10.2 7.8.11 7.8.12 7.8.12.1 7.8.2 7.8.3 7.8.4 7.8.5 7.8.6 7.8.7 7.8.8 7.8.9 7.8.9.1 7.8.9.2 7.8.9.3
wordpress-popup / views / admin / dashboard / dialogs / migrate-data.php
wordpress-popup / views / admin / dashboard / dialogs Last commit date
fresh-install.php 5 years ago migrate-data.php 5 years ago release-highlight.php 4 years ago review-conditions.php 5 years ago
migrate-data.php
292 lines
1 <?php
2 /**
3 * Dialog for migrating tracking from 3.x to 4.x.
4 *
5 * @package Hustle
6 * @since 4.0.0
7 */
8
9 $slide_one_1x = self::$plugin_url . 'assets/images/onboard-welcome.png';
10 $slide_one_2x = self::$plugin_url . 'assets/images/onboard-welcome@2x.png';
11
12 $slide_two_1x = self::$plugin_url . 'assets/images/onboard-migrate.png';
13 $slide_two_2x = self::$plugin_url . 'assets/images/onboard-migrate@2x.png';
14
15 $slide_three_1x = self::$plugin_url . 'assets/images/onboard-create.png';
16 $slide_three_2x = self::$plugin_url . 'assets/images/onboard-create@2x.png';
17
18 $is_first_time_opening = empty( filter_input( INPUT_GET, 'show-migrate', FILTER_VALIDATE_BOOLEAN ) );
19 $support_link = Opt_In_Utils::get_link( 'support' );
20
21 $user = wp_get_current_user();
22 $username = ! empty( $user->user_firstname ) ? $user->user_firstname : $user->user_login;
23 ?>
24
25 <div class="sui-modal sui-modal-md">
26
27 <div
28 role="dialog"
29 id="hustle-dialog--migrate"
30 class="sui-modal-content"
31 aria-modal="true"
32 aria-label="<?php esc_html_e( 'Modal for migrating your existing tracking data to the latest Hustle version.', 'hustle' ); ?>"
33 aria-live="polite"
34 data-nonce="<?php echo esc_attr( wp_create_nonce( 'hustle_dismiss_notification' ) ); ?>"
35 data-is-first="<?php echo $is_first_time_opening ? '1' : '0'; ?>"
36 >
37
38 <?php // SLIDE 1: Welcome. ?>
39 <div id="hustle-dialog--migrate-slide-1" class="sui-modal-slide">
40
41 <div class="sui-box" role="document">
42
43 <div class="sui-box-header sui-flatten sui-content-center sui-spacing-top--60">
44
45 <?php if ( ! $this->is_branding_hidden ) : ?>
46 <figure class="sui-box-banner" role="banner" aria-hidden="true">
47 <?php echo $this->render_image_markup( $slide_one_1x, $slide_one_2x, 'sui-image sui-image-center' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
48 </figure>
49 <?php endif; ?>
50
51 <h3 class="sui-box-title sui-lg">
52 <?php /* translators: username. */ ?>
53 <?php printf( esc_html__( 'Hey, %s', 'hustle' ), esc_html( $username ) ); ?>
54 </h3>
55
56 <p class="sui-description"><?php esc_html_e( "Welcome to Hustle, the only plugin you'll ever need to turn your visitors into loyal subscribers, leads and customers.", 'hustle' ); ?></p>
57
58 </div>
59
60 <div class="sui-box-body sui-content-center sui-spacing-bottom--60">
61
62 <button
63 id="hustle-migrate-get-started"
64 class="sui-button sui-button-blue sui-button-icon-right"
65 data-modal-slide="hustle-dialog--migrate-slide-2"
66 data-modal-slide-focus="hustle-migrate-start"
67 data-modal-slide-intro="next"
68 >
69 <?php esc_html_e( 'Get Started', 'hustle' ); ?>
70 <span class="sui-icon-chevron-right" aria-hidden="true"></span>
71 </button>
72
73 </div>
74
75 </div>
76
77 </div>
78
79 <?php // SLIDE 2: Migrate. ?>
80 <div id="hustle-dialog--migrate-slide-2" class="sui-modal-slide">
81
82 <div class="sui-box" role="document">
83
84 <div class="sui-box-header sui-flatten sui-content-center sui-spacing-top--60">
85
86 <figure class="sui-box-banner" role="banner" aria-hidden="true">
87 <?php echo $this->render_image_markup( $slide_two_1x, $slide_two_2x, 'sui-image sui-image-center' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
88 </figure>
89
90 <h3
91 id="hustle-dialog--migrate-slide-2-title"
92 class="sui-box-title sui-lg"
93 data-done-text="<?php esc_html_e( 'Migration complete', 'hustle' ); ?>"
94 >
95 <?php esc_html_e( 'Migrate Data', 'hustle' ); ?>
96 </h3>
97
98 <p
99 id="hustle-dialog--migrate-slide-2-description"
100 class="sui-description"
101 style="margin-bottom: 0;"
102 data-default-text="<?php esc_html_e( 'Nice work on updating the Hustle! All your modules are already in place. However, you need to migrate the data of your existing modules such as tracking data and email list manually.', 'hustle' ); ?>"
103 data-migrate-text="<?php esc_html_e( 'Data migration is in progress. It can take anywhere from a few seconds to a couple of hours depending upon the data of your existing modules and traffic on your site.', 'hustle' ); ?>"
104 data-done-text="<?php esc_html_e( "We've successfully migrated your existing data. You're good to continue using Hustle!", 'hustle' ); ?>"
105 >
106 <?php esc_html_e( 'Nice work on updating the Hustle! All your modules are already in place. However, you need to migrate the data of your existing modules such as tracking data and email list manually.', 'hustle' ); ?>
107 </p>
108
109 </div>
110
111
112 <div class="sui-box-body sui-content-center sui-spacing-bottom--60" data-migrate-start>
113
114 <button
115 id="hustle-migrate-start"
116 class="sui-button sui-button-icon-right"
117 data-nonce="<?php echo esc_attr( wp_create_nonce( 'hustle-migrate-tracking-and-subscriptions' ) ); ?>"
118 >
119 <span class="sui-loading-text">
120 <?php esc_html_e( 'Begin Migration', 'hustle' ); ?>
121 <span class="sui-icon-chevron-right" aria-hidden="true"></span>
122 </span>
123 <span class="sui-icon-loader sui-loading" aria-hidden="true"></span>
124 </button>
125
126 </div>
127
128 <div class="sui-box-body sui-content-center sui-spacing-bottom--60" style="display:none;" aria-hidden="true" hidden data-migrate-progress>
129
130 <div class="sui-progress-block">
131
132 <div class="sui-progress">
133
134 <span class="sui-progress-icon" aria-hidden="true">
135 <span class="sui-icon-loader sui-loading" aria-hidden="true"></span>
136 </span>
137
138 <span class="sui-progress-text">
139 <span>0%</span>
140 </span>
141
142 <div class="sui-progress-bar" aria-hidden="true">
143 <span style="width: 0%"></span>
144 </div>
145
146 </div>
147
148 </div>
149
150 <div class="sui-progress-state">
151 <?php /* translators: html tags. */ ?>
152 <span><?php printf( esc_html__( 'Rows migrated: %1$s%3$s/%2$s%3$s' ), '<span id="hustle-partial-rows" style="display: inline;">', '<span id="hustle-total-rows" style="display: inline;">', '</span>' ); ?></span>
153 </div>
154
155 </div>
156
157 <div class="sui-box-body sui-content-center" style="display:none;" aria-hidden="true" hidden data-migrate-failed>
158
159 <?php
160 $notice_options = array(
161 array(
162 'type' => 'inline_notice',
163 'id' => 'hustle-dialog--migrate-error-notice',
164 'value' => '',
165 'attributes' => array(
166 /* translators: 1. opening 'a' tag to support link, 2. closing 'a' tag */
167 'data-message' => sprintf( esc_html__( 'There was an error while migrating your data. Please retry again or contact our %1$ssupport%2$s team for help.', 'hustle' ), '<a href="' . esc_url( $support_link ) . '" target="_blank">', '</a>' ),
168 ),
169 ),
170 );
171 $this->get_html_for_options( $notice_options );
172 ?>
173
174 <button
175 id="hustle-migrate-start"
176 class="sui-button sui-button-icon-right"
177 data-nonce="<?php echo esc_attr( wp_create_nonce( 'hustle-migrate-tracking-and-subscriptions' ) ); ?>"
178 >
179 <span class="sui-loading-text">
180 <?php esc_html_e( 'Retry Migration', 'hustle' ); ?>
181 </span>
182 <span class="sui-icon-loader sui-loading" aria-hidden="true"></span>
183 </button>
184
185 <span class="sui-description" style="margin: 10px 0 0;"><?php esc_html_e( 'The migration will continue from where it failed in the last attempt.', 'hustle' ); ?></span>
186
187 </div>
188
189 <div class="sui-box-body sui-content-center sui-spacing-bottom--60" style="display:none;" aria-hidden="true" hidden data-migrate-done>
190
191 <button
192 class="sui-button"
193 data-modal-slide="hustle-dialog--migrate-slide-3"
194 data-modal-slide-focus="hustle-new-popup"
195 data-modal-slide-intro="next"
196 >
197 <?php esc_html_e( 'Continue', 'hustle' ); ?>
198 </button>
199
200 </div>
201
202 </div>
203
204 <button class="sui-modal-skip hustle-dialog-migrate-skip" data-modal-close><?php esc_html_e( "Skip this, I'll migrate data later", 'hustle' ); ?></button>
205
206 </div>
207
208 <?php // SLIDE 3: Create. ?>
209 <div id="hustle-dialog--migrate-slide-3" class="sui-modal-slide">
210
211 <div class="sui-box" role="document">
212
213 <div class="sui-box-header sui-flatten sui-content-center sui-spacing-top--60">
214
215 <button class="sui-button-icon sui-button-float--right" data-modal-close>
216 <span class="sui-icon-close sui-md" aria-hidden="true"></span>
217 <span class="sui-screen-reader-text"><?php esc_html_e( 'Close this modal', 'hustle' ); ?></span>
218 </button>
219
220 <figure class="sui-box-banner" role="banner" aria-hidden="true">
221 <?php echo $this->render_image_markup( $slide_three_1x, $slide_three_2x, 'sui-image sui-image-center' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
222 </figure>
223
224 <h3 class="sui-box-title sui-lg"><?php esc_html_e( 'Create Module', 'hustle' ); ?></h3>
225
226 <span id="dialogDescription" class="sui-description"><?php esc_html_e( 'Choose a module to get started on converting your visitors into subscribers, generate more leads and grow your social following.', 'hustle' ); ?></span>
227
228 </div>
229
230 <div class="sui-box-selectors sui-box-selectors-col-2">
231
232 <ul>
233
234 <li><label for="hustle-new-popup" class="sui-box-selector">
235 <input type="radio" name="hustle-create-new" id="hustle-new-popup" value="<?php echo esc_attr( Hustle_Module_Model::POPUP_MODULE ); ?>" />
236 <span>
237 <span class="sui-icon-popup" aria-hidden="true"></span>
238 <?php esc_html_e( 'Pop-up', 'hustle' ); ?>
239 </span>
240 </label></li>
241
242 <li><label for="hustle-new-slidein" class="sui-box-selector">
243 <input type="radio" name="hustle-create-new" id="hustle-new-slidein" value="<?php echo esc_attr( Hustle_Module_Model::SLIDEIN_MODULE ); ?>" />
244 <span>
245 <span class="sui-icon-slide-in" aria-hidden="true"></span>
246 <?php esc_html_e( 'Slide-in', 'hustle' ); ?>
247 </span>
248 </label></li>
249
250 <li><label for="hustle-new-embed" class="sui-box-selector">
251 <input type="radio" name="hustle-create-new" id="hustle-new-embed" value="<?php echo esc_attr( Hustle_Module_Model::EMBEDDED_MODULE ); ?>" />
252 <span>
253 <span class="sui-icon-embed" aria-hidden="true"></span>
254 <?php esc_html_e( 'Embed', 'hustle' ); ?>
255 </span>
256 </label></li>
257
258 <li><label for="hustle-new-sshare" class="sui-box-selector">
259 <input type="radio" name="hustle-create-new" id="hustle-new-sshare" value="<?php echo esc_attr( Hustle_Module_Model::SOCIAL_SHARING_MODULE ); ?>" />
260 <span>
261 <span class="sui-icon-share" aria-hidden="true"></span>
262 <?php esc_html_e( 'Social Share', 'hustle' ); ?>
263 </span>
264 </label></li>
265
266 </ul>
267
268 </div>
269
270 <div class="sui-box-body sui-content-center sui-spacing-bottom--60 sui-spacing-top--0">
271
272 <button
273 id="hustle-create-new-module"
274 class="sui-button sui-button-blue sui-button-icon-right"
275 disabled="disabled"
276 >
277 <span class="sui-loading-text"><?php esc_html_e( 'Create', 'hustle' ); ?></span>
278 <span class="sui-icon-loader sui-loading" aria-hidden="true"></span>
279 </button>
280
281 </div>
282
283 </div>
284
285 <button class="sui-modal-skip" data-modal-close><?php esc_html_e( "Skip this, I'll create a module later", 'hustle' ); ?></button>
286
287 </div>
288
289 </div>
290
291 </div>
292