PluginProbe ʕ •ᴥ•ʔ
Starter Templates – AI-Powered Templates for Elementor & Gutenberg / 3.0.22
Starter Templates – AI-Powered Templates for Elementor & Gutenberg v3.0.22
4.6.1 4.6.0 4.5.4 4.5.3 2.3.6 2.3.7 2.3.8 2.3.9 2.4.0 2.5.0 2.5.1 2.6.0 2.6.1 2.6.10 2.6.11 2.6.12 2.6.13 2.6.14 2.6.15 2.6.16 2.6.17 2.6.18 2.6.19 2.6.2 2.6.20 2.6.21 2.6.22 2.6.3 2.6.4 2.6.5 2.6.6 2.6.7 2.6.8 2.6.9 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 3.0.0 3.0.1 3.0.10 3.0.11 3.0.12 3.0.13 3.0.14 3.0.15 3.0.16 3.0.17 3.0.18 3.0.19 3.0.2 3.0.20 3.0.21 3.0.22 3.0.23 3.0.24 3.0.25 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.10 3.1.11 3.1.12 3.1.13 3.1.14 3.1.15 3.1.16 3.1.17 3.1.18 3.1.19 3.1.2 3.1.20 3.1.21 3.1.22 3.1.23 3.1.24 3.1.25 3.1.26 3.1.27 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.3.0 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.6 3.5.0 3.5.1 3.5.2 3.5.3 3.5.4 3.5.5 3.5.6 3.5.7 4.0.0 4.0.1 4.0.10 4.0.11 4.0.12 4.0.13 4.0.2 4.0.3 4.0.4 4.0.5 4.0.6 4.0.7 4.0.8 4.0.9 4.1.0 4.1.1 4.1.2 4.1.3 4.1.4 4.1.5 4.1.6 4.1.7 4.2.0 4.2.1 4.2.2 4.2.3 4.2.4 4.2.5 4.2.6 4.3.0 4.3.1 4.3.2 4.3.3 4.3.4 4.3.5 4.3.6 4.3.7 4.3.8 4.3.9 4.4.0 4.4.1 4.4.10 4.4.11 4.4.12 4.4.13 4.4.14 4.4.16 4.4.17 4.4.18 4.4.19 4.4.2 4.4.20 4.4.21 4.4.22 4.4.23 4.4.24 trunk 4.4.25 0.4.4.0 4.4.26 0.4.4.15 4.4.27 1.0.0 4.4.28 1.0.1 4.4.29 1.0.10 4.4.3 1.0.11 4.4.30 1.0.12 4.4.31 1.0.13 4.4.32 1.0.14 4.4.33 1.0.2 4.4.34 1.0.3 4.4.35 1.0.4 4.4.36 1.0.5 4.4.37 1.0.6 4.4.38 1.0.7 4.4.39 1.0.8 4.4.4 1.0.9 4.4.40 1.1.0 4.4.41 1.1.1 4.4.42 1.1.2 4.4.43 1.1.3 4.4.44 1.1.4 4.4.45 1.1.5 4.4.46 1.1.6 4.4.47 1.1.7 4.4.48 1.1.8 4.4.49 1.1.9 4.4.5 1.2.0 4.4.50 1.2.1 4.4.51 1.2.10 4.4.52 1.2.11 4.4.6 1.2.12 4.4.7 1.2.13 4.4.8 1.2.14 4.4.9 1.2.15 4.5.0 1.2.2 4.5.1 1.2.3 4.5.2 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.10 1.3.11 1.3.13 1.3.14 1.3.15 1.3.16 1.3.17 1.3.18 1.3.19 1.3.2 1.3.20 1.3.21 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 2.0.0 2.0.1 2.0.2 2.1.0 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.3.0 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5
astra-sites / inc / includes / admin-page.php
astra-sites / inc / includes Last commit date
admin-page.php 4 years ago image-templates.php 4 years ago templates.php 4 years ago white-label.php 6 years ago
admin-page.php
1112 lines
1 <?php
2 /**
3 * Shortcode Markup
4 *
5 * TMPL - Single Demo Preview
6 * TMPL - No more demos
7 * TMPL - Filters
8 * TMPL - List
9 *
10 * @package Astra Sites
11 * @since 1.0.0
12 */
13
14 if ( ! defined( 'ABSPATH' ) ) {
15 exit; // Exit if accessed directly.
16 }
17
18 $subscription_status = Astra_Sites::get_instance()->should_display_subscription_form();
19 $subscription_class = true === $subscription_status ? 'subscription-enabled' : '';
20
21 $site_import_options = apply_filters(
22 'astra_sites_site_import_options',
23 array(
24 'activate-theme' => true,
25 'reset' => false,
26 'customizer' => true,
27 'widgets' => true,
28 'plugins' => true,
29 'xml' => true,
30 )
31 );
32
33 ?>
34
35 <div class="wrap" id="astra-sites-admin" data-slug="<?php echo esc_html( $global_cpt_meta['cpt_slug'] ); ?>">
36
37 <?php
38 if ( ! empty( $_GET['debug'] ) && 'yes' === $_GET['debug'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
39 ?>
40 <div class="astra-sites-log">
41 <?php Astra_Sites_Importer_Log::get_instance()->display_data(); ?>
42 </div>
43
44 <?php } else { ?>
45
46 <?php do_action( 'astra_sites_before_site_grid' ); ?>
47
48 <div class="theme-browser rendered">
49 <div id="astra-sites" class="themes wp-clearfix"></div>
50 <div id="site-pages" class="themes wp-clearfix"></div>
51 <div class="astra-sites-result-preview" style="display: none;"></div>
52
53 <div class="astra-sites-popup" style="display: none;">
54 <div class="overlay"></div>
55 <div class="inner">
56 <div class="heading">
57 <h3><?php esc_html_e( 'Heading', 'astra-sites' ); ?></h3>
58 <span class="dashicons close dashicons-no-alt"></span>
59 </div>
60 <div class="astra-sites-import-content"></div>
61 <div class="ast-actioms-wrap"></div>
62 </div>
63 </div>
64 </div>
65
66 <?php do_action( 'astra_sites_after_site_grid' ); ?>
67
68 <?php } ?>
69 </div>
70
71 <script type="text/template" id="tmpl-astra-sites-compatibility-messages">
72
73 <div class="skip-and-import">
74 <div class="heading">
75 <h3><?php esc_html_e( 'We\'re Almost There!', 'astra-sites' ); ?></h3>
76 <span class="dashicons close dashicons-no-alt"></span>
77 </div>
78 <div class="astra-sites-import-content">
79
80 <p><?php esc_html_e( 'You\'re close to importing the template. To complete the process, please clear the following conditions.', 'astra-sites' ); ?></p>
81
82 <ul class="astra-site-contents">
83
84 <# for ( code in data ) { #>
85 <# if( Object.keys( data[ code ] ).length ) { #>
86
87 <# for ( id in data[ code ] ) { #>
88 <li>
89 {{{ data[ code ][id].title }}}
90
91 <# if ( data[ code ][id].tooltip ) { #>
92 <span class="astra-sites-tooltip-icon" data-tip-id="astra-sites-skip-and-import-notice-{{id}}">
93 <span class="dashicons dashicons-editor-help"></span>
94 </span>
95 <div class="astra-sites-tooltip-message" id="astra-sites-skip-and-import-notice-{{id}}" style="display: none;">
96 {{{data[ code ][id].tooltip}}}
97 </div>
98 <# } #>
99 </li>
100 <# } #>
101
102 <# } #>
103 <# } #>
104
105 </ul>
106
107 </div>
108 <div class="ast-actioms-wrap">
109 <# if( Object.keys( data['errors'] ).length ) { #>
110 <a href="#" class="button button-hero button-primary astra-demo-import disabled site-install-site-button"><?php esc_html_e( 'Skip & Import', 'astra-sites' ); ?></a>
111 <div class="button button-hero site-import-cancel"><?php esc_html_e( 'Cancel', 'astra-sites' ); ?></div>
112 <# } else {
113 var plugin_update = data['warnings']['update-available'] || 0;
114 if( plugin_update ) { #>
115 <a href="<?php echo esc_url( network_admin_url( 'update-core.php' ) ); ?>" class="button button-hero button-primary" target="_blank"><?php esc_html_e( 'Update', 'astra-sites' ); ?></a>
116 <a href="#" class="button button-hero button-primary astra-sites-skip-and-import-step"><?php esc_html_e( 'Skip & Import', 'astra-sites' ); ?></a>
117 <# } else { #>
118 <a href="#" class="button button-hero button-primary astra-sites-skip-and-import-step"><?php esc_html_e( 'Skip & Import', 'astra-sites' ); ?></a>
119 <div class="button button-hero site-import-cancel"><?php esc_html_e( 'Cancel', 'astra-sites' ); ?></div>
120 <# } #>
121 <# } #>
122 </div>
123 </div>
124
125 </script>
126
127 <script type="text/template" id="tmpl-astra-sites-no-sites">
128 <div class="astra-sites-no-sites">
129 <div class="inner">
130 <h3><?php esc_html_e( 'Sorry No Results Found.', 'astra-sites' ); ?></h3>
131 <div class="content">
132 <div class="empty-item">
133 <img class="empty-collection-part" src="<?php echo esc_url( ASTRA_SITES_URI . 'inc/assets/images/empty-collection.svg' ); ?>" alt="empty-collection">
134 </div>
135 <div class="description">
136 <p>
137 <?php
138 /* translators: %1$s External Link */
139 printf( __( 'Don\'t see a template you would like to import?<br><a target="_blank" href="%1$s">Make a Template Suggestion!</a>', 'astra-sites' ), esc_url( astra_sites_get_suggestion_link() ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
140 ?>
141 </p>
142 <div class="back-to-layout-button"><span class="button astra-sites-back"><?php esc_html_e( 'Back to Templates', 'astra-sites' ); ?></span></div>
143 </div>
144 </div>
145 </div>
146 </div>
147 </script>
148
149 <script type="text/template" id="tmpl-astra-sites-no-favorites">
150 <div class="astra-sites-no-favorites">
151 <div class="inner">
152 <h3><?php esc_html_e( 'Favorite Template List Is Empty.', 'astra-sites' ); ?></h3>
153 <div class="content">
154 <div class="empty-item">
155 <img class="empty-collection-part" src="<?php echo esc_url( ASTRA_SITES_URI . 'inc/assets/images/empty-collection.svg' ); ?>" alt="empty-collection">
156 </div>
157 <div class="description">
158 <p>
159 <?php
160 /* translators: %1$s External Link */
161 esc_html_e( 'You\'ll notice a heart-shaped symbol on every template card. Simply tap this icon to mark the template as Favorite.', 'astra-sites' );
162 ?>
163 </p>
164 <img src="<?php echo esc_url( ASTRA_SITES_URI . 'inc/assets/images/arrow-blue.svg' ); ?>" class="arrow-img">
165 <div class="back-to-layout-button"><span class="button astra-sites-back"><?php esc_html_e( 'Back to Templates', 'astra-sites' ); ?></span></div>
166 </div>
167 </div>
168 </div>
169 </div>
170 </script>
171 <?php
172 /**
173 * TMPL - Show Page Builder Sites
174 */
175 ?>
176 <script type="text/template" id="tmpl-astra-sites-page-builder-sites">
177
178 <#
179 if( data ) {
180 let sites_list = data;
181 if( data.sites ) {
182 sites_list = Object.assign( data.sites, data.related );
183 }
184 for ( site_id in sites_list ) {
185
186 var current_site_id = site_id;
187 var type = sites_list[site_id]['type'] || 'site';
188 var wrapper_class = sites_list[site_id]['class'] || '';
189 var page_site_id = sites_list[site_id]['site_id'] || '';
190 var favorite_status = false;
191 var favorite_class = '';
192 var favorite_title = '<?php esc_html_e( 'Make as Favorite', 'astra-sites' ); ?>';
193 var featured_image_url = sites_list[site_id]['featured-image-url'];
194 var thumbnail_image_url = sites_list[site_id]['thumbnail-image-url'] || featured_image_url;
195
196 var site_type = sites_list[site_id]['astra-sites-type'] || '';
197 var page_id = '';
198 if ( 'site' === type ) {
199 if( Object.values( astraSitesVars.favorite_data ).indexOf( String(site_id) ) >= 0 ) {
200 favorite_class = 'is-favorite';
201 favorite_status = true;
202 favorite_title = '<?php esc_html_e( 'Make as Unfavorite', 'astra-sites' ); ?>';
203 }
204 } else {
205 thumbnail_image_url = featured_image_url;
206 current_site_id = page_site_id;
207 page_id = site_id;
208 }
209
210 var title = sites_list[site_id]['title'] || '';
211 var pages_count = parseInt( sites_list[site_id]['pages-count'] ) || 0;
212 var pages_count_class = '';
213 var pages_count_string = ( pages_count !== 1 ) ? pages_count + ' Templates' : pages_count + ' Template';
214 if( 'site' === type ) {
215 if( pages_count ) {
216 pages_count_class = 'has-pages';
217 } else {
218 pages_count_class = 'no-pages';
219 }
220 }
221 var site_title = sites_list[site_id]['site-title'] || '';
222
223 #>
224 <div class="theme astra-theme site-single {{favorite_class}} {{pages_count_class}} astra-sites-previewing-{{type}} {{wrapper_class}}" data-site-id="{{current_site_id}}" data-page-id="{{page_id}}">
225 <div class="inner">
226 <span class="site-preview" data-title="{{{title}}}">
227 <div class="theme-screenshot one loading" data-src="{{thumbnail_image_url}}" data-featured-src="{{featured_image_url}}"></div>
228 </span>
229 <div class="theme-id-container">
230 <div class="theme-name">
231 <span class="title">
232 <# if ( 'site' === type ) { #>
233 <div class='site-title'>{{{title}}}</div>
234 <# if ( pages_count ) { #>
235 <div class='pages-count'>{{{pages_count_string}}}</div>
236 <# } #>
237 <# } else { #>
238 <div class='site-title'>{{{site_title}}}</div>
239 <div class='page-title'>{{{title}}}</div>
240 <# } #>
241 </span>
242 </div>
243 <# if ( '' === type || 'site' === type ) { #>
244 <div class="favorite-action-wrap" data-favorite="{{favorite_class}}" title="{{favorite_title}}">
245 <i class="ast-icon-heart"></i>
246 </div>
247 <# } #>
248 </div>
249 <# if ( site_type && 'free' !== site_type ) { #>
250 <?php /* translators: %s are white label strings. */ ?>
251 <div class="agency-ribbons" title="<?php printf( esc_attr__( 'This premium template is accessible with %1$s "Premium" Package.', 'astra-sites' ), Astra_Sites_White_Label::get_instance()->get_white_label_name() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>"><?php esc_html_e( 'Premium', 'astra-sites' ); ?></div>
252 <# } #>
253 </div>
254 </div>
255 <# } #>
256 <# } #>
257
258 </script>
259
260 <?php
261 /**
262 * TMPL - Show Page Builder Sites
263 */
264 ?>
265 <script type="text/template" id="tmpl-new-astra-sites-page-builder-sites-search">
266
267 <# if( Object.keys( data.sites ).length || Object.keys( data.related ).length ) { #>
268
269 <h3 class="ast-sites__search-title"><?php esc_html_e( 'Site Templates', 'astra-sites' ); ?></h3>
270 <div class="ast-sites__search-wrap">
271 <#
272 let sites_list = Object.assign( data.sites, data.related );
273
274 for ( site_id in sites_list ) { #>
275 <#
276 var current_site_id = site_id;
277 var type = sites_list[site_id]['type'] || 'site';
278 var page_site_id = sites_list[site_id]['site_id'] || '';
279 var favorite_status = false;
280 var favorite_class = '';
281 var favorite_title = '<?php esc_html_e( 'Make as Favorite', 'astra-sites' ); ?>';
282 var featured_image_url = sites_list[site_id]['featured-image-url'];
283 var thumbnail_image_url = sites_list[site_id]['thumbnail-image-url'] || featured_image_url;
284
285 var site_type = sites_list[site_id]['astra-sites-type'] || '';
286 var page_id = '';
287 if( Object.values( astraSitesVars.favorite_data ).indexOf( String(site_id) ) >= 0 ) {
288 favorite_class = 'is-favorite';
289 favorite_status = true;
290 favorite_title = '<?php esc_html_e( 'Make as Unfavorite', 'astra-sites' ); ?>';
291 }
292
293 var title = sites_list[site_id]['title'] || '';
294 var pages_count = parseInt( sites_list[site_id]['pages-count'] ) || 0;
295 var pages_count_string = ( pages_count !== 1 ) ? pages_count + ' Templates' : pages_count + ' Template';
296 var pages_count_class = '';
297 if( pages_count ) {
298 pages_count_class = 'has-pages';
299 } else {
300 pages_count_class = 'no-pages';
301 }
302 var site_title = sites_list[site_id]['site-title'] || '';
303 var site_categories = Object.values( sites_list[site_id]['categories'] ) || [];
304
305 #>
306 <div class="theme astra-theme site-single {{favorite_class}} {{pages_count_class}} astra-sites-previewing-{{type}}" data-site-id="{{current_site_id}}" data-page-id="{{page_id}}">
307 <div class="inner">
308 <span class="site-preview" data-title="{{{title}}}">
309 <div class="theme-screenshot one loading" data-src="{{thumbnail_image_url}}" data-featured-src="{{featured_image_url}}"></div>
310 </span>
311 <div class="theme-id-container">
312 <div class="theme-name">
313 <span class="title" style="text-align: center; flex: 1;">
314
315 <# if ( 'site' === type ) { #>
316 <div class='site-title'>{{{title}}}</div>
317 <# if ( pages_count ) { #>
318 <div class='pages-count'>{{{pages_count_string}}}</div>
319 <# } #>
320 <# } else { #>
321 <div class='site-title'>{{{site_title}}}</div>
322 <div class='page-title'>{{{title}}}</div>
323 <# } #>
324
325 <div style="text-decoration: none; font-size: 10px;">
326 [{{ sites_list[site_id]['astra-site-page-builder'].toUpperCase() }}]
327 </div>
328
329 <# if( sites_list[site_id]['categories'] ) { #>
330 <div class="class-name-{{Object.values( sites_list[site_id]['categories'] )}}" style="text-decoration: none; font-weight: bold;">
331 {{ Object.values( sites_list[site_id]['categories'] ).join( ', ' ).toUpperCase() }}
332 </div>
333 <# } #>
334 </span>
335 </div>
336 <!-- TEMORARY -->
337 <# if ( false ) { #>
338 <div class="favorite-action-wrap" data-favorite="{{favorite_class}}" title="{{favorite_title}}">
339 <i class="ast-icon-heart"></i>
340 </div>
341 <# } #>
342 </div>
343 <# if ( site_type && 'free' !== site_type ) { #>
344 <?php /* translators: %s are white label strings. */ ?>
345 <div class="agency-ribbons" title="<?php printf( esc_attr__( 'This premium template is accessible with %1$s "Premium" Package.', 'astra-sites' ), Astra_Sites_White_Label::get_instance()->get_white_label_name() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>"><?php esc_html_e( 'Premium', 'astra-sites' ); ?></div>
346 <# } #>
347 </div>
348 </div>
349 <# } #>
350 </div>
351
352 <# } #>
353
354 <# if ( Object.keys( data.pages ).length > 0 ) { #>
355
356 <h3 class="ast-sites__search-title"><?php esc_html_e( 'Page Templates', 'astra-sites' ); ?></h3>
357 <div class="ast-sites__search-wrap">
358 <#
359 let pages_list = data.pages;
360 for ( site_id in pages_list ) { #>
361 <#
362 var current_site_id = site_id;
363 var type = pages_list[site_id]['type'] || 'site';
364 var page_site_id = pages_list[site_id]['site_id'] || '';
365 var favorite_status = false;
366 var favorite_class = '';
367 var favorite_title = '<?php esc_html_e( 'Make as Favorite', 'astra-sites' ); ?>';
368 var featured_image_url = pages_list[site_id]['featured-image-url'];
369 var thumbnail_image_url = pages_list[site_id]['thumbnail-image-url'] || featured_image_url;
370
371 var site_type = pages_list[site_id]['astra-sites-type'] || '';
372 var page_id = '';
373 thumbnail_image_url = featured_image_url;
374 current_site_id = page_site_id;
375 page_id = site_id;
376
377 var title = pages_list[site_id]['title'] || '';
378 var pages_count = pages_list[site_id]['pages-count'] || 0;
379 var pages_count_class = '';
380 if( 'site' === type ) {
381 if( pages_count ) {
382 pages_count_class = 'has-pages';
383 } else {
384 pages_count_class = 'no-pages';
385 }
386 }
387 var site_title = pages_list[site_id]['site-title'] || '';
388
389 #>
390 <div class="theme astra-theme site-single {{favorite_class}} {{pages_count_class}} astra-sites-previewing-{{type}}" data-site-id="{{current_site_id}}" data-page-id="{{page_id}}">
391 <div class="inner">
392 <span class="site-preview" data-title="{{{title}}}">
393 <div class="theme-screenshot one loading" data-src="{{thumbnail_image_url}}" data-featured-src="{{featured_image_url}}"></div>
394 </span>
395 <div class="theme-id-container">
396 <div class="theme-name">
397 <span class="title">
398 <div class='site-title'>{{{site_title}}}</div>
399 <div class='page-title'>{{{title}}}</div>
400 </span>
401 </div>
402 <# if ( '' === type || 'site' === type ) { #>
403 <div class="favorite-action-wrap" data-favorite="{{favorite_class}}" title="{{favorite_title}}">
404 <i class="ast-icon-heart"></i>
405 </div>
406 <# } #>
407 </div>
408 <# if ( site_type && 'free' !== site_type ) { #>
409 <?php /* translators: %s are white label strings. */ ?>
410 <div class="agency-ribbons" title="<?php printf( esc_attr__( 'This premium template is accessible with %1$s "Premium" Package.', 'astra-sites' ), Astra_Sites_White_Label::get_instance()->get_white_label_name() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>"><?php esc_html_e( 'Premium', 'astra-sites' ); ?></div>
411 <# } #>
412 </div>
413 </div>
414 <# } #>
415 </div>
416 <# } #>
417
418 </script>
419
420 <script type="text/template" id="tmpl-astra-sites-page-builder-sites-search">
421 <# for ( data ) {
422 <# let pages_list = []; #>
423 <# let sites_list = []; #>
424 <# let pages_list_arr = []; #>
425 <# let sites_list_arr = []; #>
426 <# for ( site_id in data ) {
427 var type = data[site_id]['type'] || 'site';
428 if ( 'site' === type ) {
429 sites_list_arr.push( data[site_id] );
430 sites_list[site_id] = data[site_id];
431 } else {
432 pages_list_arr.push( data[site_id] );
433 pages_list[site_id] = data[site_id]
434 }
435 } #>
436 <# if ( sites_list_arr.length > 0 ) { #>
437 <h3 class="ast-sites__search-title"><?php esc_html_e( 'Site Templates', 'astra-sites' ); ?></h3>
438 <div class="ast-sites__search-wrap">
439 <# for ( site_id in sites_list ) { #>
440 <#
441 var current_site_id = site_id;
442 var type = sites_list[site_id]['type'] || 'site';
443 var page_site_id = sites_list[site_id]['site_id'] || '';
444 var favorite_status = false;
445 var favorite_class = '';
446 var favorite_title = '<?php esc_html_e( 'Make as Favorite', 'astra-sites' ); ?>';
447 var featured_image_url = sites_list[site_id]['featured-image-url'];
448 var thumbnail_image_url = sites_list[site_id]['thumbnail-image-url'] || featured_image_url;
449
450 var site_type = sites_list[site_id]['astra-sites-type'] || '';
451 var page_id = '';
452 if( Object.values( astraSitesVars.favorite_data ).indexOf( String(site_id) ) >= 0 ) {
453 favorite_class = 'is-favorite';
454 favorite_status = true;
455 favorite_title = '<?php esc_html_e( 'Make as Unfavorite', 'astra-sites' ); ?>';
456 }
457
458 var title = sites_list[site_id]['title'] || '';
459 var pages_count = parseInt( sites_list[site_id]['pages-count'] ) || 0;
460 var pages_count_string = ( pages_count !== 1 ) ? pages_count + ' Templates' : pages_count + ' Template';
461 var pages_count_class = '';
462 if( pages_count ) {
463 pages_count_class = 'has-pages';
464 } else {
465 pages_count_class = 'no-pages';
466 }
467 var site_title = sites_list[site_id]['site-title'] || '';
468 var site_categories = Object.values( sites_list[site_id]['categories'] ) || [];
469
470 #>
471 <div class="theme astra-theme site-single {{favorite_class}} {{pages_count_class}} astra-sites-previewing-{{type}}" data-site-id="{{current_site_id}}" data-page-id="{{page_id}}">
472 <div class="inner">
473 <span class="site-preview" data-title="{{{title}}}">
474 <div class="theme-screenshot one loading" data-src="{{thumbnail_image_url}}" data-featured-src="{{featured_image_url}}"></div>
475 </span>
476 <div class="theme-id-container">
477 <div class="theme-name">
478 <span class="title">
479 <# if ( 'site' === type ) { #>
480 <div class='site-title'>{{{title}}}</div>
481 <# if ( pages_count ) { #>
482 <div class='pages-count'>{{{pages_count_string}}}</div>
483 <# } #>
484 <# } else { #>
485 <div class='site-title'>{{{site_title}}}</div>
486 <div class='page-title'>{{{title}}}</div>
487 <# } #>
488 </span>
489 </div>
490 <# if ( '' === type || 'site' === type ) { #>
491 <div class="favorite-action-wrap" data-favorite="{{favorite_class}}" title="{{favorite_title}}">
492 <i class="ast-icon-heart"></i>
493 </div>
494 <# } #>
495 </div>
496 <# if ( site_type && 'free' !== site_type ) { #>
497 <?php /* translators: %s are white label strings. */ ?>
498 <div class="agency-ribbons" title="<?php printf( esc_attr__( 'This premium template is accessible with %1$s "Premium" Package.', 'astra-sites' ), Astra_Sites_White_Label::get_instance()->get_white_label_name() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>"><?php esc_html_e( 'Premium', 'astra-sites' ); ?></div>
499 <# } #>
500 </div>
501 </div>
502 <# } #>
503 </div>
504 <# } #>
505 <# if ( pages_list_arr.length > 0 ) { #>
506
507 <h3 class="ast-sites__search-title"><?php esc_html_e( 'Page Templates', 'astra-sites' ); ?></h3>
508 <div class="ast-sites__search-wrap">
509 <# for ( site_id in pages_list ) { #>
510 <#
511 var current_site_id = site_id;
512 var type = pages_list[site_id]['type'] || 'site';
513 var page_site_id = pages_list[site_id]['site_id'] || '';
514 var favorite_status = false;
515 var favorite_class = '';
516 var favorite_title = '<?php esc_html_e( 'Make as Favorite', 'astra-sites' ); ?>';
517 var featured_image_url = pages_list[site_id]['featured-image-url'];
518 var thumbnail_image_url = pages_list[site_id]['thumbnail-image-url'] || featured_image_url;
519
520 var site_type = pages_list[site_id]['astra-sites-type'] || '';
521 var page_id = '';
522 thumbnail_image_url = featured_image_url;
523 current_site_id = page_site_id;
524 page_id = site_id;
525
526 var title = pages_list[site_id]['title'] || '';
527 var pages_count = pages_list[site_id]['pages-count'] || 0;
528 var pages_count_class = '';
529 if( 'site' === type ) {
530 if( pages_count ) {
531 pages_count_class = 'has-pages';
532 } else {
533 pages_count_class = 'no-pages';
534 }
535 }
536 var site_title = pages_list[site_id]['site-title'] || '';
537
538 #>
539 <div class="theme astra-theme site-single {{favorite_class}} {{pages_count_class}} astra-sites-previewing-{{type}}" data-site-id="{{current_site_id}}" data-page-id="{{page_id}}">
540 <div class="inner">
541 <span class="site-preview" data-title="{{{title}}}">
542 <div class="theme-screenshot one loading" data-src="{{thumbnail_image_url}}" data-featured-src="{{featured_image_url}}"></div>
543 </span>
544 <div class="theme-id-container">
545 <div class="theme-name">
546 <span class="title">
547 <div class='site-title'>{{{site_title}}}</div>
548 <div class='page-title'>{{{title}}}</div>
549 </span>
550 </div>
551 <# if ( '' === type || 'site' === type ) { #>
552 <div class="favorite-action-wrap" data-favorite="{{favorite_class}}" title="{{favorite_title}}">
553 <i class="ast-icon-heart"></i>
554 </div>
555 <# } #>
556 </div>
557 <# if ( site_type && 'free' !== site_type ) { #>
558 <?php /* translators: %s are white label strings. */ ?>
559 <div class="agency-ribbons" title="<?php printf( esc_attr__( 'This premium template is accessible with %1$s "Premium" Package.', 'astra-sites' ), Astra_Sites_White_Label::get_instance()->get_white_label_name() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>"><?php esc_html_e( 'Premium', 'astra-sites' ); ?></div>
560 <# } #>
561 </div>
562 </div>
563 <# } #>
564 </div>
565 <# } #>
566 <# } #>
567
568 </script>
569
570 <?php
571 /**
572 * TMPL - Pro Site Description
573 */
574 ?>
575 <script type="text/template" id="tmpl-astra-sites-pro-site-description">
576 <p>
577 <?php
578 _e( '<span class="highlighted-note">This is a premium template available with Essential and Growth Bundle.</span><br /> <a href="{{AstraSitesAdmin.premium_popup_cta_link}}" target="_blank">Get access</a> to this premium template.', 'astra-sites' ); // phpcs:ignore WordPress.Security.EscapeOutput.UnsafePrintingFunction
579 ?>
580 </p>
581 <p>
582 <?php
583 /* translators: %s is article link */
584 printf( __( 'Already own an Essential or Growth Bundle? <a href="%s" target="_blank">Know how</a> to import premium templates.', 'astra-sites' ), esc_url( 'https://wpastra.com/docs/starter-templates-complete-site/' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
585 ?>
586 </p>
587 </script>
588
589 <?php
590 /**
591 * TMPL - Activate License
592 */
593 ?>
594 <script type="text/template" id="tmpl-astra-sites-skip-templates">
595 <p><?php esc_html_e( 'The page templates which contain the dynamic widgets/modules are not available for single template import. With the "Import Site" option, you can get those pages.', 'astra-sites' ); ?></p>
596 <p><?php esc_html_e( 'You can have the complete site preview from bottom left button.', 'astra-sites' ); ?></p>
597 </script>
598
599 <?php
600 /**
601 * TMPL - Activate License
602 */
603 ?>
604 <script type="text/template" id="tmpl-astra-sites-activate-license">
605 <?php
606 do_action( 'astra_sites_activate_license_popup' );
607 ?>
608 </script>
609
610 <?php
611 /**
612 * TMPL - Invalid Essential Bundle License
613 */
614 ?>
615 <script type="text/template" id="tmpl-astra-sites-invalid-mini-agency-license">
616 <p>
617 <?php
618 $page_builder = get_option( 'astra-sites-license-page-builder', '' );
619 if ( 'elementor' === $page_builder ) {
620 $current_page_builder = 'Elementor';
621 $upgrade_page_builder = 'Beaver Builder';
622 } else {
623 $current_page_builder = 'Beaver Builder';
624 $upgrade_page_builder = 'Elementor';
625 }
626
627 /* translators: %s is pricing page link */
628 printf( __( '<p>Seems like you have purchased the %4$s \'Essential Bundle\' package with a choice of \'%1$s\' page builder addon.</p><p>While this template is built with \'%2$s\' page builder addon.</p><p>Read article <a href="%3$s" target="_blank">here</a> to see how you can proceed.</p>', 'astra-sites' ), esc_html( $current_page_builder ), esc_html( $upgrade_page_builder ), esc_url( Astra_Sites_White_Label::get_instance()->get_white_label_link( 'https://wpastra.com/docs/not-valid-license/' ) ), Astra_Sites_White_Label::get_instance()->get_white_label_name() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
629 ?>
630 </p>
631 </script>
632
633 <?php
634 /**
635 * TMPL - Pro Site Description for Inactive license
636 */
637 ?>
638 <script type="text/template" id="tmpl-astra-sites-pro-inactive-site-description">
639 <p><?php esc_html_e( 'You are just 2 minutes away from importing this demo!', 'astra-sites' ); ?></p>
640 <p><?php esc_html_e( 'This is a premium website demo template. Please activate your license to access it.', 'astra-sites' ); ?></p>
641 <p>
642 <?php
643 /* translators: %s is article link */
644 printf( __( 'Learn how you can <a href="%1$s" target="_blank">activate the license</a> of the %2$s plugin.', 'astra-sites' ), esc_url( 'https://wpastra.com/docs/activate-license-for-astra-premium-sites-plugin/' ), Astra_Sites_White_Label::get_instance()->get_white_label_name() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
645 ?>
646 </p>
647 </script>
648
649 <?php
650 /**
651 * TMPL - Third Party Required Plugins
652 */
653 ?>
654 <script type="text/template" id="tmpl-astra-sites-third-party-required-plugins">
655 <div class="skip-and-import">
656 <div class="heading">
657 <h3><?php esc_html_e( 'Required Plugins Missing', 'astra-sites' ); ?></h3>
658 <span class="dashicons close dashicons-no-alt"></span>
659 </div>
660 <div class="astra-sites-import-content">
661 <p><?php esc_html_e( 'This starter template requires premium plugins. As these are third party premium plugins, you\'ll need to purchase, install and activate them first.', 'astra-sites' ); ?></p>
662 <ul class="astra-sites-third-party-required-plugins">
663 <# for ( key in data ) { #>
664 <li class="plugin-card plugin-card-{{data[ key ].slug}}'" data-slug="{{data[ key ].slug }}" data-init="{{data[ key ].init}}" data-name="{{data[ key ].name}}"><a href="{{data[ key ].link}}" target="_blank">{{data[ key ].name}}</a></li>
665 <# } #>
666 </ul>
667 </div>
668 <div class="ast-actioms-wrap">
669 <a href="#" class="button button-hero button-primary astra-sites-skip-and-import-step"><?php esc_html_e( 'Skip & Import', 'astra-sites' ); ?></a>
670 <div class="button button-hero site-import-cancel"><?php esc_html_e( 'Cancel', 'astra-sites' ); ?></div>
671 </div>
672 </div>
673 </script>
674
675 <?php
676 /**
677 * TMPL - Single Site Preview
678 */
679 ?>
680 <script type="text/template" id="tmpl-astra-sites-single-site-preview">
681 <div class="single-site-wrap">
682 <div class="single-site">
683 <div class="single-site-preview-wrap">
684 <div class="single-site-pages-header">
685 <h3 class="astra-site-title">{{{data['title']}}}</h3>
686 <span class="count" style="display: none"></span>
687 </div>
688 <div class="single-site-preview">
689 <img class="theme-screenshot" data-src="" src="{{data['featured-image-url']}}" />
690 </div>
691 </div>
692 <div class="single-site-pages-wrap">
693 <div class="astra-pages-title-wrap">
694 <span class="astra-pages-title"><?php esc_html_e( 'Page Templates', 'astra-sites' ); ?></span>
695 </div>
696 <div class="single-site-pages">
697 <div id="single-pages">
698 <# for ( page_id in data.pages ) {
699 var dynamic_page = data.pages[page_id]['dynamic-page'] || 'no'; #>
700 <div class="theme astra-theme site-single" data-page-id="{{page_id}}" data-dynamic-page="{{dynamic_page}}" >
701 <div class="inner">
702 <#
703 var featured_image_class = '';
704 var featured_image = data.pages[page_id]['featured-image-url'] || '';
705 if( '' === featured_image ) {
706 featured_image = '<?php echo esc_url( ASTRA_SITES_URI . 'inc/assets/images/placeholder.png' ); ?>';
707 featured_image_class = ' no-featured-image ';
708 }
709
710 var thumbnail_image = data.pages[page_id]['thumbnail-image-url'] || '';
711 if( '' === thumbnail_image ) {
712 thumbnail_image = featured_image;
713 }
714 #>
715 <span class="site-preview" data-title="{{ data.pages[page_id]['title'] }}">
716 <div class="theme-screenshot one loading {{ featured_image_class }}" data-src="{{ thumbnail_image }}" data-featured-src="{{ featured_image }}"></div>
717 </span>
718 <div class="theme-id-container">
719 <h3 class="theme-name">
720 {{{ data.pages[page_id]['title'] }}}
721 </h3>
722 </div>
723 </div>
724 </div>
725 <# } #>
726 </div>
727 </div>
728 </div>
729 <div class="single-site-footer">
730 <div class="site-action-buttons-wrap">
731 <?php $white_label_class = ( Astra_Sites_White_Label::get_instance()->get_white_label_name() !== ASTRA_SITES_NAME ) ? 'ast-white-label-flag' : ''; ?>
732 <a href="{{data['astra-site-url']}}/" class="button button-hero site-preview-button <?php echo esc_html( $white_label_class ); ?>" target="_blank">Preview Site <i class="dashicons dashicons-external"></i></a>
733 <div class="site-action-buttons-right">
734 <# if( 'free' !== data['astra-sites-type'] && '' !== astraSitesVars.license_page_builder && data['astra-site-page-builder'] !== astraSitesVars.license_page_builder && ( 'brizy' !== data['astra-site-page-builder'] && 'gutenberg' !== data['astra-site-page-builder'] ) ) { #>
735 <a class="button button-hero button-primary disabled astra-sites-invalid-mini-agency-license-button"><?php esc_html_e( 'Not Valid License', 'astra-sites' ); ?></a>
736 <span class="dashicons dashicons-editor-help astra-sites-invalid-mini-agency-license-button"></span>
737 <# } else if( 'free' !== data['astra-sites-type'] && ! astraSitesVars.license_status ) { #>
738 <# if( ! astraSitesVars.isPro ) { #>
739 <a class="button button-hero button-primary astra-sites-get-agency-bundle-button" target="_blank">{{astraSitesVars.getProText}}<i class="dashicons dashicons-external"></i></a>
740 <# } else { #>
741 <span class="button button-hero button-primary astra-sites-activate-license-button">{{astraSitesVars.getProText}}</span>
742 <# } #>
743 <# } else { #>
744 <div class="button button-hero button-primary site-import-site-button"><?php esc_html_e( 'Import Complete Site', 'astra-sites' ); ?></div>
745 <div style="margin-left: 5px;" class="button button-hero button-primary site-import-layout-button disabled"><?php esc_html_e( 'Import Template', 'astra-sites' ); ?></div>
746 <# } #>
747 </div>
748 </div>
749 </div>
750 </div>
751 </div>
752 </script>
753
754 <script type="text/template" id="tmpl-astra-sites-site-import-success">
755 <div class="heading">
756 <h3><?php esc_html_e( 'Imported Successfully!', 'astra-sites' ); ?></h3>
757 <span class="dashicons close dashicons-no-alt"></span>
758 </div>
759 <div class="astra-sites-import-content">
760 <p><b><?php esc_html_e( 'Hurray! The Website Imported Successfully! 🎉', 'astra-sites' ); ?></b></p>
761 <p>
762 <?php esc_html_e( 'Go ahead, customize the text, images and design to make it yours!', 'astra-sites' ); ?>&nbsp;
763 <# if ( '46177' == AstraSitesAdmin.templateData.id ) { #>
764 <?php
765 $kit_doc_url = 'https://wpastra.com/docs/mountain-template-elementor-theme-style/';
766 /* translators: %1$s External Link */
767 printf( __( '%1$sRead more%2$s about customizing this Elementor Style Kit site.', 'astra-sites' ), '<a href="' . esc_url( $kit_doc_url ) . '" target="_blank">', '</a>' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
768 ?>
769 <# } #>
770 </p>
771 <p><?php esc_html_e( 'Have fun!', 'astra-sites' ); ?></p>
772 <p><?php esc_html_e( 'PS: We try our best to use images that are free from legal perspectives. However, we do not take any responsibility. We strongly advise website owners to replace the images and any copyrighted media before publishing them online.', 'astra-sites' ); ?></p>
773 </div>
774 <div class="ast-actioms-wrap">
775 <a class="button button-primary button-hero" href="<?php echo esc_url( site_url() ); ?>" target="_blank"><?php esc_html_e( 'View Site', 'astra-sites' ); ?> <i class="dashicons dashicons-external"></i></a>
776 </div>
777 </script>
778
779 <script type="text/template" id="tmpl-astra-sites-page-import-success">
780 <div class="heading">
781 <h3><?php esc_html_e( 'Imported Successfully!', 'astra-sites' ); ?></h3>
782 <span class="dashicons close dashicons-no-alt"></span>
783 </div>
784 <div class="astra-sites-import-content">
785 <p><b><?php esc_html_e( 'Hurray! The Template Imported Successfully! 🎉', 'astra-sites' ); ?></b></p>
786 <p><?php esc_html_e( 'Go ahead, customize the text, images and design to make it yours!', 'astra-sites' ); ?></p>
787 <p><?php esc_html_e( 'Have fun!', 'astra-sites' ); ?></p>
788 <p><?php esc_html_e( 'PS: We try our best to use images that are free from legal perspectives. However, we do not take any responsibility. We strongly advise website owners to replace the images and any copyrighted media before publishing them online.', 'astra-sites' ); ?></p>
789 </div>
790 <div class="ast-actioms-wrap">
791 <a class="button button-primary button-hero" href="{{data['link']}}" target="_blank"><?php esc_html_e( 'View Template', 'astra-sites' ); ?> <i class="dashicons dashicons-external"></i></a>
792 </div>
793 </script>
794
795 <?php
796 /**
797 * TMPL - Import Process Interrupted
798 */
799 ?>
800 <script type="text/template" id="tmpl-astra-sites-request-failed">
801 <p><?php esc_html_e( 'We could not start the import process. This is the message from HTTP request:', 'astra-sites' ); ?></p>
802 <p>
803 <?php
804 /* translators: %s doc link. */
805 printf( __( 'Please raise a <a href="%s" target="_blank">support request</a> so we can help you with it.', 'astra-sites' ), 'hhttps://wpastra.com/support/' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
806 ?>
807 </p>
808 </script>
809 <?php
810 /**
811 * TMPL - Import Process Interrupted - User end
812 */
813 ?>
814 <script type="text/template" id="tmpl-astra-sites-request-failed-user">
815
816 <# if ( data.primary ) { #>
817 <p>{{{ data.primary }}}</p>
818 <# } #>
819
820 <# if ( 'Cloudflare' === data.error.code ) { #>
821 <div class="current-importing-status">{{{ data.error.message + ' (' + data.error.code + ')' }}}</div>
822 <# } else { #>
823 <div class="current-importing-status">{{{ data.error.code }}} - {{{ data.error.message }}}</div>
824 <# } #>
825
826 <# if ( 'WP_Error' === data.error.code ) { #>
827 <p>
828 <?php
829 /* translators: %s doc link. */
830 printf( __( 'We have listed the <a href="%s" target="_blank">possible solutions here</a> to help you resolve this.', 'astra-sites' ), 'https://wpastra.com/docs/fix-starter-template-importing-issues/' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
831 ?>
832 </p>
833 <# } else if ( 'Cloudflare' === data.error.code ) { #>
834 <p>
835 <# if ( data.error.response_code && '522' == data.error.response_code ) { #>
836 <?php
837 /* translators: %s doc link. */
838 printf( __( 'Please <a class="ast-try-again" href="">click here and try again</a>. If this still does not work after few attempts, please report it <a href="%s" target="_blank">here</a>.', 'astra-sites' ), 'https://wpastra.com/support/open-a-ticket/' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
839 ?>
840 <# } else { #>
841 <?php
842 /* translators: %s doc link. */
843 printf( __( 'Please report this error %1$shere%2$s, so we can fix it.', 'astra-sites' ), '<a class="ast-try-again" href="https://wpastra.com/support/open-a-ticket/">', '</a>' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
844 ?>
845 <# } #>
846 </p>
847 <# } else { #>
848 <p>
849 <?php
850 $ip = Astra_Sites_Helper::get_client_ip();
851 $url_text = __( 'Please report this error <a href="#LINK" target="_blank">here</a> so we can fix it.', 'astra-sites' );
852 $url = 'https://wpastra.com/starter-templates-support/?ip=' . $ip;
853 ?>
854 <#
855 var url = '<?php echo $url; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>';
856 url += '&template-id=' + data.id;
857 url += '&subject=' + data.error.code + ' - ' + data.error.message;
858
859 var url_text = '<?php echo $url_text; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>';
860 url_text = url_text.replace( "#LINK", url );
861 #>
862 {{{url_text}}}
863 </p>
864 <# } #>
865
866 </script>
867
868 <?php
869 /**
870 * TMPL - Dynamic Page
871 */
872 ?>
873 <script type="text/template" id="tmpl-astra-sites-dynamic-page">
874 <div class="skip-and-import">
875 <div class="heading">
876 <h3><?php esc_html_e( 'Heads Up!', 'astra-sites' ); ?></h3>
877 <span class="dashicons close dashicons-no-alt"></span>
878 </div>
879 <div class="astra-sites-import-content">
880 <p><?php esc_html_e( 'The page template you are about to import contains a dynamic widget/module. Please note this dynamic data will not be available with the imported page.', 'astra-sites' ); ?></p>
881 <p><?php esc_html_e( 'You will need to add it manually on the page.', 'astra-sites' ); ?></p>
882 <p><?php esc_html_e( 'This dynamic content will be available when you import the entire site.', 'astra-sites' ); ?></p>
883 </div>
884 <div class="ast-actioms-wrap">
885 <a href="#" class="button button-hero button-primary astra-sites-skip-and-import-step"><?php esc_html_e( 'Skip & Import', 'astra-sites' ); ?></a>
886 <div class="button button-hero site-import-cancel"><?php esc_html_e( 'Cancel', 'astra-sites' ); ?></div>
887 </div>
888 </div>
889 </script>
890
891 <script type="text/template" id="tmpl-astra-sites-subscription-form-one">
892 <div class="subscription-fields">
893 <div class="subscription-field-wrap">
894 <select class="subscription-input subscription-input-wp-user-type" name="wp_user_type">
895 <option value=""></option>
896 <option value="1"><?php esc_html_e( 'Beginner', 'astra-sites' ); ?></option>
897 <option value="2"><?php esc_html_e( 'Intermediate', 'astra-sites' ); ?></option>
898 <option value="3"><?php esc_html_e( 'Expert', 'astra-sites' ); ?></option>
899 </select>
900 <small class="subscription-desc"><?php esc_html_e( 'Field is required', 'astra-sites' ); ?></small>
901 <label class="subscription-label"><?php esc_html_e( 'I\'m a WordPress:', 'astra-sites' ); ?></label>
902 </div>
903 <div class="subscription-field-wrap">
904 <select class="subscription-input subscription-input-build-website-for" name="build_website_for">
905 <option value=""></option>
906 <option value="1"><?php esc_html_e( 'Myself/My company', 'astra-sites' ); ?></option>
907 <option value="2"><?php esc_html_e( 'My client', 'astra-sites' ); ?></option>
908 </select>
909 <small class="subscription-desc"><?php esc_html_e( 'Field is required', 'astra-sites' ); ?></small>
910 <label class="subscription-label"><?php esc_html_e( 'I\'m building website for:', 'astra-sites' ); ?></label>
911 </div>
912 </div>
913 </script>
914
915 <script type="text/template" id="tmpl-astra-sites-subscription-form-two">
916 <div class="subscription-fields">
917 <div class="subscription-field-wrap">
918 <input class="subscription-input subscription-input-name" type="text" name="first_name" />
919 <small class="subscription-desc"><?php esc_html_e( 'First name is required', 'astra-sites' ); ?></small>
920 <label class="subscription-label"><?php esc_html_e( 'Your First Name', 'astra-sites' ); ?></label>
921 </div>
922 <div class="subscription-field-wrap">
923 <input class="subscription-input subscription-input-email" type="email" name="email" />
924 <small class="subscription-desc"><?php esc_html_e( 'Email address is required', 'astra-sites' ); ?></small>
925 <label class="subscription-label"><?php esc_html_e( 'Your Work Email', 'astra-sites' ); ?></label>
926 </div>
927 </div>
928 </script>
929
930 <?php
931 /**
932 * TMPL - First Screen
933 */
934 ?>
935 <script type="text/template" id="tmpl-astra-sites-result-preview">
936
937 <div class="overlay"></div>
938 <div class="inner <?php echo esc_attr( $subscription_class ); ?>">
939
940 <div class="subscription-popup">
941 <div class="heading">
942 <h3><?php esc_html_e( 'One Last Step..', 'astra-sites' ); ?></h3>
943 <span class="dashicons close dashicons-no-alt"></span>
944 </div>
945 <div class="astra-sites-import-content">
946 <p><?php esc_html_e( 'To get access to exclusive starter templates, themes and updates, enter your details below:', 'astra-sites' ); ?></p>
947 <div id="astra-sites-subscription-form-two" class="subscription-form astra-sites-subscription-form-two"></div>
948 <div class="subscription-actions">
949 <button class="button button-hero button-primary button-subscription-submit">
950 <span class="button-title"><?php esc_html_e( 'Submit and Start Importing', 'astra-sites' ); ?></span>
951 <span class="dashicons dashicons-update"></span>
952 </button>
953 </div>
954 <div class="subscription-footer">
955 <?php /* translators: %1$s and %3$s are opening anchor tags, and %2$s and %4$s is closing anchor tags. */ ?>
956 <p><?php printf( __( 'By submitting, you agree to our %1$sTerms%2$s and %3$sPrivacy Policy%4$s.', 'astra-sites' ), '<a href="https://store.brainstormforce.com/terms-and-conditions/" target="_blank">', '</a>', '<a href="https://store.brainstormforce.com/privacy-policy/" target="_blank">', '</a>' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
957 <a href="#" class="button-subscription-skip"><?php esc_html_e( 'Skip', 'astra-sites' ); ?></a>
958 </div>
959 </div>
960 </div>
961
962 <div class="default">
963 <div class="heading">
964 <# if( 'astra-sites' === data ) { #>
965 <h3><?php esc_html_e( 'Your Selected Website is Being Imported.', 'astra-sites' ); ?></h3>
966 <# } else { #>
967 <h3><?php esc_html_e( 'Your Selected Template is Being Imported.', 'astra-sites' ); ?></h3>
968 <# } #>
969 <span class="dashicons close dashicons-no-alt"></span>
970 </div>
971
972 <div class="astra-sites-import-content">
973 <div class="install-theme-info">
974 <div class="astra-sites-advanced-options-wrap">
975
976 <?php if ( true === $subscription_status ) : ?>
977 <p class="user-building-for-title"><?php esc_html_e( 'To serve more beautiful starter templates, we would like to know more about you:', 'astra-sites' ); ?></p>
978 <?php endif; ?>
979
980 <div id="astra-sites-subscription-form-one" class="subscription-form astra-sites-subscription-form-one"></div>
981
982 <h2 class="astra-sites-advanced-options-heading"><?php esc_html_e( 'Advanced Options', 'astra-sites' ); ?> <span class="dashicons dashicons-arrow-right-alt2"></span></h2>
983
984 <div class="astra-sites-advanced-options">
985 <ul class="astra-site-contents">
986
987 <# if( 'astra-sites' === data ) { #>
988
989 <?php $theme_status = Astra_Sites::get_instance()->get_theme_status(); ?>
990 <?php $theme_dependancy_class = ''; ?>
991 <?php if ( 'installed-and-active' !== $theme_status ) { ?>
992 <?php $theme_dependancy_class = 'astra-theme-module'; ?>
993 <li class="astra-sites-theme-activation">
994 <label>
995 <input type="checkbox" name="activate-theme" class="checkbox" <?php checked( $site_import_options['activate-theme'], true ); ?> data-status="<?php echo esc_attr( $theme_status ); ?>">
996 <strong><?php esc_html_e( 'Install & Activate Astra Theme', 'astra-sites' ); ?></strong>
997 <div class="astra-sites-tooltip-message" id="astra-sites-tooltip-theme-activation" style="display: none;"><p><?php esc_html_e( 'To import the site in the original format, you would need the Astra theme activated. You can import it with any other theme, but the site might lose some of the design settings and look a bit different.', 'astra-sites' ); ?></p></div>
998 </label>
999 </li>
1000 <?php } ?>
1001
1002 <li class="astra-sites-import-customizer <?php echo esc_attr( $theme_dependancy_class ); ?>">
1003 <label>
1004 <input type="checkbox" name="customizer" class="checkbox" <?php checked( $site_import_options['customizer'], true ); ?> />
1005 <strong><?php esc_html_e( 'Import Customizer Settings', 'astra-sites' ); ?></strong>
1006 <span class="astra-sites-tooltip-icon" data-tip-id="astra-sites-tooltip-customizer-settings"><span class="dashicons dashicons-editor-help"></span></span>
1007 <div class="astra-sites-tooltip-message" id="astra-sites-tooltip-customizer-settings" style="display: none;">
1008 <?php /* translators: %s are white label strings. */ ?>
1009 <p><?php printf( esc_html__( '%1$s customizer serves global settings that give uniform design to the website. Choosing this option will override your current customizer settings.', 'astra-sites' ), Astra_Sites_White_Label::get_instance()->get_white_label_name() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
1010 </div>
1011 </label>
1012 </li>
1013
1014 <# } #>
1015
1016 <# if( 'astra-sites' === data ) { #>
1017 <li class="astra-sites-import-widgets">
1018 <label>
1019 <input type="checkbox" name="widgets" class="checkbox" <?php checked( $site_import_options['widgets'], true ); ?> />
1020 <strong><?php esc_html_e( 'Import Widgets', 'astra-sites' ); ?></strong>
1021 </label>
1022 </li>
1023 <# } #>
1024
1025 <li class="astra-sites-import-plugins">
1026 <input type="checkbox" name="plugins" class="disabled checkbox" readonly <?php checked( $site_import_options['plugins'], true ); ?> />
1027 <strong><?php esc_html_e( 'Install Required Plugins', 'astra-sites' ); ?></strong>
1028 <span class="astra-sites-tooltip-icon" data-tip-id="astra-sites-tooltip-plugins-settings"><span class="dashicons dashicons-editor-help"></span></span>
1029 <div class="astra-sites-tooltip-message" id="astra-sites-tooltip-plugins-settings" style="display: none;">
1030 <p><?php esc_html_e( 'Plugins needed to import this template are missing. Required plugins will be installed and activated automatically.', 'astra-sites' ); ?></p>
1031 <ul class="required-plugins-list"><span class="spinner is-active"></span></ul>
1032 </div>
1033 </li>
1034
1035 <# if( 'astra-sites' === data ) { #>
1036 <li class="astra-sites-import-xml">
1037 <label>
1038 <input type="checkbox" name="xml" class="checkbox" <?php checked( $site_import_options['xml'], true ); ?> />
1039 <strong><?php esc_html_e( 'Import Content', 'astra-sites' ); ?></strong>
1040 </label>
1041 <span class="astra-sites-tooltip-icon" data-tip-id="astra-sites-tooltip-site-content"><span class="dashicons dashicons-editor-help"></span></span>
1042 <div class="astra-sites-tooltip-message" id="astra-sites-tooltip-site-content" style="display: none;"><p><?php esc_html_e( 'Selecting this option will import dummy pages, posts, images, and menus. If you do not want to import dummy content, please uncheck this option.', 'astra-sites' ); ?></p></div>
1043 </li>
1044 <# } #>
1045 </ul>
1046 </div>
1047 </div>
1048 </div>
1049 <div class="ast-importing-wrap">
1050 <#
1051 if( 'astra-sites' === data ) {
1052 var string = 'sites';
1053 } else {
1054 var string = 'template';
1055 }
1056 #>
1057 <p>
1058 <?php
1059 /* translators: %s is the dynamic string. */
1060 printf( esc_html__( 'The import process can take a few minutes depending on the size of the %s and speed of the connection.', 'astra-sites' ), '{{string}}' );
1061 ?>
1062 </p>
1063 <p>
1064 <?php
1065 /* translators: %s is the dynamic string. */
1066 printf( esc_html__( 'Please do NOT close this browser window until the %s is imported completely.', 'astra-sites' ), '{{string}}' );
1067 ?>
1068 </p>
1069
1070 <div class="current-importing-status-wrap">
1071 <div class="current-importing-status">
1072 <div class="current-importing-status-title"></div>
1073 <div class="current-importing-status-description"></div>
1074 </div>
1075 </div>
1076 </div>
1077 </div>
1078
1079 <div class="ast-actioms-wrap">
1080 <a href="#" class="button button-hero button-primary astra-demo-import disabled site-install-site-button">
1081 <?php
1082 if ( true === $subscription_status ) {
1083 esc_html_e( 'Next', 'astra-sites' );
1084 } else {
1085 esc_html_e( 'Import', 'astra-sites' );
1086 }
1087 ?>
1088 </a>
1089 <a href="#" class="button button-hero button-primary astra-sites-skip-and-import" style="display: none;"><?php esc_html_e( 'Skip & Import', 'astra-sites' ); ?></a>
1090 <div class="button button-hero site-import-cancel"><?php esc_html_e( 'Cancel', 'astra-sites' ); ?></div>
1091 </div>
1092 </div>
1093 </div>
1094 </script>
1095
1096 <script type="text/template" id="tmpl-astra-sites-delete-previous-site">
1097 <li class="astra-sites-reset-data">
1098 <label>
1099 <input type="checkbox" name="reset" class="checkbox" <?php checked( 'reset', true ); ?>>
1100 <strong><?php esc_html_e( 'Delete Previously Imported Site', 'astra-sites' ); ?></strong>
1101 <div class="astra-sites-tooltip-message" id="astra-sites-tooltip-reset-data" style="display: none;"><p><?php esc_html_e( 'WARNING: Selecting this option will delete all data from the previous import. Choose this option only if this is intended.', 'astra-sites' ); ?></p>
1102 <?php if ( ! Astra_Sites_White_Label::get_instance()->is_white_labeled() ) { ?>
1103 <p><?php esc_html_e( 'You can find the backup to the current customizer settings at ', 'astra-sites' ); ?><code><?php esc_html_e( '/wp-content/uploads/astra-sites/', 'astra-sites' ); ?></code></p>
1104 <?php } ?>
1105 </div>
1106 </label>
1107 </li>
1108
1109 </script>
1110 <?php
1111 wp_print_admin_notice_templates();
1112