Version Description
Download this release
Release Info
Developer | Nikschavan |
Plugin | Astra Starter Sites |
Version | 1.0.8 |
Comparing to | |
See all releases |
Code changes from version 1.0.7 to 1.0.8
- admin/class-astra-sites-admin.php +0 -82
- astra-sites.php +3 -3
- {admin → inc/admin}/class-astra-sites-page.php +1 -1
- {admin → inc/admin}/view-astra-sites.php +7 -6
- {assets → inc/assets}/css/admin.css +11 -0
- {assets → inc/assets}/js/admin.js +113 -66
- inc/assets/js/astra-sites-notices.js +21 -0
- inc/classes/class-astra-sites-notices.php +211 -0
- {classes → inc/classes}/class-astra-sites.php +103 -56
- inc/classes/compatibility/class-astra-sites-compatibility-astra-pro.php +86 -0
- {classes → inc/classes}/compatibility/class-astra-sites-compatibility-so-widgets.php +14 -5
- {importers → inc/importers}/class-astra-customizer-import.php +0 -0
- {importers → inc/importers}/class-astra-site-options-import.php +15 -1
- {importers → inc/importers}/class-astra-sites-helper.php +5 -3
- {importers → inc/importers}/class-widgets-importer.php +0 -0
- {importers → inc/importers}/wxr-importer/class-astra-wxr-importer.php +2 -2
- {importers → inc/importers}/wxr-importer/class-logger.php +0 -0
- {importers → inc/importers}/wxr-importer/class-wxr-importer.php +0 -0
- languages/astra-sites.pot +92 -80
- readme.txt +6 -1
admin/class-astra-sites-admin.php
DELETED
@@ -1,82 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Astra Demo Importer Admin
|
4 |
-
*
|
5 |
-
* @package Astra Addon
|
6 |
-
*/
|
7 |
-
|
8 |
-
defined( 'ABSPATH' ) or exit;
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Astra Demo Importer Admin
|
12 |
-
*
|
13 |
-
* @since 1.0.0
|
14 |
-
*/
|
15 |
-
class Astra_Sites_Admin {
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Instance of Astra_Sites_Admin
|
19 |
-
*
|
20 |
-
* @since 1.0.0
|
21 |
-
* @var Astra_Sites_Admin
|
22 |
-
*/
|
23 |
-
private static $_instance = null;
|
24 |
-
|
25 |
-
/**
|
26 |
-
* Instanciate Astra_Sites_Admin
|
27 |
-
*
|
28 |
-
* @since 1.0.0
|
29 |
-
* @return (Object) Astra_Sites_Admin
|
30 |
-
*/
|
31 |
-
public static function instance() {
|
32 |
-
if ( ! isset( self::$_instance ) ) {
|
33 |
-
self::$_instance = new self;
|
34 |
-
}
|
35 |
-
|
36 |
-
return self::$_instance;
|
37 |
-
}
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Constructor
|
41 |
-
*
|
42 |
-
* @since 1.0.0
|
43 |
-
*/
|
44 |
-
private function __construct() {
|
45 |
-
|
46 |
-
add_filter( 'astra_menu_options', array( $this, 'menu' ) );
|
47 |
-
add_action( 'astra_menu_astra_sites_action', array( $this, 'view_demos' ) );
|
48 |
-
|
49 |
-
}
|
50 |
-
|
51 |
-
/**
|
52 |
-
* Register admin menu for demo importer
|
53 |
-
*
|
54 |
-
* @since 1.0.0
|
55 |
-
*
|
56 |
-
* @param (Array) $actions Previously registered tabs menus.
|
57 |
-
*
|
58 |
-
* @return (Array) registered tabs menus in Astra menu.
|
59 |
-
*/
|
60 |
-
public function menu( $actions ) {
|
61 |
-
|
62 |
-
$actions['astra-sites'] = array(
|
63 |
-
'label' => __( 'Astra Sites', 'astra-sites' ),
|
64 |
-
'show' => ! is_network_admin(),
|
65 |
-
);
|
66 |
-
|
67 |
-
return $actions;
|
68 |
-
}
|
69 |
-
|
70 |
-
/**
|
71 |
-
* View Astra Sites
|
72 |
-
*
|
73 |
-
* @since 1.0.0
|
74 |
-
*/
|
75 |
-
public function view_demos() {
|
76 |
-
|
77 |
-
include ASTRA_SITES_DIR . 'admin/view-astra-sites.php';
|
78 |
-
}
|
79 |
-
|
80 |
-
}
|
81 |
-
|
82 |
-
Astra_Sites_Admin::instance();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
astra-sites.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Astra Free Sites
|
4 |
* Plugin URI: http://www.wpastra.com/pro/
|
5 |
* Description: Import free sites build with Astra theme.
|
6 |
-
* Version: 1.0.
|
7 |
* Author: Brainstorm Force
|
8 |
* Author URI: http://www.brainstormforce.com
|
9 |
* Text Domain: astra-sites
|
@@ -15,7 +15,7 @@
|
|
15 |
* Set constants.
|
16 |
*/
|
17 |
if ( ! defined( 'ASTRA_SITES_VER' ) ) {
|
18 |
-
define( 'ASTRA_SITES_VER', '1.0.
|
19 |
}
|
20 |
|
21 |
if ( ! defined( 'ASTRA_SITES_FILE' ) ) {
|
@@ -42,7 +42,7 @@ if ( ! function_exists( 'astra_sites_setup' ) ) :
|
|
42 |
* @since 1.0.5
|
43 |
*/
|
44 |
function astra_sites_setup() {
|
45 |
-
require_once ASTRA_SITES_DIR . 'classes/class-astra-sites.php';
|
46 |
}
|
47 |
|
48 |
add_action( 'plugins_loaded', 'astra_sites_setup' );
|
3 |
* Plugin Name: Astra Free Sites
|
4 |
* Plugin URI: http://www.wpastra.com/pro/
|
5 |
* Description: Import free sites build with Astra theme.
|
6 |
+
* Version: 1.0.8
|
7 |
* Author: Brainstorm Force
|
8 |
* Author URI: http://www.brainstormforce.com
|
9 |
* Text Domain: astra-sites
|
15 |
* Set constants.
|
16 |
*/
|
17 |
if ( ! defined( 'ASTRA_SITES_VER' ) ) {
|
18 |
+
define( 'ASTRA_SITES_VER', '1.0.8' );
|
19 |
}
|
20 |
|
21 |
if ( ! defined( 'ASTRA_SITES_FILE' ) ) {
|
42 |
* @since 1.0.5
|
43 |
*/
|
44 |
function astra_sites_setup() {
|
45 |
+
require_once ASTRA_SITES_DIR . 'inc/classes/class-astra-sites.php';
|
46 |
}
|
47 |
|
48 |
add_action( 'plugins_loaded', 'astra_sites_setup' );
|
{admin → inc/admin}/class-astra-sites-page.php
RENAMED
@@ -227,7 +227,7 @@ if ( ! class_exists( 'Astra_Sites_Page' ) ) {
|
|
227 |
* @since 1.0.6
|
228 |
*/
|
229 |
static public function general_page() {
|
230 |
-
require_once ASTRA_SITES_DIR . 'admin/view-astra-sites.php';
|
231 |
}
|
232 |
}
|
233 |
|
227 |
* @since 1.0.6
|
228 |
*/
|
229 |
static public function general_page() {
|
230 |
+
require_once ASTRA_SITES_DIR . 'inc/admin/view-astra-sites.php';
|
231 |
}
|
232 |
}
|
233 |
|
{admin → inc/admin}/view-astra-sites.php
RENAMED
@@ -11,8 +11,6 @@ defined( 'ABSPATH' ) or exit;
|
|
11 |
wp_enqueue_script( 'astra-sites-admin' );
|
12 |
wp_enqueue_style( 'astra-sites-admin' );
|
13 |
|
14 |
-
do_action( 'astra_sites_before_site_grid' );
|
15 |
-
|
16 |
/**
|
17 |
* Initial Demo List
|
18 |
*
|
@@ -21,6 +19,7 @@ do_action( 'astra_sites_before_site_grid' );
|
|
21 |
?>
|
22 |
<div class="wrap">
|
23 |
|
|
|
24 |
<div class="wp-filter hide-if-no-js">
|
25 |
|
26 |
<ul class="filter-links">
|
@@ -45,12 +44,16 @@ do_action( 'astra_sites_before_site_grid' );
|
|
45 |
|
46 |
</div>
|
47 |
|
|
|
|
|
48 |
<span class="spinner"></span>
|
49 |
|
50 |
<div class="theme-browser rendered">
|
51 |
<div class="themes wp-clearfix"></div>
|
52 |
</div>
|
53 |
|
|
|
|
|
54 |
</div>
|
55 |
|
56 |
<?php
|
@@ -72,6 +75,7 @@ do_action( 'astra_sites_before_site_grid' );
|
|
72 |
data-content="{{{data.content}}}"
|
73 |
data-required-plugins="{{data.required_plugins}}">
|
74 |
<input type="hidden" class="astra-site-options" value="{{data.astra_site_options}}" >
|
|
|
75 |
|
76 |
<span class="status {{data.status}}">{{data.status}}</span>
|
77 |
|
@@ -116,6 +120,7 @@ do_action( 'astra_sites_before_site_grid' );
|
|
116 |
data-content="{{{data.content}}}"
|
117 |
data-required-plugins="{{data.required_plugins}}">
|
118 |
<input type="hidden" class="astra-site-options" value="{{data.astra_site_options}}" >
|
|
|
119 |
<button class="close-full-overlay"><span class="screen-reader-text"><?php esc_html_e( 'Close', 'astra-sites' ); ?></span></button>
|
120 |
<button class="previous-theme"><span class="screen-reader-text"><?php esc_html_e( 'Previous', 'astra-sites' ); ?></span></button>
|
121 |
<button class="next-theme"><span class="screen-reader-text"><?php esc_html_e( 'Next', 'astra-sites' ); ?></span></button>
|
@@ -179,7 +184,3 @@ do_action( 'astra_sites_before_site_grid' );
|
|
179 |
?>
|
180 |
</div>
|
181 |
</script>
|
182 |
-
|
183 |
-
<?php
|
184 |
-
|
185 |
-
do_action( 'astra_sites_after_site_grid' );
|
11 |
wp_enqueue_script( 'astra-sites-admin' );
|
12 |
wp_enqueue_style( 'astra-sites-admin' );
|
13 |
|
|
|
|
|
14 |
/**
|
15 |
* Initial Demo List
|
16 |
*
|
19 |
?>
|
20 |
<div class="wrap">
|
21 |
|
22 |
+
|
23 |
<div class="wp-filter hide-if-no-js">
|
24 |
|
25 |
<ul class="filter-links">
|
44 |
|
45 |
</div>
|
46 |
|
47 |
+
<?php do_action( 'astra_sites_before_site_grid' ); ?>
|
48 |
+
|
49 |
<span class="spinner"></span>
|
50 |
|
51 |
<div class="theme-browser rendered">
|
52 |
<div class="themes wp-clearfix"></div>
|
53 |
</div>
|
54 |
|
55 |
+
<?php do_action( 'astra_sites_after_site_grid' ); ?>
|
56 |
+
|
57 |
</div>
|
58 |
|
59 |
<?php
|
75 |
data-content="{{{data.content}}}"
|
76 |
data-required-plugins="{{data.required_plugins}}">
|
77 |
<input type="hidden" class="astra-site-options" value="{{data.astra_site_options}}" >
|
78 |
+
<input type="hidden" class="astra-enabled-extensions" value="{{data.astra_enabled_extensions}}" >
|
79 |
|
80 |
<span class="status {{data.status}}">{{data.status}}</span>
|
81 |
|
120 |
data-content="{{{data.content}}}"
|
121 |
data-required-plugins="{{data.required_plugins}}">
|
122 |
<input type="hidden" class="astra-site-options" value="{{data.astra_site_options}}" >
|
123 |
+
<input type="hidden" class="astra-enabled-extensions" value="{{data.astra_enabled_extensions}}" >
|
124 |
<button class="close-full-overlay"><span class="screen-reader-text"><?php esc_html_e( 'Close', 'astra-sites' ); ?></span></button>
|
125 |
<button class="previous-theme"><span class="screen-reader-text"><?php esc_html_e( 'Previous', 'astra-sites' ); ?></span></button>
|
126 |
<button class="next-theme"><span class="screen-reader-text"><?php esc_html_e( 'Next', 'astra-sites' ); ?></span></button>
|
184 |
?>
|
185 |
</div>
|
186 |
</script>
|
|
|
|
|
|
|
|
{assets → inc/assets}/css/admin.css
RENAMED
@@ -60,6 +60,10 @@
|
|
60 |
width: 100%;
|
61 |
}
|
62 |
|
|
|
|
|
|
|
|
|
63 |
/**
|
64 |
* Required Plugins
|
65 |
*/
|
@@ -190,4 +194,11 @@
|
|
190 |
|
191 |
#astra-sites-menu-page {
|
192 |
margin-top: 10px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
}
|
60 |
width: 100%;
|
61 |
}
|
62 |
|
63 |
+
.install-theme-info .demo-type.premium {
|
64 |
+
display: none;
|
65 |
+
}
|
66 |
+
|
67 |
/**
|
68 |
* Required Plugins
|
69 |
*/
|
194 |
|
195 |
#astra-sites-menu-page {
|
196 |
margin-top: 10px;
|
197 |
+
}
|
198 |
+
|
199 |
+
/**
|
200 |
+
* API Error
|
201 |
+
*/
|
202 |
+
.astra-api-error {
|
203 |
+
margin: 0 0 0.5em 0;
|
204 |
}
|
{assets → inc/assets}/js/admin.js
RENAMED
@@ -45,31 +45,47 @@ function initial_load_demos() {
|
|
45 |
*/
|
46 |
function enable_demo_import_button( type = 'free' ) {
|
47 |
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
}
|
|
|
73 |
}
|
74 |
|
75 |
function resetPagedCount() {
|
@@ -232,6 +248,7 @@ jQuery(document).on( 'wp-plugin-install-success', function( event, response ) {
|
|
232 |
|
233 |
var $message = jQuery( '.plugin-card-' + response.slug ).find( '.install-now' );
|
234 |
var $siteOptions = jQuery( '.wp-full-overlay-header').find('.astra-site-options').val();
|
|
|
235 |
|
236 |
// Transform the 'Install' button into an 'Activate' button.
|
237 |
var $init = $message.data('init');
|
@@ -250,6 +267,7 @@ jQuery(document).on( 'wp-plugin-install-success', function( event, response ) {
|
|
250 |
'action' : 'astra-required-plugin-activate',
|
251 |
'init' : $init,
|
252 |
'options' : $siteOptions,
|
|
|
253 |
},
|
254 |
})
|
255 |
.done(function (result) {
|
@@ -260,13 +278,18 @@ jQuery(document).on( 'wp-plugin-install-success', function( event, response ) {
|
|
260 |
.addClass('disabled')
|
261 |
.text( astraDemo.strings.btnActive );
|
262 |
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
});
|
268 |
|
269 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
270 |
|
271 |
});
|
272 |
|
@@ -291,7 +314,8 @@ jQuery(document).on('click', '.activate-now', function (event) {
|
|
291 |
$button.addClass('updating-message button-primary')
|
292 |
.html( astraDemo.strings.btnActivating );
|
293 |
|
294 |
-
var siteOptions = jQuery( '.wp-full-overlay-header').find('.astra-site-options').val();
|
|
|
295 |
|
296 |
jQuery.ajax({
|
297 |
url: astraDemo.ajaxurl,
|
@@ -299,7 +323,8 @@ jQuery(document).on('click', '.activate-now', function (event) {
|
|
299 |
data: {
|
300 |
'action' : 'astra-required-plugin-activate',
|
301 |
'init' : $init,
|
302 |
-
'options' : siteOptions,
|
|
|
303 |
},
|
304 |
})
|
305 |
.done(function (result) {
|
@@ -333,20 +358,22 @@ function renderDemoPreview(anchor) {
|
|
333 |
content = anchor.data('content') || '',
|
334 |
requiredPlugins = anchor.data('required-plugins') || '',
|
335 |
astraSiteOptions = anchor.find('.astra-site-options').val() || '';
|
|
|
336 |
|
337 |
var template = wp.template('astra-demo-preview');
|
338 |
|
339 |
templateData = [{
|
340 |
-
id
|
341 |
-
astra_demo_type
|
342 |
-
astra_demo_url
|
343 |
-
demo_api
|
344 |
-
screenshot
|
345 |
-
demo_name
|
346 |
-
slug
|
347 |
-
content
|
348 |
-
requiredPlugins
|
349 |
-
astra_site_options
|
|
|
350 |
}];
|
351 |
|
352 |
// Initial set count.
|
@@ -363,35 +390,35 @@ function renderDemoPreview(anchor) {
|
|
363 |
var descHeight = parseInt( desc.outerHeight() );
|
364 |
var descBtn = jQuery('.theme-details-read-more');
|
365 |
|
366 |
-
if(
|
367 |
|
368 |
-
|
369 |
-
descBtn.css( 'display', 'inline-block' );
|
370 |
|
371 |
-
|
372 |
-
|
373 |
|
374 |
-
|
375 |
-
|
376 |
|
377 |
-
|
378 |
-
|
379 |
-
300, function() {
|
380 |
-
descBtn.removeClass('open');
|
381 |
-
descBtn.html( astraDemo.strings.DescExpand );
|
382 |
-
});
|
383 |
-
} else {
|
384 |
-
desc.animate({ height: descHeight },
|
385 |
-
300, function() {
|
386 |
-
descBtn.addClass('open');
|
387 |
-
descBtn.html( astraDemo.strings.DescCollapse );
|
388 |
-
});
|
389 |
-
}
|
390 |
|
391 |
-
|
392 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
393 |
|
394 |
-
|
|
|
395 |
|
396 |
// or
|
397 |
var $pluginsFilter = jQuery( '#plugin-filter' ),
|
@@ -507,6 +534,7 @@ function renderDemoPreview(anchor) {
|
|
507 |
} else {
|
508 |
|
509 |
// Enable Demo Import Button
|
|
|
510 |
enable_demo_import_button( demoType );
|
511 |
jQuery('.required-plugins-wrap').remove();
|
512 |
}
|
@@ -643,6 +671,7 @@ function renderDemoGrid(demos) {
|
|
643 |
requiredPlugins = demo.required_plugins;
|
644 |
status = demo.status;
|
645 |
astraSiteOptions = demo.astra_site_options || '';
|
|
|
646 |
|
647 |
templateData = [{
|
648 |
id: id,
|
@@ -655,7 +684,8 @@ function renderDemoGrid(demos) {
|
|
655 |
slug: demo_slug,
|
656 |
content: content,
|
657 |
required_plugins: requiredPlugins,
|
658 |
-
astra_site_options: astraSiteOptions
|
|
|
659 |
}]
|
660 |
|
661 |
var template = wp.template('astra-single-demo');
|
@@ -714,6 +744,7 @@ jQuery(document).on('click', '.astra-demo-import', function (event) {
|
|
714 |
|
715 |
var apiURL = $theme.data('demo-api') || '';
|
716 |
|
|
|
717 |
jQuery.ajax({
|
718 |
url: astraDemo.ajaxurl,
|
719 |
type: 'POST',
|
@@ -725,6 +756,7 @@ jQuery(document).on('click', '.astra-demo-import', function (event) {
|
|
725 |
})
|
726 |
.done(function ( demos ) {
|
727 |
|
|
|
728 |
if( demos.success ) {
|
729 |
jQuery('.astra-demo-import').removeClass('updating-message installing')
|
730 |
.removeAttr('data-import')
|
@@ -734,6 +766,21 @@ jQuery(document).on('click', '.astra-demo-import', function (event) {
|
|
734 |
.attr('target', '_blank')
|
735 |
.append('<i class="dashicons dashicons-external"></i>')
|
736 |
.attr('href', astraDemo.siteURL );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
737 |
}
|
738 |
|
739 |
})
|
45 |
*/
|
46 |
function enable_demo_import_button( type = 'free' ) {
|
47 |
|
48 |
+
switch( type ) {
|
49 |
+
|
50 |
+
case 'free':
|
51 |
+
// Get initial required plugins count.
|
52 |
+
var remaining = parseInt( astraDemo.requiredPluginsCount ) || 0;
|
53 |
+
|
54 |
+
// Enable demo import button.
|
55 |
+
if( 0 >= remaining ) {
|
56 |
+
|
57 |
+
jQuery('.astra-demo-import')
|
58 |
+
.removeAttr('data-import')
|
59 |
+
.addClass('button-primary')
|
60 |
+
.text( astraDemo.strings.importDemo );
|
61 |
+
}
|
62 |
+
break;
|
63 |
+
|
64 |
+
case 'upgrade':
|
65 |
+
var demo_slug = jQuery('.wp-full-overlay-header').attr('data-demo-slug');
|
66 |
+
|
67 |
+
jQuery('.astra-demo-import')
|
68 |
+
.addClass('go-pro button-primary')
|
69 |
+
.removeClass('astra-demo-import')
|
70 |
+
.attr('target', '_blank')
|
71 |
+
.attr('href', astraDemo.getUpgradeURL + demo_slug )
|
72 |
+
.text( astraDemo.getUpgradeText )
|
73 |
+
.append('<i class="dashicons dashicons-external"></i>');
|
74 |
+
break;
|
75 |
+
|
76 |
+
default:
|
77 |
+
var demo_slug = jQuery('.wp-full-overlay-header').attr('data-demo-slug');
|
78 |
+
|
79 |
+
jQuery('.astra-demo-import')
|
80 |
+
.addClass('go-pro button-primary')
|
81 |
+
.removeClass('astra-demo-import')
|
82 |
+
.attr('target', '_blank')
|
83 |
+
.attr('href', astraDemo.getProURL )
|
84 |
+
.text( astraDemo.getProText )
|
85 |
+
.append('<i class="dashicons dashicons-external"></i>');
|
86 |
+
break;
|
87 |
}
|
88 |
+
|
89 |
}
|
90 |
|
91 |
function resetPagedCount() {
|
248 |
|
249 |
var $message = jQuery( '.plugin-card-' + response.slug ).find( '.install-now' );
|
250 |
var $siteOptions = jQuery( '.wp-full-overlay-header').find('.astra-site-options').val();
|
251 |
+
var $enabledExtensions = jQuery( '.wp-full-overlay-header').find('.astra-enabled-extensions').val();
|
252 |
|
253 |
// Transform the 'Install' button into an 'Activate' button.
|
254 |
var $init = $message.data('init');
|
267 |
'action' : 'astra-required-plugin-activate',
|
268 |
'init' : $init,
|
269 |
'options' : $siteOptions,
|
270 |
+
'enabledExtensions' : $enabledExtensions,
|
271 |
},
|
272 |
})
|
273 |
.done(function (result) {
|
278 |
.addClass('disabled')
|
279 |
.text( astraDemo.strings.btnActive );
|
280 |
|
281 |
+
// Enable Demo Import Button
|
282 |
+
astraDemo.requiredPluginsCount--;
|
283 |
+
enable_demo_import_button();
|
284 |
+
} else {
|
|
|
285 |
|
286 |
+
$message.removeClass( 'updating-message' );
|
287 |
+
|
288 |
+
}
|
289 |
+
|
290 |
+
});
|
291 |
+
|
292 |
+
}, 1200 );
|
293 |
|
294 |
});
|
295 |
|
314 |
$button.addClass('updating-message button-primary')
|
315 |
.html( astraDemo.strings.btnActivating );
|
316 |
|
317 |
+
var $siteOptions = jQuery( '.wp-full-overlay-header').find('.astra-site-options').val();
|
318 |
+
var $enabledExtensions = jQuery( '.wp-full-overlay-header').find('.astra-enabled-extensions').val();
|
319 |
|
320 |
jQuery.ajax({
|
321 |
url: astraDemo.ajaxurl,
|
323 |
data: {
|
324 |
'action' : 'astra-required-plugin-activate',
|
325 |
'init' : $init,
|
326 |
+
'options' : $siteOptions,
|
327 |
+
'enabledExtensions' : $enabledExtensions,
|
328 |
},
|
329 |
})
|
330 |
.done(function (result) {
|
358 |
content = anchor.data('content') || '',
|
359 |
requiredPlugins = anchor.data('required-plugins') || '',
|
360 |
astraSiteOptions = anchor.find('.astra-site-options').val() || '';
|
361 |
+
astraEnabledExtensions = anchor.find('.astra-enabled-extensions').val() || '';
|
362 |
|
363 |
var template = wp.template('astra-demo-preview');
|
364 |
|
365 |
templateData = [{
|
366 |
+
id : demoId,
|
367 |
+
astra_demo_type : demoType,
|
368 |
+
astra_demo_url : demoURL,
|
369 |
+
demo_api : apiURL,
|
370 |
+
screenshot : screenshot,
|
371 |
+
demo_name : demo_name,
|
372 |
+
slug : demo_slug,
|
373 |
+
content : content,
|
374 |
+
requiredPlugins : requiredPlugins,
|
375 |
+
astra_site_options : astraSiteOptions,
|
376 |
+
astra_enabled_extensions : astraEnabledExtensions,
|
377 |
}];
|
378 |
|
379 |
// Initial set count.
|
390 |
var descHeight = parseInt( desc.outerHeight() );
|
391 |
var descBtn = jQuery('.theme-details-read-more');
|
392 |
|
393 |
+
if( jQuery.isArray( requiredPlugins ) ) {
|
394 |
|
395 |
+
if( descHeight >= 55 ) {
|
|
|
396 |
|
397 |
+
// Show button.
|
398 |
+
descBtn.css( 'display', 'inline-block' );
|
399 |
|
400 |
+
// Set height upto 3 line.
|
401 |
+
desc.css( 'height', 57 );
|
402 |
|
403 |
+
// Button Click.
|
404 |
+
descBtn.click(function(event) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
405 |
|
406 |
+
if( descBtn.hasClass('open') ) {
|
407 |
+
desc.animate({ height: 57 },
|
408 |
+
300, function() {
|
409 |
+
descBtn.removeClass('open');
|
410 |
+
descBtn.html( astraDemo.strings.DescExpand );
|
411 |
+
});
|
412 |
+
} else {
|
413 |
+
desc.animate({ height: descHeight },
|
414 |
+
300, function() {
|
415 |
+
descBtn.addClass('open');
|
416 |
+
descBtn.html( astraDemo.strings.DescCollapse );
|
417 |
+
});
|
418 |
+
}
|
419 |
|
420 |
+
});
|
421 |
+
}
|
422 |
|
423 |
// or
|
424 |
var $pluginsFilter = jQuery( '#plugin-filter' ),
|
534 |
} else {
|
535 |
|
536 |
// Enable Demo Import Button
|
537 |
+
astraDemo.requiredPluginsCount = requiredPlugins.length;
|
538 |
enable_demo_import_button( demoType );
|
539 |
jQuery('.required-plugins-wrap').remove();
|
540 |
}
|
671 |
requiredPlugins = demo.required_plugins;
|
672 |
status = demo.status;
|
673 |
astraSiteOptions = demo.astra_site_options || '';
|
674 |
+
astraEnabledExtensions = demo.astra_enabled_extensions || '';
|
675 |
|
676 |
templateData = [{
|
677 |
id: id,
|
684 |
slug: demo_slug,
|
685 |
content: content,
|
686 |
required_plugins: requiredPlugins,
|
687 |
+
astra_site_options: astraSiteOptions,
|
688 |
+
astra_enabled_extensions: astraEnabledExtensions
|
689 |
}]
|
690 |
|
691 |
var template = wp.template('astra-single-demo');
|
744 |
|
745 |
var apiURL = $theme.data('demo-api') || '';
|
746 |
|
747 |
+
|
748 |
jQuery.ajax({
|
749 |
url: astraDemo.ajaxurl,
|
750 |
type: 'POST',
|
756 |
})
|
757 |
.done(function ( demos ) {
|
758 |
|
759 |
+
// Success?
|
760 |
if( demos.success ) {
|
761 |
jQuery('.astra-demo-import').removeClass('updating-message installing')
|
762 |
.removeAttr('data-import')
|
766 |
.attr('target', '_blank')
|
767 |
.append('<i class="dashicons dashicons-external"></i>')
|
768 |
.attr('href', astraDemo.siteURL );
|
769 |
+
|
770 |
+
} else {
|
771 |
+
|
772 |
+
var output = '<div class="astra-api-error notice notice-error notice-alt is-dismissible">';
|
773 |
+
output += ' <p>'+demos.message+'</p>';
|
774 |
+
output += ' <button type="button" class="notice-dismiss">';
|
775 |
+
output += ' <span class="screen-reader-text">'+commonL10n.dismiss+'</span>';
|
776 |
+
output += ' </button>';
|
777 |
+
output += '</div>';
|
778 |
+
|
779 |
+
jQuery('.install-theme-info').prepend( output );
|
780 |
+
|
781 |
+
// !important to add trigger.
|
782 |
+
// Which reinitialize the dismiss error message events.
|
783 |
+
jQuery(document).trigger('wp-updates-notice-added');
|
784 |
}
|
785 |
|
786 |
})
|
inc/assets/js/astra-sites-notices.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(document).ready(function ($) {
|
2 |
+
|
3 |
+
jQuery( '.astra-notice.is-dismissible' ).on( 'click', function() {
|
4 |
+
var $id = jQuery( this ).attr( 'id' ) || '';
|
5 |
+
var $time = jQuery( this ).attr( 'dismissible-time' ) || '';
|
6 |
+
var $meta = jQuery( this ).attr( 'dismissible-meta' ) || '';
|
7 |
+
|
8 |
+
jQuery.ajax({
|
9 |
+
url: ajaxurl,
|
10 |
+
type: 'POST',
|
11 |
+
data: {
|
12 |
+
action : 'astra-notices',
|
13 |
+
id : $id,
|
14 |
+
meta : $meta,
|
15 |
+
time : $time,
|
16 |
+
},
|
17 |
+
});
|
18 |
+
|
19 |
+
});
|
20 |
+
|
21 |
+
});
|
inc/classes/class-astra-sites-notices.php
ADDED
@@ -0,0 +1,211 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Astra Sites Notices
|
4 |
+
*
|
5 |
+
* @package Astra Sites
|
6 |
+
* @since 1.0.8
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! class_exists( 'Astra_Sites_Notices' ) ) :
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Astra_Sites_Notices
|
13 |
+
*
|
14 |
+
* @since 1.0.8
|
15 |
+
*/
|
16 |
+
class Astra_Sites_Notices {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Notices
|
20 |
+
*
|
21 |
+
* @access private
|
22 |
+
* @var array Notices.
|
23 |
+
* @since 1.0.8
|
24 |
+
*/
|
25 |
+
private static $notices = array();
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Instance
|
29 |
+
*
|
30 |
+
* @access private
|
31 |
+
* @var object Class object.
|
32 |
+
* @since 1.0.8
|
33 |
+
*/
|
34 |
+
private static $instance;
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Initiator
|
38 |
+
*
|
39 |
+
* @since 1.0.8
|
40 |
+
* @return object initialized object of class.
|
41 |
+
*/
|
42 |
+
public static function set_instance() {
|
43 |
+
if ( ! isset( self::$instance ) ) {
|
44 |
+
self::$instance = new self;
|
45 |
+
}
|
46 |
+
return self::$instance;
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Constructor
|
51 |
+
*
|
52 |
+
* @since 1.0.8
|
53 |
+
*/
|
54 |
+
public function __construct() {
|
55 |
+
|
56 |
+
add_action( 'admin_notices', array( $this, 'show_notices' ) );
|
57 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
58 |
+
add_action( 'wp_ajax_astra-notices', array( $this, 'dismiss' ) );
|
59 |
+
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Add Notice.
|
64 |
+
*
|
65 |
+
* @since 1.0.8
|
66 |
+
* @param array $args Notice arguments.
|
67 |
+
* @return void
|
68 |
+
*/
|
69 |
+
public static function add_notice( $args = array() ) {
|
70 |
+
if ( is_array( $args ) ) {
|
71 |
+
self::$notices[] = $args;
|
72 |
+
}
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Dismiss Notice.
|
77 |
+
*
|
78 |
+
* @since 1.0.8
|
79 |
+
* @return void
|
80 |
+
*/
|
81 |
+
function dismiss() {
|
82 |
+
|
83 |
+
$id = ( isset( $_POST['id'] ) ) ? $_POST['id'] : '';
|
84 |
+
$time = ( isset( $_POST['time'] ) ) ? $_POST['time'] : '';
|
85 |
+
$meta = ( isset( $_POST['meta'] ) ) ? $_POST['meta'] : '';
|
86 |
+
|
87 |
+
// Valid inputs?
|
88 |
+
if ( ! empty( $id ) ) {
|
89 |
+
|
90 |
+
if ( 'user' === $meta ) {
|
91 |
+
update_user_meta( get_current_user_id(), $id, true );
|
92 |
+
} else {
|
93 |
+
set_transient( $id, true, $time );
|
94 |
+
}
|
95 |
+
|
96 |
+
wp_send_json_success();
|
97 |
+
}
|
98 |
+
|
99 |
+
wp_send_json_error();
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Enqueue Scripts.
|
104 |
+
*
|
105 |
+
* @since 1.0.8
|
106 |
+
* @return void
|
107 |
+
*/
|
108 |
+
function enqueue_scripts() {
|
109 |
+
wp_register_script( 'astra-sites-notices', ASTRA_SITES_URI . 'inc/assets/js/astra-sites-notices.js', array( 'jquery' ), ASTRA_SITES_VER, true );
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Notice Types
|
114 |
+
*
|
115 |
+
* @since 1.0.8
|
116 |
+
* @return void
|
117 |
+
*/
|
118 |
+
function show_notices() {
|
119 |
+
|
120 |
+
$defaults = array(
|
121 |
+
'type' => 'info',
|
122 |
+
'show_if' => true,
|
123 |
+
'message' => '',
|
124 |
+
'class' => 'ast-active-notice',
|
125 |
+
|
126 |
+
'dismissible' => false,
|
127 |
+
'dismissible-meta' => 'user',
|
128 |
+
'dismissible-time' => MINUTE_IN_SECONDS,
|
129 |
+
|
130 |
+
'data' => '',
|
131 |
+
);
|
132 |
+
|
133 |
+
foreach ( self::$notices as $key => $notice ) {
|
134 |
+
|
135 |
+
$notice = wp_parse_args( $notice, $defaults );
|
136 |
+
|
137 |
+
$classes = array( 'astra-notice', 'notice' );
|
138 |
+
|
139 |
+
$classes[] = $notice['class'];
|
140 |
+
if ( isset( $notice['type'] ) ) {
|
141 |
+
$classes[] = 'notice-' . $notice['type'];
|
142 |
+
}
|
143 |
+
|
144 |
+
// Is notice dismissible?
|
145 |
+
if ( true === $notice['dismissible'] ) {
|
146 |
+
$classes[] = 'is-dismissible';
|
147 |
+
|
148 |
+
// Dismissable time.
|
149 |
+
$notice['data'] = ' dismissible-time=' . esc_attr( $notice['dismissible-time'] ) . ' ';
|
150 |
+
}
|
151 |
+
|
152 |
+
// Notice ID.
|
153 |
+
$notice_id = 'astra-sites-notices-id-' . $key;
|
154 |
+
$notice['id'] = $notice_id;
|
155 |
+
$notice['classes'] = implode( ' ', $classes );
|
156 |
+
|
157 |
+
// User meta.
|
158 |
+
$notice['data'] = ' dismissible-meta=' . esc_attr( $notice['dismissible-meta'] ) . ' ';
|
159 |
+
if ( 'user' === $notice['dismissible-meta'] ) {
|
160 |
+
$expired = get_user_meta( get_current_user_id(), $notice_id, true );
|
161 |
+
} else {
|
162 |
+
$expired = get_transient( $notice_id );
|
163 |
+
}
|
164 |
+
|
165 |
+
// Notices visible after transient expire.
|
166 |
+
if ( isset( $notice['show_if'] ) ) {
|
167 |
+
|
168 |
+
if ( true === $notice['show_if'] ) {
|
169 |
+
|
170 |
+
// Is transient expired?
|
171 |
+
if ( false === $expired || empty( $expired ) ) {
|
172 |
+
self::markup( $notice );
|
173 |
+
}
|
174 |
+
}
|
175 |
+
} else {
|
176 |
+
|
177 |
+
// No transient notices.
|
178 |
+
self::markup( $notice );
|
179 |
+
}
|
180 |
+
}
|
181 |
+
|
182 |
+
}
|
183 |
+
|
184 |
+
/**
|
185 |
+
* Markup Notice.
|
186 |
+
*
|
187 |
+
* @since 1.0.8
|
188 |
+
* @param array $notice Notice markup.
|
189 |
+
* @return void
|
190 |
+
*/
|
191 |
+
public static function markup( $notice = array() ) {
|
192 |
+
|
193 |
+
wp_enqueue_script( 'astra-sites-notices' );
|
194 |
+
|
195 |
+
?>
|
196 |
+
<div id="<?php echo esc_attr( $notice['id'] ); ?>" class="<?php echo esc_attr( $notice['classes'] ); ?>" <?php echo $notice['data']; ?>>
|
197 |
+
<p>
|
198 |
+
<?php echo $notice['message']; ?>
|
199 |
+
</p>
|
200 |
+
</div>
|
201 |
+
<?php
|
202 |
+
}
|
203 |
+
|
204 |
+
}
|
205 |
+
|
206 |
+
/**
|
207 |
+
* Kicking this off by calling 'set_instance()' method
|
208 |
+
*/
|
209 |
+
Astra_Sites_Notices::set_instance();
|
210 |
+
|
211 |
+
endif;
|
{classes → inc/classes}/class-astra-sites.php
RENAMED
@@ -53,18 +53,37 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
|
|
53 |
*/
|
54 |
private function __construct() {
|
55 |
|
56 |
-
add_action( 'admin_notices', array( $this, 'admin_notices' ) );
|
57 |
-
|
58 |
self::set_api_url();
|
59 |
|
60 |
$this->includes();
|
61 |
|
|
|
|
|
|
|
62 |
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue' ) );
|
63 |
add_action( 'wp_ajax_astra-import-demo', array( $this, 'demo_ajax_import' ) );
|
64 |
add_action( 'wp_ajax_astra-list-sites', array( $this, 'list_demos' ) );
|
65 |
add_action( 'wp_ajax_astra-required-plugins', array( $this, 'required_plugin' ) );
|
66 |
add_action( 'wp_ajax_astra-required-plugin-activate', array( $this, 'required_plugin_activate' ) );
|
67 |
add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
}
|
69 |
|
70 |
/**
|
@@ -79,25 +98,12 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
|
|
79 |
/**
|
80 |
* Admin Notices
|
81 |
*
|
82 |
-
* @since 1.0.
|
83 |
* @return void
|
84 |
*/
|
85 |
function admin_notices() {
|
86 |
|
87 |
if ( ! defined( 'ASTRA_THEME_SETTINGS' ) ) {
|
88 |
-
?>
|
89 |
-
<div class="notice notice-error ast-active-notice is-dismissible">
|
90 |
-
<p>
|
91 |
-
<?php
|
92 |
-
printf(
|
93 |
-
/* translators: 1: theme.php file*/
|
94 |
-
__( 'Astra Theme needs to be active for you to use currently installed "Astra Sites" plugin. <a href="%1$s">Install & Activate Now</a>', 'astra-sites' ),
|
95 |
-
esc_url( admin_url( 'themes.php?theme=astra' ) )
|
96 |
-
);
|
97 |
-
?>
|
98 |
-
</p>
|
99 |
-
</div>
|
100 |
-
<?php
|
101 |
return;
|
102 |
}
|
103 |
|
@@ -190,44 +196,48 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
|
|
190 |
* @param string $hook Current hook name.
|
191 |
* @return void
|
192 |
*/
|
193 |
-
public function admin_enqueue( $hook ) {
|
194 |
|
195 |
if ( 'appearance_page_astra-sites' !== $hook ) {
|
196 |
return;
|
197 |
}
|
198 |
|
199 |
wp_register_script(
|
200 |
-
'astra-sites-admin', ASTRA_SITES_URI . 'assets/js/admin.js', array(
|
201 |
'jquery',
|
202 |
'wp-util',
|
203 |
'updates',
|
204 |
), ASTRA_SITES_VER, true
|
205 |
);
|
206 |
|
207 |
-
wp_register_style( 'astra-sites-admin', ASTRA_SITES_URI . 'assets/css/admin.css', ASTRA_SITES_VER, true );
|
208 |
|
209 |
wp_localize_script(
|
210 |
-
'astra-sites-admin', 'astraDemo',
|
211 |
-
'
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
'
|
219 |
-
'
|
220 |
-
'
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
|
|
|
|
|
|
|
|
231 |
)
|
232 |
);
|
233 |
|
@@ -240,15 +250,18 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
|
|
240 |
*/
|
241 |
private function includes() {
|
242 |
|
243 |
-
require_once ASTRA_SITES_DIR . '
|
244 |
-
|
|
|
|
|
|
|
245 |
|
246 |
// Load the Importers.
|
247 |
-
require_once ASTRA_SITES_DIR . 'importers/class-astra-sites-helper.php';
|
248 |
-
require_once ASTRA_SITES_DIR . 'importers/class-widgets-importer.php';
|
249 |
-
require_once ASTRA_SITES_DIR . 'importers/class-astra-customizer-import.php';
|
250 |
-
require_once ASTRA_SITES_DIR . 'importers/wxr-importer/class-astra-wxr-importer.php';
|
251 |
-
require_once ASTRA_SITES_DIR . 'importers/class-astra-site-options-import.php';
|
252 |
}
|
253 |
|
254 |
/**
|
@@ -267,9 +280,13 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
|
|
267 |
);
|
268 |
}
|
269 |
|
|
|
270 |
$plugin_init = ( isset( $_POST['init'] ) ) ? esc_attr( $_POST['init'] ) : '';
|
271 |
$astra_site_options = ( isset( $_POST['options'] ) ) ? json_decode( stripslashes( $_POST['options'] ) ) : '';
|
272 |
-
$
|
|
|
|
|
|
|
273 |
|
274 |
$activate = activate_plugin( $plugin_init, '', false, true );
|
275 |
|
@@ -282,7 +299,7 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
|
|
282 |
);
|
283 |
}
|
284 |
|
285 |
-
do_action( 'astra_sites_after_plugin_activation', $plugin_init, $
|
286 |
|
287 |
wp_send_json_success(
|
288 |
array(
|
@@ -410,14 +427,23 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
|
|
410 |
*/
|
411 |
public function demo_ajax_import() {
|
412 |
|
|
|
|
|
|
|
|
|
|
|
413 |
if ( ! current_user_can( 'customize' ) ) {
|
414 |
-
|
|
|
415 |
}
|
416 |
|
417 |
$demo_api_uri = isset( $_POST['api_url'] ) ? esc_url( $_POST['api_url'] ) : '';
|
418 |
$this->import_demo( $demo_api_uri );
|
419 |
|
420 |
-
|
|
|
|
|
|
|
421 |
}
|
422 |
|
423 |
/**
|
@@ -469,6 +495,7 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
|
|
469 |
|
470 |
// Import Widgets data.
|
471 |
$this->import_widgets( $demo_data['astra-site-widgets-data'] );
|
|
|
472 |
}
|
473 |
|
474 |
/**
|
@@ -534,8 +561,8 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
|
|
534 |
* @param (Array) $saved_extensions Array of enabled extensions.
|
535 |
*/
|
536 |
private function import_astra_enabled_extension( $saved_extensions ) {
|
537 |
-
if ( is_callable( '
|
538 |
-
|
539 |
}
|
540 |
}
|
541 |
|
@@ -547,8 +574,8 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
|
|
547 |
* @param (Array) $options_404 404 Extensions settings from the demo.
|
548 |
*/
|
549 |
private function import_custom_404_extension_options( $options_404 ) {
|
550 |
-
if ( is_callable( '
|
551 |
-
|
552 |
}
|
553 |
}
|
554 |
|
@@ -582,6 +609,17 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
|
|
582 |
)
|
583 |
);
|
584 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
585 |
$response = wp_remote_get( $demo_api_uri, $api_args );
|
586 |
|
587 |
if ( ! is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) === 200 ) {
|
@@ -648,8 +686,17 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
|
|
648 |
$astra_demos[ $key ]['featured_image_url'] = isset( $demo['featured-image-url'] ) ? esc_url( $demo['featured-image-url'] ) : '';
|
649 |
$astra_demos[ $key ]['demo_api'] = isset( $demo['_links']['self'][0]['href'] ) ? esc_url( $demo['_links']['self'][0]['href'] ) : self::get_api_url( new stdClass() ) . $demo['id'];
|
650 |
$astra_demos[ $key ]['content'] = isset( $demo['content']['rendered'] ) ? strip_tags( $demo['content']['rendered'] ) : '';
|
651 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
652 |
$astra_demos[ $key ]['astra_site_options'] = isset( $demo['astra-site-options-data'] ) ? json_encode( $demo['astra-site-options-data'] ) : '';
|
|
|
653 |
|
654 |
$demo_status = isset( $demo['status'] ) ? sanitize_key( $demo['status'] ) : '';
|
655 |
$astra_demos[ $key ]['status'] = ( 'draft' === $demo_status ) ? 'beta' : $demo_status;
|
53 |
*/
|
54 |
private function __construct() {
|
55 |
|
|
|
|
|
56 |
self::set_api_url();
|
57 |
|
58 |
$this->includes();
|
59 |
|
60 |
+
add_action( 'admin_notices', array( $this, 'add_notice' ), 1 );
|
61 |
+
add_action( 'admin_notices', array( $this, 'admin_notices' ) );
|
62 |
+
|
63 |
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue' ) );
|
64 |
add_action( 'wp_ajax_astra-import-demo', array( $this, 'demo_ajax_import' ) );
|
65 |
add_action( 'wp_ajax_astra-list-sites', array( $this, 'list_demos' ) );
|
66 |
add_action( 'wp_ajax_astra-required-plugins', array( $this, 'required_plugin' ) );
|
67 |
add_action( 'wp_ajax_astra-required-plugin-activate', array( $this, 'required_plugin_activate' ) );
|
68 |
add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
|
69 |
+
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Add Admin Notice.
|
74 |
+
*/
|
75 |
+
function add_notice() {
|
76 |
+
|
77 |
+
Astra_Sites_Notices::add_notice(
|
78 |
+
array(
|
79 |
+
'type' => 'error',
|
80 |
+
'show_if' => ( ! defined( 'ASTRA_THEME_SETTINGS' ) ) ? true : false,
|
81 |
+
/* translators: 1: theme.php file*/
|
82 |
+
'message' => sprintf( __( 'Astra Theme needs to be active for you to use currently installed "Astra Sites" plugin. <a href="%1$s">Install & Activate Now</a>', 'astra-sites' ), esc_url( admin_url( 'themes.php?theme=astra' ) ) ),
|
83 |
+
'dismissible' => true,
|
84 |
+
'dismissible-time' => MINUTE_IN_SECONDS,
|
85 |
+
)
|
86 |
+
);
|
87 |
}
|
88 |
|
89 |
/**
|
98 |
/**
|
99 |
* Admin Notices
|
100 |
*
|
101 |
+
* @since 1.0.5
|
102 |
* @return void
|
103 |
*/
|
104 |
function admin_notices() {
|
105 |
|
106 |
if ( ! defined( 'ASTRA_THEME_SETTINGS' ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
return;
|
108 |
}
|
109 |
|
196 |
* @param string $hook Current hook name.
|
197 |
* @return void
|
198 |
*/
|
199 |
+
public function admin_enqueue( $hook = '' ) {
|
200 |
|
201 |
if ( 'appearance_page_astra-sites' !== $hook ) {
|
202 |
return;
|
203 |
}
|
204 |
|
205 |
wp_register_script(
|
206 |
+
'astra-sites-admin', ASTRA_SITES_URI . 'inc/assets/js/admin.js', array(
|
207 |
'jquery',
|
208 |
'wp-util',
|
209 |
'updates',
|
210 |
), ASTRA_SITES_VER, true
|
211 |
);
|
212 |
|
213 |
+
wp_register_style( 'astra-sites-admin', ASTRA_SITES_URI . 'inc/assets/css/admin.css', ASTRA_SITES_VER, true );
|
214 |
|
215 |
wp_localize_script(
|
216 |
+
'astra-sites-admin', 'astraDemo', apply_filters(
|
217 |
+
'astra_sites_localize_vars', array(
|
218 |
+
'ajaxurl' => esc_url( admin_url( 'admin-ajax.php' ) ),
|
219 |
+
'siteURL' => site_url(),
|
220 |
+
'getProText' => __( 'Purchase', 'astra-sites' ),
|
221 |
+
'getProURL' => esc_url( 'https://wpastra.com/pro/?utm_source=demo-import-panel&utm_campaign=astra-sites&utm_medium=' ),
|
222 |
+
'getUpgradeText' => __( 'Upgrade', 'astra-sites' ),
|
223 |
+
'getUpgradeURL' => esc_url( 'https://wpastra.com/pro/?utm_source=demo-import-panel&utm_campaign=astra-sites&utm_medium=' ),
|
224 |
+
'_ajax_nonce' => wp_create_nonce( 'astra-sites' ),
|
225 |
+
'requiredPluginsCount' => 0,
|
226 |
+
'strings' => array(
|
227 |
+
'importFailedBtnSmall' => __( 'Error!', 'astra-sites' ),
|
228 |
+
'importFailedBtnLarge' => __( 'Error! Read Possibilities.', 'astra-sites' ),
|
229 |
+
'importFailedURL' => esc_url( 'https://wpastra.com/docs/?p=1314' ),
|
230 |
+
'viewSite' => __( 'Done! View Site', 'astra-sites' ),
|
231 |
+
'btnActivating' => __( 'Activating', 'astra-sites' ) . '…',
|
232 |
+
'btnActive' => __( 'Active', 'astra-sites' ),
|
233 |
+
'importDemo' => __( 'Import This Site', 'astra-sites' ),
|
234 |
+
'DescExpand' => __( 'Read more', 'astra-sites' ) . '…',
|
235 |
+
'DescCollapse' => __( 'Hide', 'astra-sites' ),
|
236 |
+
'responseError' => __( 'There was a problem receiving a response from server.', 'astra-sites' ),
|
237 |
+
'searchNoFound' => __( 'No Demos found, Try a different search.', 'astra-sites' ),
|
238 |
+
'importWarning' => __( "Executing Demo Import will make your site similar as ours. Please bear in mind -\n\n1. It is recommended to run import on a fresh WordPress installation.\n\n2. Importing site does not delete any pages or posts. However, it can overwrite your existing content.\n\n3. Copyrighted media will not be imported. Instead it will be replaced with placeholders.", 'astra-sites' ),
|
239 |
+
),
|
240 |
+
)
|
241 |
)
|
242 |
);
|
243 |
|
250 |
*/
|
251 |
private function includes() {
|
252 |
|
253 |
+
require_once ASTRA_SITES_DIR . 'inc/classes/class-astra-sites-notices.php';
|
254 |
+
|
255 |
+
require_once ASTRA_SITES_DIR . 'inc/admin/class-astra-sites-page.php';
|
256 |
+
require_once ASTRA_SITES_DIR . 'inc/classes/compatibility/class-astra-sites-compatibility-so-widgets.php';
|
257 |
+
require_once ASTRA_SITES_DIR . 'inc/classes/compatibility/class-astra-sites-compatibility-astra-pro.php';
|
258 |
|
259 |
// Load the Importers.
|
260 |
+
require_once ASTRA_SITES_DIR . 'inc/importers/class-astra-sites-helper.php';
|
261 |
+
require_once ASTRA_SITES_DIR . 'inc/importers/class-widgets-importer.php';
|
262 |
+
require_once ASTRA_SITES_DIR . 'inc/importers/class-astra-customizer-import.php';
|
263 |
+
require_once ASTRA_SITES_DIR . 'inc/importers/wxr-importer/class-astra-wxr-importer.php';
|
264 |
+
require_once ASTRA_SITES_DIR . 'inc/importers/class-astra-site-options-import.php';
|
265 |
}
|
266 |
|
267 |
/**
|
280 |
);
|
281 |
}
|
282 |
|
283 |
+
$data = array();
|
284 |
$plugin_init = ( isset( $_POST['init'] ) ) ? esc_attr( $_POST['init'] ) : '';
|
285 |
$astra_site_options = ( isset( $_POST['options'] ) ) ? json_decode( stripslashes( $_POST['options'] ) ) : '';
|
286 |
+
$enabled_extensions = ( isset( $_POST['enabledExtensions'] ) ) ? json_decode( stripslashes( $_POST['enabledExtensions'] ) ) : '';
|
287 |
+
|
288 |
+
$data['astra_site_options'] = $astra_site_options;
|
289 |
+
$data['enabled_extensions'] = $enabled_extensions;
|
290 |
|
291 |
$activate = activate_plugin( $plugin_init, '', false, true );
|
292 |
|
299 |
);
|
300 |
}
|
301 |
|
302 |
+
do_action( 'astra_sites_after_plugin_activation', $plugin_init, $data );
|
303 |
|
304 |
wp_send_json_success(
|
305 |
array(
|
427 |
*/
|
428 |
public function demo_ajax_import() {
|
429 |
|
430 |
+
$report = array(
|
431 |
+
'success' => false,
|
432 |
+
'message' => '',
|
433 |
+
);
|
434 |
+
|
435 |
if ( ! current_user_can( 'customize' ) ) {
|
436 |
+
$report['message'] = __( 'You have not "customize" access to import the astra site.', 'astra-sites' );
|
437 |
+
wp_send_json( $report );
|
438 |
}
|
439 |
|
440 |
$demo_api_uri = isset( $_POST['api_url'] ) ? esc_url( $_POST['api_url'] ) : '';
|
441 |
$this->import_demo( $demo_api_uri );
|
442 |
|
443 |
+
$report['success'] = true;
|
444 |
+
$report['message'] = __( 'Demo Imported Successfully.', 'astra-sites' );
|
445 |
+
wp_send_json( $report );
|
446 |
+
|
447 |
}
|
448 |
|
449 |
/**
|
495 |
|
496 |
// Import Widgets data.
|
497 |
$this->import_widgets( $demo_data['astra-site-widgets-data'] );
|
498 |
+
|
499 |
}
|
500 |
|
501 |
/**
|
561 |
* @param (Array) $saved_extensions Array of enabled extensions.
|
562 |
*/
|
563 |
private function import_astra_enabled_extension( $saved_extensions ) {
|
564 |
+
if ( is_callable( 'Astra_Admin_Helper::update_admin_settings_option' ) ) {
|
565 |
+
Astra_Admin_Helper::update_admin_settings_option( '_astra_ext_enabled_extensions', $saved_extensions );
|
566 |
}
|
567 |
}
|
568 |
|
574 |
* @param (Array) $options_404 404 Extensions settings from the demo.
|
575 |
*/
|
576 |
private function import_custom_404_extension_options( $options_404 ) {
|
577 |
+
if ( is_callable( 'Astra_Admin_Helper::update_admin_settings_option' ) ) {
|
578 |
+
Astra_Admin_Helper::update_admin_settings_option( '_astra_ext_custom_404', $options_404 );
|
579 |
}
|
580 |
}
|
581 |
|
609 |
)
|
610 |
);
|
611 |
|
612 |
+
// Use this for premium demos.
|
613 |
+
$request_params = apply_filters(
|
614 |
+
'astra_sites_api_params', array(
|
615 |
+
'purchase_key' => '',
|
616 |
+
'site_url' => '',
|
617 |
+
)
|
618 |
+
);
|
619 |
+
|
620 |
+
$demo_api_uri = add_query_arg( $request_params, $demo_api_uri );
|
621 |
+
|
622 |
+
// API Call.
|
623 |
$response = wp_remote_get( $demo_api_uri, $api_args );
|
624 |
|
625 |
if ( ! is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) === 200 ) {
|
686 |
$astra_demos[ $key ]['featured_image_url'] = isset( $demo['featured-image-url'] ) ? esc_url( $demo['featured-image-url'] ) : '';
|
687 |
$astra_demos[ $key ]['demo_api'] = isset( $demo['_links']['self'][0]['href'] ) ? esc_url( $demo['_links']['self'][0]['href'] ) : self::get_api_url( new stdClass() ) . $demo['id'];
|
688 |
$astra_demos[ $key ]['content'] = isset( $demo['content']['rendered'] ) ? strip_tags( $demo['content']['rendered'] ) : '';
|
689 |
+
|
690 |
+
if ( isset( $demo['required-plugins'] ) ) {
|
691 |
+
$required_plugins = $demo['required-plugins'];
|
692 |
+
if ( is_array( $required_plugins ) ) {
|
693 |
+
$astra_demos[ $key ]['required_plugins'] = json_encode( $required_plugins );
|
694 |
+
} else {
|
695 |
+
$astra_demos[ $key ]['required_plugins'] = $required_plugins;
|
696 |
+
}
|
697 |
+
}
|
698 |
$astra_demos[ $key ]['astra_site_options'] = isset( $demo['astra-site-options-data'] ) ? json_encode( $demo['astra-site-options-data'] ) : '';
|
699 |
+
$astra_demos[ $key ]['astra_enabled_extensions'] = isset( $demo['astra-enabled-extensions'] ) ? json_encode( $demo['astra-enabled-extensions'] ) : '';
|
700 |
|
701 |
$demo_status = isset( $demo['status'] ) ? sanitize_key( $demo['status'] ) : '';
|
702 |
$astra_demos[ $key ]['status'] = ( 'draft' === $demo_status ) ? 'beta' : $demo_status;
|
inc/classes/compatibility/class-astra-sites-compatibility-astra-pro.php
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Astra Sites Compatibility for 'Astra Pro'
|
4 |
+
*
|
5 |
+
* @see https://wordpress.org/plugins/astra-pro/
|
6 |
+
*
|
7 |
+
* @package Astra Sites
|
8 |
+
* @since 1.0.0
|
9 |
+
*/
|
10 |
+
|
11 |
+
if ( ! class_exists( 'Astra_Sites_Compatibility_Astra_Pro' ) ) :
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Astra_Sites_Compatibility_Astra_Pro
|
15 |
+
*
|
16 |
+
* @since 1.0.0
|
17 |
+
*/
|
18 |
+
class Astra_Sites_Compatibility_Astra_Pro {
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Instance
|
22 |
+
*
|
23 |
+
* @access private
|
24 |
+
* @var object Class object.
|
25 |
+
* @since 1.0.0
|
26 |
+
*/
|
27 |
+
private static $instance;
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Initiator
|
31 |
+
*
|
32 |
+
* @since 1.0.0
|
33 |
+
* @return object initialized object of class.
|
34 |
+
*/
|
35 |
+
public static function instance() {
|
36 |
+
if ( ! isset( self::$instance ) ) {
|
37 |
+
self::$instance = new self;
|
38 |
+
}
|
39 |
+
return self::$instance;
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Constructor
|
44 |
+
*
|
45 |
+
* @since 1.0.0
|
46 |
+
*/
|
47 |
+
public function __construct() {
|
48 |
+
add_action( 'astra_sites_after_plugin_activation', array( $this, 'astra_pro' ), 10, 2 );
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Update Site Origin Active Widgets
|
53 |
+
*
|
54 |
+
* @since 1.0.0
|
55 |
+
*
|
56 |
+
* @param string $plugin_init Plugin init file.
|
57 |
+
* @param array $data Data.
|
58 |
+
* @return void
|
59 |
+
*/
|
60 |
+
function astra_pro( $plugin_init = '', $data = array() ) {
|
61 |
+
|
62 |
+
if ( 'astra-addon/astra-addon.php' === $plugin_init ) {
|
63 |
+
|
64 |
+
$data = json_decode( json_encode( $data ), true );
|
65 |
+
|
66 |
+
if ( isset( $data['enabled_extensions'] ) ) {
|
67 |
+
$extensions = $data['enabled_extensions'];
|
68 |
+
|
69 |
+
if ( ! empty( $extensions ) ) {
|
70 |
+
if ( is_callable( 'Astra_Admin_Helper::update_admin_settings_option' ) ) {
|
71 |
+
Astra_Admin_Helper::update_admin_settings_option( '_astra_ext_enabled_extensions', $extensions );
|
72 |
+
}
|
73 |
+
}
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
+
}
|
78 |
+
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Kicking this off by calling 'instance()' method
|
83 |
+
*/
|
84 |
+
Astra_Sites_Compatibility_Astra_Pro::instance();
|
85 |
+
|
86 |
+
endif;
|
{classes → inc/classes}/compatibility/class-astra-sites-compatibility-so-widgets.php
RENAMED
@@ -52,16 +52,25 @@ if ( ! class_exists( 'Astra_Sites_Compatibility_SO_Widgets' ) ) :
|
|
52 |
* Update Site Origin Active Widgets
|
53 |
*
|
54 |
* @since 1.0.0
|
|
|
55 |
* @param string $plugin_init Plugin init file.
|
56 |
-
* @param array $
|
57 |
* @return void
|
58 |
*/
|
59 |
-
function site_origin( $plugin_init = '', $
|
60 |
|
61 |
if ( 'so-widgets-bundle/so-widgets-bundle.php' === $plugin_init ) {
|
62 |
-
|
63 |
-
|
64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
}
|
66 |
}
|
67 |
|
52 |
* Update Site Origin Active Widgets
|
53 |
*
|
54 |
* @since 1.0.0
|
55 |
+
*
|
56 |
* @param string $plugin_init Plugin init file.
|
57 |
+
* @param array $data Data.
|
58 |
* @return void
|
59 |
*/
|
60 |
+
function site_origin( $plugin_init = '', $data = array() ) {
|
61 |
|
62 |
if ( 'so-widgets-bundle/so-widgets-bundle.php' === $plugin_init ) {
|
63 |
+
|
64 |
+
$data = json_decode( json_encode( $data ), true );
|
65 |
+
|
66 |
+
if ( isset( $data['astra_site_options'] ) ) {
|
67 |
+
|
68 |
+
$widgets = ( isset( $data['astra_site_options']['siteorigin_widgets_active'] ) ) ? $data['astra_site_options']['siteorigin_widgets_active'] : '';
|
69 |
+
|
70 |
+
if ( ! empty( $widgets ) ) {
|
71 |
+
update_option( 'siteorigin_widgets_active', $widgets );
|
72 |
+
wp_cache_delete( 'active_widgets', 'siteorigin_widgets' );
|
73 |
+
}
|
74 |
}
|
75 |
}
|
76 |
|
{importers → inc/importers}/class-astra-customizer-import.php
RENAMED
File without changes
|
{importers → inc/importers}/class-astra-site-options-import.php
RENAMED
@@ -71,6 +71,15 @@ class Astra_Site_Options_Import {
|
|
71 |
'elementor_scheme_typography',
|
72 |
'elementor_space_between_widgets',
|
73 |
'elementor_stretched_section_container',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
);
|
75 |
}
|
76 |
|
@@ -83,10 +92,15 @@ class Astra_Site_Options_Import {
|
|
83 |
*
|
84 |
* @param (Array) $options Array of site options to be imported from the demo.
|
85 |
*/
|
86 |
-
public function import_options( $options ) {
|
|
|
|
|
|
|
|
|
87 |
|
88 |
foreach ( $options as $option_name => $option_value ) {
|
89 |
|
|
|
90 |
if ( null !== $option_value ) {
|
91 |
|
92 |
// Is option exist in defined array site_options()?
|
71 |
'elementor_scheme_typography',
|
72 |
'elementor_space_between_widgets',
|
73 |
'elementor_stretched_section_container',
|
74 |
+
|
75 |
+
'_fl_builder_enabled_icons',
|
76 |
+
'_fl_builder_enabled_modules',
|
77 |
+
'_fl_builder_post_types',
|
78 |
+
'_fl_builder_color_presets',
|
79 |
+
'_fl_builder_services',
|
80 |
+
'_fl_builder_settings',
|
81 |
+
'_fl_builder_user_access',
|
82 |
+
'_fl_builder_enabled_templates',
|
83 |
);
|
84 |
}
|
85 |
|
92 |
*
|
93 |
* @param (Array) $options Array of site options to be imported from the demo.
|
94 |
*/
|
95 |
+
public function import_options( $options = array() ) {
|
96 |
+
|
97 |
+
if ( ! isset( $options ) ) {
|
98 |
+
return;
|
99 |
+
}
|
100 |
|
101 |
foreach ( $options as $option_name => $option_value ) {
|
102 |
|
103 |
+
// Is option exist in defined array site_options()?
|
104 |
if ( null !== $option_value ) {
|
105 |
|
106 |
// Is option exist in defined array site_options()?
|
{importers → inc/importers}/class-astra-sites-helper.php
RENAMED
@@ -77,9 +77,11 @@ if ( ! class_exists( 'Astra_Sites_Helper' ) ) :
|
|
77 |
foreach ( $widgets as $widget_key => $widget ) {
|
78 |
|
79 |
// Found slug in current menu list.
|
80 |
-
|
81 |
-
|
82 |
-
|
|
|
|
|
83 |
}
|
84 |
}
|
85 |
}
|
77 |
foreach ( $widgets as $widget_key => $widget ) {
|
78 |
|
79 |
// Found slug in current menu list.
|
80 |
+
if ( isset( $widget->nav_menu ) ) {
|
81 |
+
$menu_id = array_search( $widget->nav_menu, $menu_locations );
|
82 |
+
if ( ! empty( $menu_id ) ) {
|
83 |
+
$all_sidebars->$widgets_key->$widget_key->nav_menu = $menu_id;
|
84 |
+
}
|
85 |
}
|
86 |
}
|
87 |
}
|
{importers → inc/importers}/class-widgets-importer.php
RENAMED
File without changes
|
{importers → inc/importers}/wxr-importer/class-astra-wxr-importer.php
RENAMED
@@ -85,8 +85,8 @@ class Astra_WXR_Importer {
|
|
85 |
defined( 'WP_LOAD_IMPORTERS' ) || define( 'WP_LOAD_IMPORTERS', true );
|
86 |
require ABSPATH . '/wp-admin/includes/class-wp-importer.php';
|
87 |
}
|
88 |
-
require_once ASTRA_SITES_DIR . 'importers/wxr-importer/class-wxr-importer.php';
|
89 |
-
require_once ASTRA_SITES_DIR . 'importers/wxr-importer/class-logger.php';
|
90 |
}
|
91 |
|
92 |
/**
|
85 |
defined( 'WP_LOAD_IMPORTERS' ) || define( 'WP_LOAD_IMPORTERS', true );
|
86 |
require ABSPATH . '/wp-admin/includes/class-wp-importer.php';
|
87 |
}
|
88 |
+
require_once ASTRA_SITES_DIR . 'inc/importers/wxr-importer/class-wxr-importer.php';
|
89 |
+
require_once ASTRA_SITES_DIR . 'inc/importers/wxr-importer/class-logger.php';
|
90 |
}
|
91 |
|
92 |
/**
|
{importers → inc/importers}/wxr-importer/class-logger.php
RENAMED
File without changes
|
{importers → inc/importers}/wxr-importer/class-wxr-importer.php
RENAMED
File without changes
|
languages/astra-sites.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the Astra Free Sites package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Astra Free Sites 1.0.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/astra-sites\n"
|
7 |
-
"POT-Creation-Date: 2017-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -24,83 +24,83 @@ msgstr ""
|
|
24 |
"X-Textdomain-Support: yes\n"
|
25 |
"X-Generator: grunt-wp-i18n1.0.0\n"
|
26 |
|
27 |
-
#: admin/class-astra-sites-page.php:85
|
28 |
msgid "Astra Sites"
|
29 |
msgstr ""
|
30 |
|
31 |
-
#: admin/class-astra-sites-page.php:158
|
32 |
msgid "Settings saved successfully."
|
33 |
msgstr ""
|
34 |
|
35 |
-
#: admin/view-astra-sites.php:
|
36 |
msgid "All"
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: admin/view-astra-sites.php:
|
40 |
msgid "Search Sites"
|
41 |
msgstr ""
|
42 |
|
43 |
-
#: admin/view-astra-sites.php:
|
44 |
msgid "Search Sites..."
|
45 |
msgstr ""
|
46 |
|
47 |
-
#: admin/view-astra-sites.php:
|
48 |
msgid "Details & Preview"
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: admin/view-astra-sites.php:
|
52 |
msgid "Preview"
|
53 |
msgstr ""
|
54 |
|
55 |
-
#: admin/view-astra-sites.php:
|
56 |
msgid "Close"
|
57 |
msgstr ""
|
58 |
|
59 |
-
#: admin/view-astra-sites.php:
|
60 |
msgid "Previous"
|
61 |
msgstr ""
|
62 |
|
63 |
-
#: admin/view-astra-sites.php:
|
64 |
msgid "Next"
|
65 |
msgstr ""
|
66 |
|
67 |
-
#: admin/view-astra-sites.php:
|
68 |
msgid "Install Plugins"
|
69 |
msgstr ""
|
70 |
|
71 |
-
#: admin/view-astra-sites.php:
|
72 |
msgid "Read more"
|
73 |
msgstr ""
|
74 |
|
75 |
-
#: admin/view-astra-sites.php:
|
76 |
msgid "Required Plugins"
|
77 |
msgstr ""
|
78 |
|
79 |
-
#: admin/view-astra-sites.php:
|
80 |
msgid "Collapse"
|
81 |
msgstr ""
|
82 |
|
83 |
-
#: admin/view-astra-sites.php:
|
84 |
#. translators: %1$s & %2$s are a Demo API URL
|
85 |
msgid ""
|
86 |
"<p> It seems the demo data server, <i><a href=\"%1$s\">%2$s</a></i> is "
|
87 |
"unreachable from your site.</p>"
|
88 |
msgstr ""
|
89 |
|
90 |
-
#: admin/view-astra-sites.php:
|
91 |
msgid ""
|
92 |
"<p class=\"left-margin\"> 1. Sometimes, simple page reload fixes any "
|
93 |
"temporary issues. No kidding!</p>"
|
94 |
msgstr ""
|
95 |
|
96 |
-
#: admin/view-astra-sites.php:
|
97 |
msgid ""
|
98 |
"<p class=\"left-margin\"> 2. If that does not work, you will need to talk "
|
99 |
"to your server administrator and check if demo server is being blocked by "
|
100 |
"the firewall!</p>"
|
101 |
msgstr ""
|
102 |
|
103 |
-
#: admin/view-astra-sites.php:
|
104 |
#. translators: %1$s is a support link
|
105 |
msgid ""
|
106 |
"<p>If that does not help, please open up a <a href=\"%1$s\" "
|
@@ -108,58 +108,62 @@ msgid ""
|
|
108 |
"for you.</p>"
|
109 |
msgstr ""
|
110 |
|
111 |
-
#: classes/class-astra-sites.php:
|
112 |
#. translators: 1: theme.php file
|
113 |
msgid ""
|
114 |
"Astra Theme needs to be active for you to use currently installed \"Astra "
|
115 |
"Sites\" plugin. <a href=\"%1$s\">Install & Activate Now</a>"
|
116 |
msgstr ""
|
117 |
|
118 |
-
#: classes/class-astra-sites.php:
|
119 |
msgid "See Library"
|
120 |
msgstr ""
|
121 |
|
122 |
-
#: classes/class-astra-sites.php:
|
123 |
msgid "Purchase"
|
124 |
msgstr ""
|
125 |
|
126 |
-
#: classes/class-astra-sites.php:
|
|
|
|
|
|
|
|
|
127 |
msgid "Error!"
|
128 |
msgstr ""
|
129 |
|
130 |
-
#: classes/class-astra-sites.php:
|
131 |
msgid "Error! Read Possibilities."
|
132 |
msgstr ""
|
133 |
|
134 |
-
#: classes/class-astra-sites.php:
|
135 |
msgid "Done! View Site"
|
136 |
msgstr ""
|
137 |
|
138 |
-
#: classes/class-astra-sites.php:
|
139 |
msgid "Activating"
|
140 |
msgstr ""
|
141 |
|
142 |
-
#: classes/class-astra-sites.php:
|
143 |
msgid "Active"
|
144 |
msgstr ""
|
145 |
|
146 |
-
#: classes/class-astra-sites.php:
|
147 |
msgid "Import This Site"
|
148 |
msgstr ""
|
149 |
|
150 |
-
#: classes/class-astra-sites.php:
|
151 |
msgid "Hide"
|
152 |
msgstr ""
|
153 |
|
154 |
-
#: classes/class-astra-sites.php:
|
155 |
msgid "There was a problem receiving a response from server."
|
156 |
msgstr ""
|
157 |
|
158 |
-
#: classes/class-astra-sites.php:
|
159 |
msgid "No Demos found, Try a different search."
|
160 |
msgstr ""
|
161 |
|
162 |
-
#: classes/class-astra-sites.php:
|
163 |
msgid ""
|
164 |
"Executing Demo Import will make your site similar as ours. Please bear in "
|
165 |
"mind -\n"
|
@@ -173,186 +177,194 @@ msgid ""
|
|
173 |
"placeholders."
|
174 |
msgstr ""
|
175 |
|
176 |
-
#: classes/class-astra-sites.php:
|
177 |
msgid "No plugin specified"
|
178 |
msgstr ""
|
179 |
|
180 |
-
#: classes/class-astra-sites.php:
|
181 |
msgid "Plugin Successfully Activated"
|
182 |
msgstr ""
|
183 |
|
184 |
-
#:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
msgid "Import data could not be read. Please try a different file."
|
186 |
msgstr ""
|
187 |
|
188 |
-
#: importers/class-widgets-importer.php:127
|
189 |
msgid "Widget area does not exist in theme (using Inactive)"
|
190 |
msgstr ""
|
191 |
|
192 |
-
#: importers/class-widgets-importer.php:149
|
193 |
msgid "Site does not support widget"
|
194 |
msgstr ""
|
195 |
|
196 |
-
#: importers/class-widgets-importer.php:185
|
197 |
msgid "Widget already exists"
|
198 |
msgstr ""
|
199 |
|
200 |
-
#: importers/class-widgets-importer.php:254
|
201 |
msgid "Imported"
|
202 |
msgstr ""
|
203 |
|
204 |
-
#: importers/class-widgets-importer.php:257
|
205 |
msgid "Imported to Inactive"
|
206 |
msgstr ""
|
207 |
|
208 |
-
#: importers/class-widgets-importer.php:263
|
209 |
msgid "No Title"
|
210 |
msgstr ""
|
211 |
|
212 |
-
#: importers/wxr-importer/class-wxr-importer.php:130
|
213 |
msgid "Could not open the file for parsing"
|
214 |
msgstr ""
|
215 |
|
216 |
-
#: importers/wxr-importer/class-wxr-importer.php:166
|
217 |
-
#: importers/wxr-importer/class-wxr-importer.php:282
|
218 |
-
#: importers/wxr-importer/class-wxr-importer.php:355
|
219 |
msgid ""
|
220 |
"This WXR file (version %1$s) is newer than the importer (version %2$s) and "
|
221 |
"may not be supported. Please consider updating."
|
222 |
msgstr ""
|
223 |
|
224 |
-
#: importers/wxr-importer/class-wxr-importer.php:503
|
225 |
msgid "The file does not exist, please try again."
|
226 |
msgstr ""
|
227 |
|
228 |
-
#: importers/wxr-importer/class-wxr-importer.php:563
|
229 |
msgid "Invalid author mapping"
|
230 |
msgstr ""
|
231 |
|
232 |
-
#: importers/wxr-importer/class-wxr-importer.php:664
|
233 |
msgid "Cannot import auto-draft posts"
|
234 |
msgstr ""
|
235 |
|
236 |
-
#: importers/wxr-importer/class-wxr-importer.php:752
|
237 |
msgid "Failed to import \"%1$s\": Invalid post type %2$s"
|
238 |
msgstr ""
|
239 |
|
240 |
-
#: importers/wxr-importer/class-wxr-importer.php:762
|
241 |
msgid "%1$s \"%2$s\" already exists."
|
242 |
msgstr ""
|
243 |
|
244 |
-
#: importers/wxr-importer/class-wxr-importer.php:856
|
245 |
msgid "Skipping attachment \"%s\", fetching attachments disabled"
|
246 |
msgstr ""
|
247 |
|
248 |
-
#: importers/wxr-importer/class-wxr-importer.php:877
|
249 |
msgid "Failed to import \"%1$s\" (%2$s)"
|
250 |
msgstr ""
|
251 |
|
252 |
-
#: importers/wxr-importer/class-wxr-importer.php:909
|
253 |
-
#: importers/wxr-importer/class-wxr-importer.php:1754
|
254 |
msgid "Imported \"%1$s\" (%2$s)"
|
255 |
msgstr ""
|
256 |
|
257 |
-
#: importers/wxr-importer/class-wxr-importer.php:914
|
258 |
msgid "Post %1$d remapped to %2$d"
|
259 |
msgstr ""
|
260 |
|
261 |
-
#: importers/wxr-importer/class-wxr-importer.php:1061
|
262 |
msgid "Invalid file type"
|
263 |
msgstr ""
|
264 |
|
265 |
-
#: importers/wxr-importer/class-wxr-importer.php:1559
|
266 |
msgid "Failed to import user \"%s\""
|
267 |
msgstr ""
|
268 |
|
269 |
-
#: importers/wxr-importer/class-wxr-importer.php:1580
|
270 |
msgid "Imported user \"%s\""
|
271 |
msgstr ""
|
272 |
|
273 |
-
#: importers/wxr-importer/class-wxr-importer.php:1584
|
274 |
msgid "User %1$d remapped to %2$d"
|
275 |
msgstr ""
|
276 |
|
277 |
-
#: importers/wxr-importer/class-wxr-importer.php:1730
|
278 |
msgid "Failed to import %1$s %2$s"
|
279 |
msgstr ""
|
280 |
|
281 |
-
#: importers/wxr-importer/class-wxr-importer.php:1759
|
282 |
msgid "Term %1$d remapped to %2$d"
|
283 |
msgstr ""
|
284 |
|
285 |
-
#: importers/wxr-importer/class-wxr-importer.php:1812
|
286 |
msgid "Remote server returned %1$d %2$s for %3$s"
|
287 |
msgstr ""
|
288 |
|
289 |
-
#: importers/wxr-importer/class-wxr-importer.php:1825
|
290 |
msgid "Remote file is incorrect size"
|
291 |
msgstr ""
|
292 |
|
293 |
-
#: importers/wxr-importer/class-wxr-importer.php:1830
|
294 |
msgid "Zero size file downloaded"
|
295 |
msgstr ""
|
296 |
|
297 |
-
#: importers/wxr-importer/class-wxr-importer.php:1836
|
298 |
msgid "Remote file is too large, limit is %s"
|
299 |
msgstr ""
|
300 |
|
301 |
-
#: importers/wxr-importer/class-wxr-importer.php:1858
|
302 |
msgid "Running post-processing for post %d"
|
303 |
msgstr ""
|
304 |
|
305 |
-
#: importers/wxr-importer/class-wxr-importer.php:1871
|
306 |
msgid "Could not find the post parent for \"%1$s\" (post #%2$d)"
|
307 |
msgstr ""
|
308 |
|
309 |
-
#: importers/wxr-importer/class-wxr-importer.php:1876
|
310 |
msgid "Post %1$d was imported with parent %2$d, but could not be found"
|
311 |
msgstr ""
|
312 |
|
313 |
-
#: importers/wxr-importer/class-wxr-importer.php:1890
|
314 |
msgid "Could not find the author for \"%1$s\" (post #%2$d)"
|
315 |
msgstr ""
|
316 |
|
317 |
-
#: importers/wxr-importer/class-wxr-importer.php:1895
|
318 |
msgid "Post %1$d was imported with author \"%2$s\", but could not be found"
|
319 |
msgstr ""
|
320 |
|
321 |
-
#: importers/wxr-importer/class-wxr-importer.php:1921
|
322 |
msgid "Post %d was marked for post-processing, but none was required."
|
323 |
msgstr ""
|
324 |
|
325 |
-
#: importers/wxr-importer/class-wxr-importer.php:1932
|
326 |
msgid "Could not update \"%1$s\" (post #%2$d) with mapped data"
|
327 |
msgstr ""
|
328 |
|
329 |
-
#: importers/wxr-importer/class-wxr-importer.php:1977
|
330 |
msgid "Could not find the menu object for \"%1$s\" (post #%2$d)"
|
331 |
msgstr ""
|
332 |
|
333 |
-
#: importers/wxr-importer/class-wxr-importer.php:1982
|
334 |
msgid ""
|
335 |
"Post %1$d was imported with object \"%2$d\" of type \"%3$s\", but could not "
|
336 |
"be found"
|
337 |
msgstr ""
|
338 |
|
339 |
-
#: importers/wxr-importer/class-wxr-importer.php:2004
|
340 |
msgid "Could not find the comment parent for comment #%d"
|
341 |
msgstr ""
|
342 |
|
343 |
-
#: importers/wxr-importer/class-wxr-importer.php:2008
|
344 |
msgid "Comment %1$d was imported with parent %2$d, but could not be found"
|
345 |
msgstr ""
|
346 |
|
347 |
-
#: importers/wxr-importer/class-wxr-importer.php:2022
|
348 |
msgid "Could not find the author for comment #%d"
|
349 |
msgstr ""
|
350 |
|
351 |
-
#: importers/wxr-importer/class-wxr-importer.php:2026
|
352 |
msgid "Comment %1$d was imported with author %2$d, but could not be found"
|
353 |
msgstr ""
|
354 |
|
355 |
-
#: importers/wxr-importer/class-wxr-importer.php:2043
|
356 |
msgid "Could not update comment #%d with mapped data"
|
357 |
msgstr ""
|
358 |
|
2 |
# This file is distributed under the same license as the Astra Free Sites package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Astra Free Sites 1.0.8\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/astra-sites\n"
|
7 |
+
"POT-Creation-Date: 2017-09-05 14:54:17+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
24 |
"X-Textdomain-Support: yes\n"
|
25 |
"X-Generator: grunt-wp-i18n1.0.0\n"
|
26 |
|
27 |
+
#: inc/admin/class-astra-sites-page.php:85
|
28 |
msgid "Astra Sites"
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: inc/admin/class-astra-sites-page.php:158
|
32 |
msgid "Settings saved successfully."
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: inc/admin/view-astra-sites.php:27
|
36 |
msgid "All"
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: inc/admin/view-astra-sites.php:41
|
40 |
msgid "Search Sites"
|
41 |
msgstr ""
|
42 |
|
43 |
+
#: inc/admin/view-astra-sites.php:42
|
44 |
msgid "Search Sites..."
|
45 |
msgstr ""
|
46 |
|
47 |
+
#: inc/admin/view-astra-sites.php:91
|
48 |
msgid "Details & Preview"
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: inc/admin/view-astra-sites.php:97 inc/admin/view-astra-sites.php:166
|
52 |
msgid "Preview"
|
53 |
msgstr ""
|
54 |
|
55 |
+
#: inc/admin/view-astra-sites.php:124
|
56 |
msgid "Close"
|
57 |
msgstr ""
|
58 |
|
59 |
+
#: inc/admin/view-astra-sites.php:125
|
60 |
msgid "Previous"
|
61 |
msgstr ""
|
62 |
|
63 |
+
#: inc/admin/view-astra-sites.php:126
|
64 |
msgid "Next"
|
65 |
msgstr ""
|
66 |
|
67 |
+
#: inc/admin/view-astra-sites.php:127 inc/admin/view-astra-sites.php:155
|
68 |
msgid "Install Plugins"
|
69 |
msgstr ""
|
70 |
|
71 |
+
#: inc/admin/view-astra-sites.php:143 inc/classes/class-astra-sites.php:238
|
72 |
msgid "Read more"
|
73 |
msgstr ""
|
74 |
|
75 |
+
#: inc/admin/view-astra-sites.php:146
|
76 |
msgid "Required Plugins"
|
77 |
msgstr ""
|
78 |
|
79 |
+
#: inc/admin/view-astra-sites.php:161
|
80 |
msgid "Collapse"
|
81 |
msgstr ""
|
82 |
|
83 |
+
#: inc/admin/view-astra-sites.php:176
|
84 |
#. translators: %1$s & %2$s are a Demo API URL
|
85 |
msgid ""
|
86 |
"<p> It seems the demo data server, <i><a href=\"%1$s\">%2$s</a></i> is "
|
87 |
"unreachable from your site.</p>"
|
88 |
msgstr ""
|
89 |
|
90 |
+
#: inc/admin/view-astra-sites.php:178
|
91 |
msgid ""
|
92 |
"<p class=\"left-margin\"> 1. Sometimes, simple page reload fixes any "
|
93 |
"temporary issues. No kidding!</p>"
|
94 |
msgstr ""
|
95 |
|
96 |
+
#: inc/admin/view-astra-sites.php:180
|
97 |
msgid ""
|
98 |
"<p class=\"left-margin\"> 2. If that does not work, you will need to talk "
|
99 |
"to your server administrator and check if demo server is being blocked by "
|
100 |
"the firewall!</p>"
|
101 |
msgstr ""
|
102 |
|
103 |
+
#: inc/admin/view-astra-sites.php:183
|
104 |
#. translators: %1$s is a support link
|
105 |
msgid ""
|
106 |
"<p>If that does not help, please open up a <a href=\"%1$s\" "
|
108 |
"for you.</p>"
|
109 |
msgstr ""
|
110 |
|
111 |
+
#: inc/classes/class-astra-sites.php:82
|
112 |
#. translators: 1: theme.php file
|
113 |
msgid ""
|
114 |
"Astra Theme needs to be active for you to use currently installed \"Astra "
|
115 |
"Sites\" plugin. <a href=\"%1$s\">Install & Activate Now</a>"
|
116 |
msgstr ""
|
117 |
|
118 |
+
#: inc/classes/class-astra-sites.php:125
|
119 |
msgid "See Library"
|
120 |
msgstr ""
|
121 |
|
122 |
+
#: inc/classes/class-astra-sites.php:224
|
123 |
msgid "Purchase"
|
124 |
msgstr ""
|
125 |
|
126 |
+
#: inc/classes/class-astra-sites.php:226
|
127 |
+
msgid "Upgrade"
|
128 |
+
msgstr ""
|
129 |
+
|
130 |
+
#: inc/classes/class-astra-sites.php:231
|
131 |
msgid "Error!"
|
132 |
msgstr ""
|
133 |
|
134 |
+
#: inc/classes/class-astra-sites.php:232
|
135 |
msgid "Error! Read Possibilities."
|
136 |
msgstr ""
|
137 |
|
138 |
+
#: inc/classes/class-astra-sites.php:234
|
139 |
msgid "Done! View Site"
|
140 |
msgstr ""
|
141 |
|
142 |
+
#: inc/classes/class-astra-sites.php:235
|
143 |
msgid "Activating"
|
144 |
msgstr ""
|
145 |
|
146 |
+
#: inc/classes/class-astra-sites.php:236
|
147 |
msgid "Active"
|
148 |
msgstr ""
|
149 |
|
150 |
+
#: inc/classes/class-astra-sites.php:237
|
151 |
msgid "Import This Site"
|
152 |
msgstr ""
|
153 |
|
154 |
+
#: inc/classes/class-astra-sites.php:239
|
155 |
msgid "Hide"
|
156 |
msgstr ""
|
157 |
|
158 |
+
#: inc/classes/class-astra-sites.php:240
|
159 |
msgid "There was a problem receiving a response from server."
|
160 |
msgstr ""
|
161 |
|
162 |
+
#: inc/classes/class-astra-sites.php:241
|
163 |
msgid "No Demos found, Try a different search."
|
164 |
msgstr ""
|
165 |
|
166 |
+
#: inc/classes/class-astra-sites.php:242
|
167 |
msgid ""
|
168 |
"Executing Demo Import will make your site similar as ours. Please bear in "
|
169 |
"mind -\n"
|
177 |
"placeholders."
|
178 |
msgstr ""
|
179 |
|
180 |
+
#: inc/classes/class-astra-sites.php:282
|
181 |
msgid "No plugin specified"
|
182 |
msgstr ""
|
183 |
|
184 |
+
#: inc/classes/class-astra-sites.php:311
|
185 |
msgid "Plugin Successfully Activated"
|
186 |
msgstr ""
|
187 |
|
188 |
+
#: inc/classes/class-astra-sites.php:440
|
189 |
+
msgid "You have not \"customize\" access to import the astra site."
|
190 |
+
msgstr ""
|
191 |
+
|
192 |
+
#: inc/classes/class-astra-sites.php:448
|
193 |
+
msgid "Demo Imported Successfully."
|
194 |
+
msgstr ""
|
195 |
+
|
196 |
+
#: inc/importers/class-widgets-importer.php:83
|
197 |
msgid "Import data could not be read. Please try a different file."
|
198 |
msgstr ""
|
199 |
|
200 |
+
#: inc/importers/class-widgets-importer.php:127
|
201 |
msgid "Widget area does not exist in theme (using Inactive)"
|
202 |
msgstr ""
|
203 |
|
204 |
+
#: inc/importers/class-widgets-importer.php:149
|
205 |
msgid "Site does not support widget"
|
206 |
msgstr ""
|
207 |
|
208 |
+
#: inc/importers/class-widgets-importer.php:185
|
209 |
msgid "Widget already exists"
|
210 |
msgstr ""
|
211 |
|
212 |
+
#: inc/importers/class-widgets-importer.php:254
|
213 |
msgid "Imported"
|
214 |
msgstr ""
|
215 |
|
216 |
+
#: inc/importers/class-widgets-importer.php:257
|
217 |
msgid "Imported to Inactive"
|
218 |
msgstr ""
|
219 |
|
220 |
+
#: inc/importers/class-widgets-importer.php:263
|
221 |
msgid "No Title"
|
222 |
msgstr ""
|
223 |
|
224 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:130
|
225 |
msgid "Could not open the file for parsing"
|
226 |
msgstr ""
|
227 |
|
228 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:166
|
229 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:282
|
230 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:355
|
231 |
msgid ""
|
232 |
"This WXR file (version %1$s) is newer than the importer (version %2$s) and "
|
233 |
"may not be supported. Please consider updating."
|
234 |
msgstr ""
|
235 |
|
236 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:503
|
237 |
msgid "The file does not exist, please try again."
|
238 |
msgstr ""
|
239 |
|
240 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:563
|
241 |
msgid "Invalid author mapping"
|
242 |
msgstr ""
|
243 |
|
244 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:664
|
245 |
msgid "Cannot import auto-draft posts"
|
246 |
msgstr ""
|
247 |
|
248 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:752
|
249 |
msgid "Failed to import \"%1$s\": Invalid post type %2$s"
|
250 |
msgstr ""
|
251 |
|
252 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:762
|
253 |
msgid "%1$s \"%2$s\" already exists."
|
254 |
msgstr ""
|
255 |
|
256 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:856
|
257 |
msgid "Skipping attachment \"%s\", fetching attachments disabled"
|
258 |
msgstr ""
|
259 |
|
260 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:877
|
261 |
msgid "Failed to import \"%1$s\" (%2$s)"
|
262 |
msgstr ""
|
263 |
|
264 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:909
|
265 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:1754
|
266 |
msgid "Imported \"%1$s\" (%2$s)"
|
267 |
msgstr ""
|
268 |
|
269 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:914
|
270 |
msgid "Post %1$d remapped to %2$d"
|
271 |
msgstr ""
|
272 |
|
273 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:1061
|
274 |
msgid "Invalid file type"
|
275 |
msgstr ""
|
276 |
|
277 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:1559
|
278 |
msgid "Failed to import user \"%s\""
|
279 |
msgstr ""
|
280 |
|
281 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:1580
|
282 |
msgid "Imported user \"%s\""
|
283 |
msgstr ""
|
284 |
|
285 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:1584
|
286 |
msgid "User %1$d remapped to %2$d"
|
287 |
msgstr ""
|
288 |
|
289 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:1730
|
290 |
msgid "Failed to import %1$s %2$s"
|
291 |
msgstr ""
|
292 |
|
293 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:1759
|
294 |
msgid "Term %1$d remapped to %2$d"
|
295 |
msgstr ""
|
296 |
|
297 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:1812
|
298 |
msgid "Remote server returned %1$d %2$s for %3$s"
|
299 |
msgstr ""
|
300 |
|
301 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:1825
|
302 |
msgid "Remote file is incorrect size"
|
303 |
msgstr ""
|
304 |
|
305 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:1830
|
306 |
msgid "Zero size file downloaded"
|
307 |
msgstr ""
|
308 |
|
309 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:1836
|
310 |
msgid "Remote file is too large, limit is %s"
|
311 |
msgstr ""
|
312 |
|
313 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:1858
|
314 |
msgid "Running post-processing for post %d"
|
315 |
msgstr ""
|
316 |
|
317 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:1871
|
318 |
msgid "Could not find the post parent for \"%1$s\" (post #%2$d)"
|
319 |
msgstr ""
|
320 |
|
321 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:1876
|
322 |
msgid "Post %1$d was imported with parent %2$d, but could not be found"
|
323 |
msgstr ""
|
324 |
|
325 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:1890
|
326 |
msgid "Could not find the author for \"%1$s\" (post #%2$d)"
|
327 |
msgstr ""
|
328 |
|
329 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:1895
|
330 |
msgid "Post %1$d was imported with author \"%2$s\", but could not be found"
|
331 |
msgstr ""
|
332 |
|
333 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:1921
|
334 |
msgid "Post %d was marked for post-processing, but none was required."
|
335 |
msgstr ""
|
336 |
|
337 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:1932
|
338 |
msgid "Could not update \"%1$s\" (post #%2$d) with mapped data"
|
339 |
msgstr ""
|
340 |
|
341 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:1977
|
342 |
msgid "Could not find the menu object for \"%1$s\" (post #%2$d)"
|
343 |
msgstr ""
|
344 |
|
345 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:1982
|
346 |
msgid ""
|
347 |
"Post %1$d was imported with object \"%2$d\" of type \"%3$s\", but could not "
|
348 |
"be found"
|
349 |
msgstr ""
|
350 |
|
351 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:2004
|
352 |
msgid "Could not find the comment parent for comment #%d"
|
353 |
msgstr ""
|
354 |
|
355 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:2008
|
356 |
msgid "Comment %1$d was imported with parent %2$d, but could not be found"
|
357 |
msgstr ""
|
358 |
|
359 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:2022
|
360 |
msgid "Could not find the author for comment #%d"
|
361 |
msgstr ""
|
362 |
|
363 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:2026
|
364 |
msgid "Comment %1$d was imported with author %2$d, but could not be found"
|
365 |
msgstr ""
|
366 |
|
367 |
+
#: inc/importers/wxr-importer/class-wxr-importer.php:2043
|
368 |
msgid "Could not update comment #%d with mapped data"
|
369 |
msgstr ""
|
370 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://wpastra.com/pro/
|
|
4 |
Tags: demo, theme demos, one click import
|
5 |
Requires at least: 4.4
|
6 |
Tested up to: 4.8.1
|
7 |
-
Stable tag: 1.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -46,6 +46,11 @@ https://sites.wpastra.com/law-free/
|
|
46 |
|
47 |
== Changelog ==
|
48 |
|
|
|
|
|
|
|
|
|
|
|
49 |
v1.0.7 - 1-Sept-2017
|
50 |
* Fix: Custom Menu widget not setting imported widget.
|
51 |
|
4 |
Tags: demo, theme demos, one click import
|
5 |
Requires at least: 4.4
|
6 |
Tested up to: 4.8.1
|
7 |
+
Stable tag: 1.0.8
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
46 |
|
47 |
== Changelog ==
|
48 |
|
49 |
+
v1.0.8 - 6-Sept-2017
|
50 |
+
* Fix: Beaver Builder option import.
|
51 |
+
* Enhancement: Disabled dismiss-able notice visible once for each user.
|
52 |
+
* Enhancement: Showing error message for for user who have not `manage_plugins` capability.
|
53 |
+
|
54 |
v1.0.7 - 1-Sept-2017
|
55 |
* Fix: Custom Menu widget not setting imported widget.
|
56 |
|