Version Description
Download this release
Release Info
Developer | brainstormworg |
Plugin | Astra Starter Sites |
Version | 2.2.5 |
Comparing to | |
See all releases |
Code changes from version 2.2.4 to 2.2.5
- astra-sites.php +2 -2
- inc/assets/css/admin-rtl.css +5 -0
- inc/assets/css/admin.css +5 -0
- inc/assets/js/admin-page.js +11 -6
- inc/assets/js/dist/index.js +46 -58
- inc/assets/js/elementor-admin-page.js +80 -69
- inc/assets/js/src/frame.js +1 -4
- inc/assets/js/src/index.js +43 -51
- inc/assets/js/src/search.js +1 -3
- inc/classes/class-astra-sites-importer.php +2 -2
- inc/classes/class-astra-sites-page.php +3 -3
- inc/classes/class-astra-sites.php +89 -87
- inc/importers/batch-processing/class-astra-sites-batch-processing-beaver-builder.php +13 -4
- inc/importers/batch-processing/class-astra-sites-batch-processing-brizy.php +20 -21
- inc/importers/batch-processing/class-astra-sites-batch-processing-elementor.php +13 -4
- inc/importers/batch-processing/class-astra-sites-batch-processing-gutenberg.php +7 -0
- inc/importers/batch-processing/class-astra-sites-batch-processing-importer.php +20 -20
- inc/importers/batch-processing/class-astra-sites-batch-processing.php +15 -16
- inc/importers/batch-processing/helpers/class-wp-background-process-astra-site-importer.php +8 -8
- inc/importers/batch-processing/helpers/class-wp-background-process.php +2 -2
- inc/importers/wxr-importer/class-astra-wxr-importer.php +1 -1
- inc/includes/templates.php +1 -1
- inc/lib/astra-notices/class-astra-notices.php +9 -4
- inc/lib/astra-notices/notices.js +2 -2
- inc/lib/bsf-analytics/assets/css/minified/style.min-rtl.css +1 -0
- inc/lib/bsf-analytics/assets/css/minified/style.min.css +1 -0
- inc/lib/bsf-analytics/assets/css/unminified/style-rtl.css +21 -0
- inc/lib/bsf-analytics/assets/css/unminified/style.css +21 -0
- inc/lib/bsf-analytics/class-bsf-analytics-stats.php +257 -0
- inc/lib/bsf-analytics/class-bsf-analytics.php +503 -0
- languages/astra-sites.pot +168 -107
- readme.txt +11 -2
astra-sites.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Starter Templates
|
4 |
* Plugin URI: https://wpastra.com/
|
5 |
* Description: Starter Templates is all in one solution for complete starter sites, single page templates, blocks & images. This plugin offers the premium library of ready templates & provides quick access to beautiful Pixabay images that can be imported in your website easily.
|
6 |
-
* Version: 2.2.
|
7 |
* Author: Brainstorm Force
|
8 |
* Author URI: https://www.brainstormforce.com
|
9 |
* Text Domain: astra-sites
|
@@ -19,7 +19,7 @@ if ( ! defined( 'ASTRA_SITES_NAME' ) ) {
|
|
19 |
}
|
20 |
|
21 |
if ( ! defined( 'ASTRA_SITES_VER' ) ) {
|
22 |
-
define( 'ASTRA_SITES_VER', '2.2.
|
23 |
}
|
24 |
|
25 |
if ( ! defined( 'ASTRA_SITES_FILE' ) ) {
|
3 |
* Plugin Name: Starter Templates
|
4 |
* Plugin URI: https://wpastra.com/
|
5 |
* Description: Starter Templates is all in one solution for complete starter sites, single page templates, blocks & images. This plugin offers the premium library of ready templates & provides quick access to beautiful Pixabay images that can be imported in your website easily.
|
6 |
+
* Version: 2.2.5
|
7 |
* Author: Brainstorm Force
|
8 |
* Author URI: https://www.brainstormforce.com
|
9 |
* Text Domain: astra-sites
|
19 |
}
|
20 |
|
21 |
if ( ! defined( 'ASTRA_SITES_VER' ) ) {
|
22 |
+
define( 'ASTRA_SITES_VER', '2.2.5' );
|
23 |
}
|
24 |
|
25 |
if ( ! defined( 'ASTRA_SITES_FILE' ) ) {
|
inc/assets/css/admin-rtl.css
CHANGED
@@ -1612,6 +1612,11 @@ body.loading-content .select-page-builder {
|
|
1612 |
padding: 1.3em;
|
1613 |
}
|
1614 |
|
|
|
|
|
|
|
|
|
|
|
1615 |
.appearance_page_starter-templates .rotating {
|
1616 |
height: auto;
|
1617 |
animation: rotation 2s infinite linear;
|
1612 |
padding: 1.3em;
|
1613 |
}
|
1614 |
|
1615 |
+
.current-importing-status ul {
|
1616 |
+
list-style-type: disc;
|
1617 |
+
margin: 1em 2em 0em 0em;
|
1618 |
+
}
|
1619 |
+
|
1620 |
.appearance_page_starter-templates .rotating {
|
1621 |
height: auto;
|
1622 |
animation: rotation 2s infinite linear;
|
inc/assets/css/admin.css
CHANGED
@@ -1612,6 +1612,11 @@ body.loading-content .select-page-builder {
|
|
1612 |
padding: 1.3em;
|
1613 |
}
|
1614 |
|
|
|
|
|
|
|
|
|
|
|
1615 |
.appearance_page_starter-templates .rotating {
|
1616 |
height: auto;
|
1617 |
animation: rotation 2s infinite linear;
|
1612 |
padding: 1.3em;
|
1613 |
}
|
1614 |
|
1615 |
+
.current-importing-status ul {
|
1616 |
+
list-style-type: disc;
|
1617 |
+
margin: 1em 0em 0em 2em;
|
1618 |
+
}
|
1619 |
+
|
1620 |
.appearance_page_starter-templates .rotating {
|
1621 |
height: auto;
|
1622 |
animation: rotation 2s infinite linear;
|
inc/assets/js/admin-page.js
CHANGED
@@ -1104,7 +1104,7 @@ var AstraSitesAjaxQueue = (function() {
|
|
1104 |
.done(function ( response ) {
|
1105 |
AstraSitesAdmin._log( response );
|
1106 |
if( response.success ) {
|
1107 |
-
var total = response.data
|
1108 |
|
1109 |
AstraSitesAdmin._log( total );
|
1110 |
|
@@ -2433,6 +2433,8 @@ var AstraSitesAjaxQueue = (function() {
|
|
2433 |
}
|
2434 |
};
|
2435 |
evtSource.onerror = function( error ) {
|
|
|
|
|
2436 |
AstraSitesAdmin._importFailMessage('', 'Import Process Interrupted');
|
2437 |
};
|
2438 |
evtSource.addEventListener( 'log', function ( message ) {
|
@@ -2644,20 +2646,23 @@ var AstraSitesAjaxQueue = (function() {
|
|
2644 |
*
|
2645 |
* @param {string} data Error message.
|
2646 |
*/
|
2647 |
-
_importFailMessage: function( message, heading, jqXHR ) {
|
2648 |
|
2649 |
heading = heading || 'The import process interrupted';
|
2650 |
|
2651 |
-
var status_code =
|
|
|
|
|
|
|
2652 |
|
2653 |
if( 200 == status_code && astraSitesVars.debug ) {
|
2654 |
var output = astraSitesVars.importFailedMessageDueToDebug;
|
2655 |
|
2656 |
} else {
|
2657 |
-
var output = astraSitesVars.importFailedMessage;
|
2658 |
|
2659 |
if( message ) {
|
2660 |
-
output += '<
|
2661 |
}
|
2662 |
}
|
2663 |
|
@@ -3246,7 +3251,7 @@ var AstraSitesAjaxQueue = (function() {
|
|
3246 |
console.groupEnd();
|
3247 |
|
3248 |
if( false === response.success ) {
|
3249 |
-
AstraSitesAdmin._importFailMessage( response.data, 'Required Plugins Failed!' );
|
3250 |
} else {
|
3251 |
required_plugins = response.data['required_plugins'];
|
3252 |
|
1104 |
.done(function ( response ) {
|
1105 |
AstraSitesAdmin._log( response );
|
1106 |
if( response.success ) {
|
1107 |
+
var total = response.data;
|
1108 |
|
1109 |
AstraSitesAdmin._log( total );
|
1110 |
|
2433 |
}
|
2434 |
};
|
2435 |
evtSource.onerror = function( error ) {
|
2436 |
+
evtSource.close();
|
2437 |
+
console.log( error );
|
2438 |
AstraSitesAdmin._importFailMessage('', 'Import Process Interrupted');
|
2439 |
};
|
2440 |
evtSource.addEventListener( 'log', function ( message ) {
|
2646 |
*
|
2647 |
* @param {string} data Error message.
|
2648 |
*/
|
2649 |
+
_importFailMessage: function( message, heading, jqXHR, topContent ) {
|
2650 |
|
2651 |
heading = heading || 'The import process interrupted';
|
2652 |
|
2653 |
+
var status_code = '';
|
2654 |
+
if( jqXHR ) {
|
2655 |
+
status_code = jqXHR.status ? parseInt( jqXHR.status ) : '';
|
2656 |
+
}
|
2657 |
|
2658 |
if( 200 == status_code && astraSitesVars.debug ) {
|
2659 |
var output = astraSitesVars.importFailedMessageDueToDebug;
|
2660 |
|
2661 |
} else {
|
2662 |
+
var output = topContent || astraSitesVars.importFailedMessage;
|
2663 |
|
2664 |
if( message ) {
|
2665 |
+
output += '<div class="current-importing-status">Error: ' + message +'</div>';
|
2666 |
}
|
2667 |
}
|
2668 |
|
3251 |
console.groupEnd();
|
3252 |
|
3253 |
if( false === response.success ) {
|
3254 |
+
AstraSitesAdmin._importFailMessage( response.data, 'Required Plugins Failed!', '', astraSitesVars.importFailedRequiredPluginsMessage );
|
3255 |
} else {
|
3256 |
required_plugins = response.data['required_plugins'];
|
3257 |
|
inc/assets/js/dist/index.js
CHANGED
@@ -74,65 +74,58 @@
|
|
74 |
|
75 |
(function ($) {
|
76 |
|
77 |
-
AstraImages = {
|
78 |
|
79 |
init: function init() {
|
80 |
|
81 |
if (undefined != wp && wp.media) {
|
82 |
|
83 |
-
var
|
84 |
-
|
85 |
-
l10n = wp.media.view.l10n,
|
86 |
-
Frame = wp.media.view.Frame,
|
87 |
-
$ = jQuery,
|
88 |
-
newVar = {},
|
89 |
-
Select = wp.media.view.MediaFrame.Select;
|
90 |
|
91 |
wp.media.view.AstraAttachmentsBrowser = __webpack_require__(/*! ./frame.js */ 1);
|
92 |
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
}, 100);
|
135 |
-
};
|
136 |
}
|
137 |
}
|
138 |
|
@@ -166,10 +159,7 @@
|
|
166 |
/*! all exports used */
|
167 |
/***/ (function(module, exports, __webpack_require__) {
|
168 |
|
169 |
-
var
|
170 |
-
Frame = wp.media.view.Frame,
|
171 |
-
$ = jQuery,
|
172 |
-
Select = wp.media.view.MediaFrame.Select,
|
173 |
AstraAttachmentsBrowser;
|
174 |
|
175 |
wp.media.view.AstraContent = __webpack_require__(/*! ./content.js */ 2);
|
@@ -260,10 +250,9 @@ module.exports = AstraContent;
|
|
260 |
/*! all exports used */
|
261 |
/***/ (function(module, exports) {
|
262 |
|
263 |
-
var l10n = wp.media.view.l10n;
|
264 |
$ = jQuery;
|
265 |
// Search input view controller.
|
266 |
-
AstraSearch = wp.Backbone.View.extend({
|
267 |
|
268 |
tagName: 'input',
|
269 |
className: 'ast-image__search',
|
@@ -323,7 +312,6 @@ AstraSearch = wp.Backbone.View.extend({
|
|
323 |
return;
|
324 |
}
|
325 |
|
326 |
-
var options = {};
|
327 |
var thisObject = this;
|
328 |
thisObject.searching = true;
|
329 |
AstraImageCommon.config.q = event.target.value;
|
74 |
|
75 |
(function ($) {
|
76 |
|
77 |
+
var AstraImages = {
|
78 |
|
79 |
init: function init() {
|
80 |
|
81 |
if (undefined != wp && wp.media) {
|
82 |
|
83 |
+
var $ = jQuery,
|
84 |
+
oldMediaFrameSelect = wp.media.view.MediaFrame.Select;
|
|
|
|
|
|
|
|
|
|
|
85 |
|
86 |
wp.media.view.AstraAttachmentsBrowser = __webpack_require__(/*! ./frame.js */ 1);
|
87 |
|
88 |
+
wp.media.view.MediaFrame.Select = oldMediaFrameSelect.extend({
|
89 |
+
|
90 |
+
// Tab / Router
|
91 |
+
browseRouter: function browseRouter(routerView) {
|
92 |
+
oldMediaFrameSelect.prototype.browseRouter.apply(this, arguments);
|
93 |
+
routerView.set({
|
94 |
+
astraimages: {
|
95 |
+
text: astraImages.title,
|
96 |
+
priority: 70
|
97 |
+
}
|
98 |
+
});
|
99 |
+
},
|
100 |
+
|
101 |
+
|
102 |
+
// Handlers
|
103 |
+
bindHandlers: function bindHandlers() {
|
104 |
+
oldMediaFrameSelect.prototype.bindHandlers.apply(this, arguments);
|
105 |
+
this.on('content:create:astraimages', this.astraimages, this);
|
106 |
+
},
|
107 |
+
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Render callback for the content region in the `browse` mode.
|
111 |
+
*
|
112 |
+
* @param {wp.media.controller.Region} contentRegion
|
113 |
+
*/
|
114 |
+
astraimages: function astraimages(contentRegion) {
|
115 |
+
var state = this.state();
|
116 |
+
// Browse our library of attachments.
|
117 |
+
var thisView = new wp.media.view.AstraAttachmentsBrowser({
|
118 |
+
controller: this,
|
119 |
+
model: state,
|
120 |
+
AttachmentView: state.get('AttachmentView')
|
121 |
+
});
|
122 |
+
contentRegion.view = thisView;
|
123 |
+
wp.media.view.AstraAttachmentsBrowser.object = thisView;
|
124 |
+
setTimeout(function () {
|
125 |
+
$(document).trigger('ast-image__set-scope');
|
126 |
+
}, 100);
|
127 |
+
}
|
128 |
+
});
|
|
|
|
|
129 |
}
|
130 |
}
|
131 |
|
159 |
/*! all exports used */
|
160 |
/***/ (function(module, exports, __webpack_require__) {
|
161 |
|
162 |
+
var Frame = wp.media.view.Frame,
|
|
|
|
|
|
|
163 |
AstraAttachmentsBrowser;
|
164 |
|
165 |
wp.media.view.AstraContent = __webpack_require__(/*! ./content.js */ 2);
|
250 |
/*! all exports used */
|
251 |
/***/ (function(module, exports) {
|
252 |
|
|
|
253 |
$ = jQuery;
|
254 |
// Search input view controller.
|
255 |
+
var AstraSearch = wp.Backbone.View.extend({
|
256 |
|
257 |
tagName: 'input',
|
258 |
className: 'ast-image__search',
|
312 |
return;
|
313 |
}
|
314 |
|
|
|
315 |
var thisObject = this;
|
316 |
thisObject.searching = true;
|
317 |
AstraImageCommon.config.q = event.target.value;
|
inc/assets/js/elementor-admin-page.js
CHANGED
@@ -318,6 +318,7 @@ var AstraSitesAjaxQueue = (function() {
|
|
318 |
}
|
319 |
|
320 |
button.addClass( 'updating-message');
|
|
|
321 |
$elscope.find( '#ast-sites-floating-notice-wrap-id .ast-sites-floating-notice' ).html( '<span class="message">Syncing template library in the background. The process can take anywhere between 2 to 3 minutes. We will notify you once done.<span><button type="button" class="notice-dismiss"><span class="screen-reader-text">' + astraElementorSites.dismiss_text + '</span></button>' );
|
322 |
$elscope.find( '#ast-sites-floating-notice-wrap-id' ).addClass( 'slide-in' ).removeClass( 'refreshed-notice' );
|
323 |
|
@@ -385,7 +386,7 @@ var AstraSitesAjaxQueue = (function() {
|
|
385 |
.done(function ( response ) {
|
386 |
console.log( response );
|
387 |
if( response.success ) {
|
388 |
-
var total = response.data
|
389 |
|
390 |
for( let i = 1; i <= total; i++ ) {
|
391 |
AstraSitesAjaxQueue.add({
|
@@ -1203,6 +1204,8 @@ var AstraSitesAjaxQueue = (function() {
|
|
1203 |
|
1204 |
let step = $( this ).attr( 'data-step' );
|
1205 |
|
|
|
|
|
1206 |
$elscope.find( '.astra-sites-step-1-wrap' ).show();
|
1207 |
$elscope.find( '.astra-preview-actions-wrap' ).remove();
|
1208 |
|
@@ -1554,89 +1557,97 @@ var AstraSitesAjaxQueue = (function() {
|
|
1554 |
console.groupEnd();
|
1555 |
})
|
1556 |
.done(function ( response ) {
|
|
|
1557 |
|
1558 |
-
|
|
|
|
|
|
|
1559 |
|
1560 |
-
|
1561 |
-
|
1562 |
-
* @type number
|
1563 |
-
*/
|
1564 |
-
var remaining_plugins = 0;
|
1565 |
-
var required_plugins_markup = '';
|
1566 |
|
1567 |
-
|
|
|
|
|
|
|
|
|
|
|
1568 |
|
1569 |
-
|
1570 |
-
output += '<li class="plugin-card plugin-card-'+plugin.slug+'" data-slug="'+plugin.slug+'" data-init="'+plugin.init+'" data-name="'+plugin.name+'">'+plugin.name+'</li>';
|
1571 |
-
}
|
1572 |
|
1573 |
-
|
1574 |
-
|
1575 |
-
|
1576 |
-
* List of not installed required plugins.
|
1577 |
-
*/
|
1578 |
-
if ( typeof required_plugins.notinstalled !== 'undefined' ) {
|
1579 |
|
1580 |
-
|
1581 |
-
|
|
|
|
|
|
|
|
|
1582 |
|
1583 |
-
|
1584 |
-
|
1585 |
-
return;
|
1586 |
-
}
|
1587 |
-
output += '<li class="plugin-card plugin-card-'+plugin.slug+'" data-slug="'+plugin.slug+'" data-init="'+plugin.init+'" data-name="'+plugin.name+'">'+plugin.name+'</li>';
|
1588 |
-
});
|
1589 |
-
}
|
1590 |
|
1591 |
-
|
1592 |
-
|
1593 |
-
|
1594 |
-
|
1595 |
-
|
1596 |
-
|
|
|
1597 |
|
1598 |
-
|
1599 |
-
|
|
|
|
|
|
|
|
|
1600 |
|
1601 |
-
|
1602 |
-
|
1603 |
-
return;
|
1604 |
-
}
|
1605 |
-
output += '<li class="plugin-card plugin-card-'+plugin.slug+'" data-slug="'+plugin.slug+'" data-init="'+plugin.init+'" data-name="'+plugin.name+'">'+plugin.name+'</li>';
|
1606 |
-
});
|
1607 |
-
}
|
1608 |
|
1609 |
-
|
1610 |
-
|
1611 |
-
|
1612 |
-
|
1613 |
-
|
1614 |
-
|
|
|
1615 |
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
1619 |
-
|
1620 |
-
|
1621 |
-
|
1622 |
-
}
|
1623 |
|
1624 |
-
|
1625 |
-
|
1626 |
-
|
1627 |
-
|
1628 |
-
|
1629 |
-
|
|
|
1630 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1631 |
|
1632 |
-
|
1633 |
-
|
1634 |
-
|
1635 |
-
|
1636 |
-
|
1637 |
-
|
1638 |
-
|
1639 |
-
|
|
|
|
|
1640 |
});
|
1641 |
},
|
1642 |
|
318 |
}
|
319 |
|
320 |
button.addClass( 'updating-message');
|
321 |
+
$elscope.find( '#ast-sites-floating-notice-wrap-id' ).show().removeClass('error');
|
322 |
$elscope.find( '#ast-sites-floating-notice-wrap-id .ast-sites-floating-notice' ).html( '<span class="message">Syncing template library in the background. The process can take anywhere between 2 to 3 minutes. We will notify you once done.<span><button type="button" class="notice-dismiss"><span class="screen-reader-text">' + astraElementorSites.dismiss_text + '</span></button>' );
|
323 |
$elscope.find( '#ast-sites-floating-notice-wrap-id' ).addClass( 'slide-in' ).removeClass( 'refreshed-notice' );
|
324 |
|
386 |
.done(function ( response ) {
|
387 |
console.log( response );
|
388 |
if( response.success ) {
|
389 |
+
var total = response.data;
|
390 |
|
391 |
for( let i = 1; i <= total; i++ ) {
|
392 |
AstraSitesAjaxQueue.add({
|
1204 |
|
1205 |
let step = $( this ).attr( 'data-step' );
|
1206 |
|
1207 |
+
$elscope.find( '#ast-sites-floating-notice-wrap-id.error' ).hide();
|
1208 |
+
|
1209 |
$elscope.find( '.astra-sites-step-1-wrap' ).show();
|
1210 |
$elscope.find( '.astra-preview-actions-wrap' ).remove();
|
1211 |
|
1557 |
console.groupEnd();
|
1558 |
})
|
1559 |
.done(function ( response ) {
|
1560 |
+
if( false === response.success ) {
|
1561 |
|
1562 |
+
$elscope = $( '#ast-sites-modal' );
|
1563 |
+
$elscope.find( '#ast-sites-floating-notice-wrap-id' ).show().removeClass('error');
|
1564 |
+
$elscope.find( '#ast-sites-floating-notice-wrap-id .ast-sites-floating-notice' ).show().html( '<span class="message">Insufficient Permission. Please contact your Super Admin to allow the install required plugin permissions.<span>' );
|
1565 |
+
$elscope.find( '#ast-sites-floating-notice-wrap-id' ).addClass( 'error slide-in' ).removeClass( 'refreshed-notice' );
|
1566 |
|
1567 |
+
} else {
|
1568 |
+
var output = '';
|
|
|
|
|
|
|
|
|
1569 |
|
1570 |
+
/**
|
1571 |
+
* Count remaining plugins.
|
1572 |
+
* @type number
|
1573 |
+
*/
|
1574 |
+
var remaining_plugins = 0;
|
1575 |
+
var required_plugins_markup = '';
|
1576 |
|
1577 |
+
required_plugins = response.data['required_plugins'];
|
|
|
|
|
1578 |
|
1579 |
+
if( response.data['third_party_required_plugins'].length ) {
|
1580 |
+
output += '<li class="plugin-card plugin-card-'+plugin.slug+'" data-slug="'+plugin.slug+'" data-init="'+plugin.init+'" data-name="'+plugin.name+'">'+plugin.name+'</li>';
|
1581 |
+
}
|
|
|
|
|
|
|
1582 |
|
1583 |
+
/**
|
1584 |
+
* Not Installed
|
1585 |
+
*
|
1586 |
+
* List of not installed required plugins.
|
1587 |
+
*/
|
1588 |
+
if ( typeof required_plugins.notinstalled !== 'undefined' ) {
|
1589 |
|
1590 |
+
// Add not have installed plugins count.
|
1591 |
+
remaining_plugins += parseInt( required_plugins.notinstalled.length );
|
|
|
|
|
|
|
|
|
|
|
1592 |
|
1593 |
+
$( required_plugins.notinstalled ).each(function( index, plugin ) {
|
1594 |
+
if ( 'elementor' == plugin.slug ) {
|
1595 |
+
return;
|
1596 |
+
}
|
1597 |
+
output += '<li class="plugin-card plugin-card-'+plugin.slug+'" data-slug="'+plugin.slug+'" data-init="'+plugin.init+'" data-name="'+plugin.name+'">'+plugin.name+'</li>';
|
1598 |
+
});
|
1599 |
+
}
|
1600 |
|
1601 |
+
/**
|
1602 |
+
* Inactive
|
1603 |
+
*
|
1604 |
+
* List of not inactive required plugins.
|
1605 |
+
*/
|
1606 |
+
if ( typeof required_plugins.inactive !== 'undefined' ) {
|
1607 |
|
1608 |
+
// Add inactive plugins count.
|
1609 |
+
remaining_plugins += parseInt( required_plugins.inactive.length );
|
|
|
|
|
|
|
|
|
|
|
1610 |
|
1611 |
+
$( required_plugins.inactive ).each(function( index, plugin ) {
|
1612 |
+
if ( 'elementor' == plugin.slug ) {
|
1613 |
+
return;
|
1614 |
+
}
|
1615 |
+
output += '<li class="plugin-card plugin-card-'+plugin.slug+'" data-slug="'+plugin.slug+'" data-init="'+plugin.init+'" data-name="'+plugin.name+'">'+plugin.name+'</li>';
|
1616 |
+
});
|
1617 |
+
}
|
1618 |
|
1619 |
+
/**
|
1620 |
+
* Active
|
1621 |
+
*
|
1622 |
+
* List of not active required plugins.
|
1623 |
+
*/
|
1624 |
+
if ( typeof required_plugins.active !== 'undefined' ) {
|
|
|
1625 |
|
1626 |
+
$( required_plugins.active ).each(function( index, plugin ) {
|
1627 |
+
if ( 'elementor' == plugin.slug ) {
|
1628 |
+
return;
|
1629 |
+
}
|
1630 |
+
output += '<li class="plugin-card plugin-card-'+plugin.slug+'" data-slug="'+plugin.slug+'" data-init="'+plugin.init+'" data-name="'+plugin.name+'">'+plugin.name+'</li>';
|
1631 |
+
});
|
1632 |
+
}
|
1633 |
|
1634 |
+
if ( '' != output ) {
|
1635 |
+
output = '<li class="plugin-card-head"><strong>' + astraElementorSites.install_plugin_text + '</strong></li>' + output;
|
1636 |
+
$elscope.find('.required-plugins-list').html( output );
|
1637 |
+
$elscope.find('.ast-tooltip-wrap').css( 'opacity', 1 );
|
1638 |
+
$elscope.find('.astra-sites-tooltip').css( 'opacity', 1 );
|
1639 |
+
}
|
1640 |
|
1641 |
+
|
1642 |
+
/**
|
1643 |
+
* Enable Demo Import Button
|
1644 |
+
* @type number
|
1645 |
+
*/
|
1646 |
+
AstraElementorSitesAdmin.requiredPlugins = response.data['required_plugins'];
|
1647 |
+
AstraElementorSitesAdmin.canImport = true;
|
1648 |
+
AstraElementorSitesAdmin.canInsert = true;
|
1649 |
+
$elscope.find( '.astra-sites-import-template-action > div' ).removeClass( 'disabled' );
|
1650 |
+
}
|
1651 |
});
|
1652 |
},
|
1653 |
|
inc/assets/js/src/frame.js
CHANGED
@@ -1,7 +1,4 @@
|
|
1 |
-
var
|
2 |
-
Frame = wp.media.view.Frame,
|
3 |
-
$ = jQuery,
|
4 |
-
Select = wp.media.view.MediaFrame.Select,
|
5 |
AstraAttachmentsBrowser;
|
6 |
|
7 |
wp.media.view.AstraContent = require( './content.js' );
|
1 |
+
var Frame = wp.media.view.Frame,
|
|
|
|
|
|
|
2 |
AstraAttachmentsBrowser;
|
3 |
|
4 |
wp.media.view.AstraContent = require( './content.js' );
|
inc/assets/js/src/index.js
CHANGED
@@ -1,64 +1,56 @@
|
|
1 |
(function($){
|
2 |
|
3 |
-
AstraImages = {
|
4 |
|
5 |
init: function() {
|
6 |
|
7 |
if ( undefined != wp && wp.media ) {
|
8 |
|
9 |
-
var
|
10 |
-
|
11 |
-
l10n = wp.media.view.l10n,
|
12 |
-
Frame = wp.media.view.Frame,
|
13 |
-
$ = jQuery,
|
14 |
-
newVar = {},
|
15 |
-
Select = wp.media.view.MediaFrame.Select;
|
16 |
|
17 |
wp.media.view.AstraAttachmentsBrowser = require( './frame.js' );
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
$( document ).trigger( 'ast-image__set-scope' );
|
60 |
-
}, 100 );
|
61 |
-
}
|
62 |
}
|
63 |
},
|
64 |
|
1 |
(function($){
|
2 |
|
3 |
+
var AstraImages = {
|
4 |
|
5 |
init: function() {
|
6 |
|
7 |
if ( undefined != wp && wp.media ) {
|
8 |
|
9 |
+
var $ = jQuery,
|
10 |
+
oldMediaFrameSelect = wp.media.view.MediaFrame.Select;
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
wp.media.view.AstraAttachmentsBrowser = require( './frame.js' );
|
13 |
|
14 |
+
wp.media.view.MediaFrame.Select = oldMediaFrameSelect.extend( {
|
15 |
+
|
16 |
+
// Tab / Router
|
17 |
+
browseRouter( routerView ) {
|
18 |
+
oldMediaFrameSelect.prototype.browseRouter.apply( this, arguments );
|
19 |
+
routerView.set( {
|
20 |
+
astraimages: {
|
21 |
+
text: astraImages.title,
|
22 |
+
priority: 70,
|
23 |
+
},
|
24 |
+
} );
|
25 |
+
},
|
26 |
+
|
27 |
+
// Handlers
|
28 |
+
bindHandlers() {
|
29 |
+
oldMediaFrameSelect.prototype.bindHandlers.apply( this, arguments );
|
30 |
+
this.on( 'content:create:astraimages', this.astraimages, this );
|
31 |
+
},
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Render callback for the content region in the `browse` mode.
|
35 |
+
*
|
36 |
+
* @param {wp.media.controller.Region} contentRegion
|
37 |
+
*/
|
38 |
+
astraimages( contentRegion ) {
|
39 |
+
const state = this.state();
|
40 |
+
// Browse our library of attachments.
|
41 |
+
let thisView = new wp.media.view.AstraAttachmentsBrowser({
|
42 |
+
controller: this,
|
43 |
+
model: state,
|
44 |
+
AttachmentView: state.get( 'AttachmentView' )
|
45 |
+
});
|
46 |
+
contentRegion.view = thisView
|
47 |
+
wp.media.view.AstraAttachmentsBrowser.object = thisView
|
48 |
+
setTimeout( function() {
|
49 |
+
$( document ).trigger( 'ast-image__set-scope' );
|
50 |
+
}, 100 );
|
51 |
+
}
|
52 |
+
|
53 |
+
});
|
|
|
|
|
|
|
54 |
}
|
55 |
},
|
56 |
|
inc/assets/js/src/search.js
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
-
var l10n = wp.media.view.l10n
|
2 |
$ = jQuery
|
3 |
// Search input view controller.
|
4 |
-
AstraSearch = wp.Backbone.View.extend({
|
5 |
|
6 |
tagName: 'input',
|
7 |
className: 'ast-image__search',
|
@@ -61,7 +60,6 @@ AstraSearch = wp.Backbone.View.extend({
|
|
61 |
return;
|
62 |
}
|
63 |
|
64 |
-
var options = {};
|
65 |
let thisObject = this;
|
66 |
thisObject.searching = true;
|
67 |
AstraImageCommon.config.q = event.target.value;
|
|
|
1 |
$ = jQuery
|
2 |
// Search input view controller.
|
3 |
+
var AstraSearch = wp.Backbone.View.extend({
|
4 |
|
5 |
tagName: 'input',
|
6 |
className: 'ast-image__search',
|
60 |
return;
|
61 |
}
|
62 |
|
|
|
63 |
let thisObject = this;
|
64 |
thisObject.searching = true;
|
65 |
AstraImageCommon.config.q = event.target.value;
|
inc/classes/class-astra-sites-importer.php
CHANGED
@@ -645,7 +645,7 @@ if ( ! class_exists( 'Astra_Sites_Importer' ) ) {
|
|
645 |
*/
|
646 |
public function update_latest_checksums() {
|
647 |
$latest_checksums = get_site_option( 'astra-sites-last-export-checksums-latest', '' );
|
648 |
-
update_site_option( 'astra-sites-last-export-checksums', $latest_checksums );
|
649 |
}
|
650 |
|
651 |
/**
|
@@ -858,7 +858,7 @@ if ( ! class_exists( 'Astra_Sites_Importer' ) ) {
|
|
858 |
$message = '';
|
859 |
if ( $term_id ) {
|
860 |
$term = get_term( $term_id );
|
861 |
-
if ( $term ) {
|
862 |
$message = 'Deleted - Term ' . $term_id . ' - ' . $term->name . ' ' . $term->taxonomy;
|
863 |
Astra_Sites_Importer_Log::add( $message );
|
864 |
wp_delete_term( $term_id, $term->taxonomy );
|
645 |
*/
|
646 |
public function update_latest_checksums() {
|
647 |
$latest_checksums = get_site_option( 'astra-sites-last-export-checksums-latest', '' );
|
648 |
+
update_site_option( 'astra-sites-last-export-checksums', $latest_checksums, 'no' );
|
649 |
}
|
650 |
|
651 |
/**
|
858 |
$message = '';
|
859 |
if ( $term_id ) {
|
860 |
$term = get_term( $term_id );
|
861 |
+
if ( ! is_wp_error( $term ) ) {
|
862 |
$message = 'Deleted - Term ' . $term_id . ' - ' . $term->name . ' ' . $term->taxonomy;
|
863 |
Astra_Sites_Importer_Log::add( $message );
|
864 |
wp_delete_term( $term_id, $term->taxonomy );
|
inc/classes/class-astra-sites-page.php
CHANGED
@@ -174,7 +174,7 @@ if ( ! class_exists( 'Astra_Sites_Page' ) ) {
|
|
174 |
$data = wp_parse_args( $new_data, $stored_data );
|
175 |
|
176 |
// Update settings.
|
177 |
-
update_option( 'astra_sites_settings', $data );
|
178 |
}
|
179 |
|
180 |
if ( ! defined( 'WP_CLI' ) ) {
|
@@ -207,7 +207,7 @@ if ( ! class_exists( 'Astra_Sites_Page' ) ) {
|
|
207 |
$data = wp_parse_args( $new_data, $stored_data );
|
208 |
|
209 |
// Update settings.
|
210 |
-
update_option( 'astra_sites_settings', $data );
|
211 |
|
212 |
$sites = $this->get_sites_by_page_builder( $new_data['page_builder'] );
|
213 |
|
@@ -286,7 +286,7 @@ if ( ! class_exists( 'Astra_Sites_Page' ) ) {
|
|
286 |
|
287 |
$new_data = wp_parse_args( $args, $stored_data );
|
288 |
|
289 |
-
update_option( 'astra_sites_settings', $new_data );
|
290 |
}
|
291 |
|
292 |
/**
|
174 |
$data = wp_parse_args( $new_data, $stored_data );
|
175 |
|
176 |
// Update settings.
|
177 |
+
update_option( 'astra_sites_settings', $data, 'no' );
|
178 |
}
|
179 |
|
180 |
if ( ! defined( 'WP_CLI' ) ) {
|
207 |
$data = wp_parse_args( $new_data, $stored_data );
|
208 |
|
209 |
// Update settings.
|
210 |
+
update_option( 'astra_sites_settings', $data, 'no' );
|
211 |
|
212 |
$sites = $this->get_sites_by_page_builder( $new_data['page_builder'] );
|
213 |
|
286 |
|
287 |
$new_data = wp_parse_args( $args, $stored_data );
|
288 |
|
289 |
+
update_option( 'astra_sites_settings', $new_data, 'no' );
|
290 |
}
|
291 |
|
292 |
/**
|
inc/classes/class-astra-sites.php
CHANGED
@@ -107,9 +107,9 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
|
|
107 |
add_action( 'wp_enqueue_scripts', array( $this, 'image_search_scripts' ) );
|
108 |
add_action( 'elementor/editor/footer', array( $this, 'insert_templates' ) );
|
109 |
add_action( 'admin_footer', array( $this, 'insert_image_templates' ) );
|
|
|
110 |
add_action( 'wp_footer', array( $this, 'insert_image_templates_bb_and_brizy' ) );
|
111 |
add_action( 'elementor/editor/footer', array( $this, 'register_widget_scripts' ), 99 );
|
112 |
-
add_action( 'elementor/editor/wp_head', array( $this, 'add_predefined_variables' ) );
|
113 |
add_action( 'elementor/editor/before_enqueue_scripts', array( $this, 'popup_styles' ) );
|
114 |
add_action( 'elementor/preview/enqueue_styles', array( $this, 'popup_styles' ) );
|
115 |
|
@@ -201,18 +201,18 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
|
|
201 |
*/
|
202 |
public function image_search_scripts() {
|
203 |
|
204 |
-
if (
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
}
|
217 |
}
|
218 |
|
@@ -301,24 +301,6 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
|
|
301 |
}
|
302 |
}
|
303 |
|
304 |
-
/**
|
305 |
-
* Add Predefined Variables
|
306 |
-
*
|
307 |
-
* @since 2.0.0
|
308 |
-
*/
|
309 |
-
public function add_predefined_variables() {
|
310 |
-
|
311 |
-
global $current_screen;
|
312 |
-
?>
|
313 |
-
<script type="text/javascript">
|
314 |
-
addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
|
315 |
-
var ajaxurl = '<?php echo esc_url( admin_url( 'admin-ajax.php', 'relative' ) ); ?>',
|
316 |
-
pagenow = '<?php echo esc_html( $current_screen->id ); ?>',
|
317 |
-
typenow = '<?php echo esc_html( $current_screen->post_type ); ?>';
|
318 |
-
</script>
|
319 |
-
<?php
|
320 |
-
}
|
321 |
-
|
322 |
/**
|
323 |
* Insert Template
|
324 |
*
|
@@ -337,20 +319,18 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
|
|
337 |
*/
|
338 |
public function insert_image_templates_bb_and_brizy() {
|
339 |
|
340 |
-
if (
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
ob_end_flush();
|
353 |
-
}
|
354 |
}
|
355 |
}
|
356 |
|
@@ -789,7 +769,7 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
|
|
789 |
wp_send_json_error( __( 'You are not allowed to perform this action', 'astra-sites' ) );
|
790 |
}
|
791 |
|
792 |
-
update_option( '_astra_sites_gettings_started', 'yes' );
|
793 |
wp_send_json_success();
|
794 |
}
|
795 |
|
@@ -1088,7 +1068,9 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
|
|
1088 |
public function admin_enqueue( $hook = '' ) {
|
1089 |
|
1090 |
// Image Search assets.
|
1091 |
-
$
|
|
|
|
|
1092 |
|
1093 |
wp_enqueue_script( 'astra-sites-install-theme', ASTRA_SITES_URI . 'inc/assets/js/install-theme.js', array( 'jquery', 'updates' ), ASTRA_SITES_VER, true );
|
1094 |
wp_enqueue_style( 'astra-sites-install-theme', ASTRA_SITES_URI . 'inc/assets/css/install-theme.css', null, ASTRA_SITES_VER, 'all' );
|
@@ -1176,25 +1158,27 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
|
|
1176 |
$data = apply_filters(
|
1177 |
'astra_sites_localize_vars',
|
1178 |
array(
|
1179 |
-
'debug'
|
1180 |
-
'isPro'
|
1181 |
-
'isWhiteLabeled'
|
1182 |
-
'whiteLabelName'
|
1183 |
-
'ajaxurl'
|
1184 |
-
'siteURL'
|
1185 |
-
'getProText'
|
1186 |
-
'getProURL'
|
1187 |
-
'getUpgradeText'
|
1188 |
-
'getUpgradeURL'
|
1189 |
-
'_ajax_nonce'
|
1190 |
-
'requiredPlugins'
|
1191 |
-
'syncLibraryStart'
|
1192 |
-
'xmlRequiredFilesMissing'
|
1193 |
-
'importFailedMessageDueToDebug'
|
1194 |
/* translators: %s is a documentation link. */
|
1195 |
-
'importFailedMessage'
|
|
|
|
|
1196 |
|
1197 |
-
'strings'
|
1198 |
/* translators: %s are white label strings. */
|
1199 |
'warningBeforeCloseWindow' => sprintf( __( 'Warning! %1$s Import process is not complete. Don\'t close the window until import process complete. Do you still want to leave the window?', 'astra-sites' ), Astra_Sites_White_Label::get_instance()->get_white_label_name() ),
|
1200 |
'viewSite' => __( 'Done! View Site', 'astra-sites' ),
|
@@ -1202,29 +1186,29 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
|
|
1202 |
/* translators: %s is a template name */
|
1203 |
'importSingleTemplate' => __( 'Import "%s" Template', 'astra-sites' ),
|
1204 |
),
|
1205 |
-
'log'
|
1206 |
'bulkInstall' => __( 'Installing Required Plugins..', 'astra-sites' ),
|
1207 |
/* translators: %s are white label strings. */
|
1208 |
'themeInstall' => sprintf( __( 'Installing %1$s Theme..', 'astra-sites' ), Astra_Sites_White_Label::get_instance()->get_option( 'astra', 'name', 'Astra' ) ),
|
1209 |
),
|
1210 |
-
'default_page_builder'
|
1211 |
-
'default_page_builder_sites'
|
1212 |
-
'sites'
|
1213 |
-
'categories'
|
1214 |
-
'page-builders'
|
1215 |
-
'api_sites_and_pages_tags'
|
1216 |
-
'license_status'
|
1217 |
-
'license_page_builder'
|
1218 |
-
|
1219 |
-
'ApiURL'
|
1220 |
-
'stored_data'
|
1221 |
-
'favorite_data'
|
1222 |
-
'category_slug'
|
1223 |
-
'page_builder'
|
1224 |
-
'cpt_slug'
|
1225 |
-
'parent_category'
|
1226 |
-
'compatibilities'
|
1227 |
-
'compatibilities_data'
|
1228 |
|
1229 |
)
|
1230 |
);
|
@@ -1474,6 +1458,7 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
|
|
1474 |
|
1475 |
require_once ASTRA_SITES_DIR . 'inc/classes/functions.php';
|
1476 |
require_once ASTRA_SITES_DIR . 'inc/lib/astra-notices/class-astra-notices.php';
|
|
|
1477 |
require_once ASTRA_SITES_DIR . 'inc/classes/class-astra-sites-white-label.php';
|
1478 |
require_once ASTRA_SITES_DIR . 'inc/classes/class-astra-sites-page.php';
|
1479 |
require_once ASTRA_SITES_DIR . 'inc/classes/class-astra-sites-elementor-pages.php';
|
@@ -1567,10 +1552,6 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
|
|
1567 |
'notinstalled' => array(),
|
1568 |
);
|
1569 |
|
1570 |
-
if ( ! defined( 'WP_CLI' ) && ! current_user_can( 'install_plugins' ) ) {
|
1571 |
-
wp_send_json_error( $response );
|
1572 |
-
}
|
1573 |
-
|
1574 |
$required_plugins = ( isset( $_POST['required_plugins'] ) ) ? $_POST['required_plugins'] : $required_plugins;
|
1575 |
|
1576 |
$third_party_required_plugins = array();
|
@@ -1653,6 +1634,27 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
|
|
1653 |
}
|
1654 |
}
|
1655 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1656 |
$data = array(
|
1657 |
'required_plugins' => $response,
|
1658 |
'third_party_required_plugins' => $third_party_required_plugins,
|
107 |
add_action( 'wp_enqueue_scripts', array( $this, 'image_search_scripts' ) );
|
108 |
add_action( 'elementor/editor/footer', array( $this, 'insert_templates' ) );
|
109 |
add_action( 'admin_footer', array( $this, 'insert_image_templates' ) );
|
110 |
+
add_action( 'customize_controls_print_footer_scripts', array( $this, 'insert_image_templates' ) );
|
111 |
add_action( 'wp_footer', array( $this, 'insert_image_templates_bb_and_brizy' ) );
|
112 |
add_action( 'elementor/editor/footer', array( $this, 'register_widget_scripts' ), 99 );
|
|
|
113 |
add_action( 'elementor/editor/before_enqueue_scripts', array( $this, 'popup_styles' ) );
|
114 |
add_action( 'elementor/preview/enqueue_styles', array( $this, 'popup_styles' ) );
|
115 |
|
201 |
*/
|
202 |
public function image_search_scripts() {
|
203 |
|
204 |
+
if (
|
205 |
+
class_exists( 'FLBuilderModel' ) && FLBuilderModel::is_builder_active() // BB Builder is on?
|
206 |
+
||
|
207 |
+
(
|
208 |
+
class_exists( 'Brizy_Editor_Post' ) && // Brizy Builder is on?
|
209 |
+
( isset( $_GET['brizy-edit'] ) || isset( $_GET['brizy-edit-iframe'] ) ) // phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
210 |
+
)
|
211 |
+
||
|
212 |
+
is_customize_preview() // Is customizer on?
|
213 |
+
) {
|
214 |
+
// Image Search assets.
|
215 |
+
$this->image_search_assets();
|
216 |
}
|
217 |
}
|
218 |
|
301 |
}
|
302 |
}
|
303 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
304 |
/**
|
305 |
* Insert Template
|
306 |
*
|
319 |
*/
|
320 |
public function insert_image_templates_bb_and_brizy() {
|
321 |
|
322 |
+
if (
|
323 |
+
class_exists( 'FLBuilderModel' ) && FLBuilderModel::is_builder_active() // BB Builder is on?
|
324 |
+
||
|
325 |
+
(
|
326 |
+
class_exists( 'Brizy_Editor_Post' ) && // Brizy Builder is on?
|
327 |
+
( isset( $_GET['brizy-edit'] ) || isset( $_GET['brizy-edit-iframe'] ) ) // phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
328 |
+
)
|
329 |
+
) {
|
330 |
+
// Image Search Templates.
|
331 |
+
ob_start();
|
332 |
+
require_once ASTRA_SITES_DIR . 'inc/includes/image-templates.php';
|
333 |
+
ob_end_flush();
|
|
|
|
|
334 |
}
|
335 |
}
|
336 |
|
769 |
wp_send_json_error( __( 'You are not allowed to perform this action', 'astra-sites' ) );
|
770 |
}
|
771 |
|
772 |
+
update_option( '_astra_sites_gettings_started', 'yes', 'no' );
|
773 |
wp_send_json_success();
|
774 |
}
|
775 |
|
1068 |
public function admin_enqueue( $hook = '' ) {
|
1069 |
|
1070 |
// Image Search assets.
|
1071 |
+
if ( 'post.php' === $hook || 'widgets.php' === $hook ) {
|
1072 |
+
$this->image_search_assets();
|
1073 |
+
}
|
1074 |
|
1075 |
wp_enqueue_script( 'astra-sites-install-theme', ASTRA_SITES_URI . 'inc/assets/js/install-theme.js', array( 'jquery', 'updates' ), ASTRA_SITES_VER, true );
|
1076 |
wp_enqueue_style( 'astra-sites-install-theme', ASTRA_SITES_URI . 'inc/assets/css/install-theme.css', null, ASTRA_SITES_VER, 'all' );
|
1158 |
$data = apply_filters(
|
1159 |
'astra_sites_localize_vars',
|
1160 |
array(
|
1161 |
+
'debug' => defined( 'WP_DEBUG' ) ? true : false,
|
1162 |
+
'isPro' => defined( 'ASTRA_PRO_SITES_NAME' ) ? true : false,
|
1163 |
+
'isWhiteLabeled' => Astra_Sites_White_Label::get_instance()->is_white_labeled(),
|
1164 |
+
'whiteLabelName' => Astra_Sites_White_Label::get_instance()->get_white_label_name(),
|
1165 |
+
'ajaxurl' => esc_url( admin_url( 'admin-ajax.php' ) ),
|
1166 |
+
'siteURL' => site_url(),
|
1167 |
+
'getProText' => __( 'Get Agency Bundle', 'astra-sites' ),
|
1168 |
+
'getProURL' => esc_url( 'https://wpastra.com/pricing/?utm_source=demo-import-panel&utm_campaign=astra-sites&utm_medium=wp-dashboard' ),
|
1169 |
+
'getUpgradeText' => __( 'Upgrade', 'astra-sites' ),
|
1170 |
+
'getUpgradeURL' => esc_url( 'https://wpastra.com/pricing/?utm_source=demo-import-panel&utm_campaign=astra-sites&utm_medium=wp-dashboard' ),
|
1171 |
+
'_ajax_nonce' => wp_create_nonce( 'astra-sites' ),
|
1172 |
+
'requiredPlugins' => array(),
|
1173 |
+
'syncLibraryStart' => '<span class="message">' . esc_html__( 'Syncing template library in the background. The process can take anywhere between 2 to 3 minutes. We will notify you once done.', 'astra-sites' ) . '</span>',
|
1174 |
+
'xmlRequiredFilesMissing' => __( 'Some of the files required during the import process are missing.<br/><br/>Please try again after some time.', 'astra-sites' ),
|
1175 |
+
'importFailedMessageDueToDebug' => __( '<p>WordPress debug mode is currently enabled on your website. This has interrupted the import process..</p><p>Kindly disable debug mode and try importing Starter Template again.</p><p>You can add the following code into the wp-config.php file to disable debug mode.</p><p><code>define(\'WP_DEBUG\', false);</code></p>', 'astra-sites' ),
|
1176 |
/* translators: %s is a documentation link. */
|
1177 |
+
'importFailedMessage' => sprintf( __( '<p>Your website is facing a temporary issue in connecting the template server.</p><p>Read <a href="%s" target="_blank">article</a> to resolve the issue and continue importing template.</p>', 'astra-sites' ), esc_url( 'https://wpastra.com/docs/import-process-interrupted/' ) ),
|
1178 |
+
/* translators: %s is a documentation link. */
|
1179 |
+
'importFailedRequiredPluginsMessage' => sprintf( __( '<p>Your website is facing a temporary issue in connecting the template server.</p><p>Read <a href="%s" target="_blank">article</a> to resolve the issue and continue importing template.</p>', 'astra-sites' ), esc_url( 'https://wpastra.com/docs/plugin-installation-failed-multisite/' ) ),
|
1180 |
|
1181 |
+
'strings' => array(
|
1182 |
/* translators: %s are white label strings. */
|
1183 |
'warningBeforeCloseWindow' => sprintf( __( 'Warning! %1$s Import process is not complete. Don\'t close the window until import process complete. Do you still want to leave the window?', 'astra-sites' ), Astra_Sites_White_Label::get_instance()->get_white_label_name() ),
|
1184 |
'viewSite' => __( 'Done! View Site', 'astra-sites' ),
|
1186 |
/* translators: %s is a template name */
|
1187 |
'importSingleTemplate' => __( 'Import "%s" Template', 'astra-sites' ),
|
1188 |
),
|
1189 |
+
'log' => array(
|
1190 |
'bulkInstall' => __( 'Installing Required Plugins..', 'astra-sites' ),
|
1191 |
/* translators: %s are white label strings. */
|
1192 |
'themeInstall' => sprintf( __( 'Installing %1$s Theme..', 'astra-sites' ), Astra_Sites_White_Label::get_instance()->get_option( 'astra', 'name', 'Astra' ) ),
|
1193 |
),
|
1194 |
+
'default_page_builder' => $default_page_builder,
|
1195 |
+
'default_page_builder_sites' => Astra_Sites_Page::get_instance()->get_sites_by_page_builder( $default_page_builder ),
|
1196 |
+
'sites' => $request_params,
|
1197 |
+
'categories' => array(),
|
1198 |
+
'page-builders' => array(),
|
1199 |
+
'api_sites_and_pages_tags' => $this->get_api_option( 'astra-sites-tags' ),
|
1200 |
+
'license_status' => $license_status,
|
1201 |
+
'license_page_builder' => get_option( 'astra-sites-license-page-builder', '' ),
|
1202 |
+
|
1203 |
+
'ApiURL' => $this->api_url,
|
1204 |
+
'stored_data' => $stored_data,
|
1205 |
+
'favorite_data' => $favorite_data,
|
1206 |
+
'category_slug' => 'astra-site-category',
|
1207 |
+
'page_builder' => 'astra-site-page-builder',
|
1208 |
+
'cpt_slug' => 'astra-sites',
|
1209 |
+
'parent_category' => '',
|
1210 |
+
'compatibilities' => $this->get_compatibilities(),
|
1211 |
+
'compatibilities_data' => $this->get_compatibilities_data(),
|
1212 |
|
1213 |
)
|
1214 |
);
|
1458 |
|
1459 |
require_once ASTRA_SITES_DIR . 'inc/classes/functions.php';
|
1460 |
require_once ASTRA_SITES_DIR . 'inc/lib/astra-notices/class-astra-notices.php';
|
1461 |
+
require_once ASTRA_SITES_DIR . 'inc/lib/bsf-analytics/class-bsf-analytics.php';
|
1462 |
require_once ASTRA_SITES_DIR . 'inc/classes/class-astra-sites-white-label.php';
|
1463 |
require_once ASTRA_SITES_DIR . 'inc/classes/class-astra-sites-page.php';
|
1464 |
require_once ASTRA_SITES_DIR . 'inc/classes/class-astra-sites-elementor-pages.php';
|
1552 |
'notinstalled' => array(),
|
1553 |
);
|
1554 |
|
|
|
|
|
|
|
|
|
1555 |
$required_plugins = ( isset( $_POST['required_plugins'] ) ) ? $_POST['required_plugins'] : $required_plugins;
|
1556 |
|
1557 |
$third_party_required_plugins = array();
|
1634 |
}
|
1635 |
}
|
1636 |
|
1637 |
+
// Checking the `install_plugins` and `activate_plugins` capability for the current user.
|
1638 |
+
// To perform plugin installation process.
|
1639 |
+
if (
|
1640 |
+
( ! current_user_can( 'install_plugins' ) && ! empty( $response['notinstalled'] ) ) ||
|
1641 |
+
( ! current_user_can( 'activate_plugins' ) && ! empty( $response['inactive'] ) ) ) {
|
1642 |
+
$message = __( 'Insufficient Permission. Please contact your Super Admin to allow the install required plugin permissions.', 'astra-sites' );
|
1643 |
+
if ( defined( 'WP_CLI' ) && WP_CLI ) {
|
1644 |
+
WP_CLI::error( $message );
|
1645 |
+
} else {
|
1646 |
+
$required_plugins_list = array_merge( $response['notinstalled'], $response['inactive'] );
|
1647 |
+
$markup = $message;
|
1648 |
+
$markup .= '<ul>';
|
1649 |
+
foreach ( $required_plugins_list as $key => $required_plugin ) {
|
1650 |
+
$markup .= '<li>' . esc_html( $required_plugin['name'] ) . '</li>';
|
1651 |
+
}
|
1652 |
+
$markup .= '</ul>';
|
1653 |
+
|
1654 |
+
wp_send_json_error( $markup );
|
1655 |
+
}
|
1656 |
+
}
|
1657 |
+
|
1658 |
$data = array(
|
1659 |
'required_plugins' => $response,
|
1660 |
'third_party_required_plugins' => $third_party_required_plugins,
|
inc/importers/batch-processing/class-astra-sites-batch-processing-beaver-builder.php
CHANGED
@@ -78,10 +78,7 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing_Beaver_Builder' ) ) :
|
|
78 |
}
|
79 |
|
80 |
foreach ( $post_ids as $post_id ) {
|
81 |
-
$
|
82 |
-
if ( $is_bb_post ) {
|
83 |
-
$this->import_single_post( $post_id );
|
84 |
-
}
|
85 |
}
|
86 |
}
|
87 |
|
@@ -93,6 +90,18 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing_Beaver_Builder' ) ) :
|
|
93 |
*/
|
94 |
public function import_single_post( $post_id = 0 ) {
|
95 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
if ( defined( 'WP_CLI' ) ) {
|
97 |
WP_CLI::line( 'Beaver Builder - Processing page: ' . $post_id );
|
98 |
}
|
78 |
}
|
79 |
|
80 |
foreach ( $post_ids as $post_id ) {
|
81 |
+
$this->import_single_post( $post_id );
|
|
|
|
|
|
|
82 |
}
|
83 |
}
|
84 |
|
90 |
*/
|
91 |
public function import_single_post( $post_id = 0 ) {
|
92 |
|
93 |
+
$is_bb_post = get_post_meta( $post_id, '_fl_builder_enabled', true );
|
94 |
+
if ( ! $is_bb_post ) {
|
95 |
+
return;
|
96 |
+
}
|
97 |
+
|
98 |
+
// Is page imported with Starter Sites?
|
99 |
+
// If not then skip batch process.
|
100 |
+
$imported_from_demo_site = get_post_meta( $post_id, '_astra_sites_imported_post', true );
|
101 |
+
if ( ! $imported_from_demo_site ) {
|
102 |
+
return;
|
103 |
+
}
|
104 |
+
|
105 |
if ( defined( 'WP_CLI' ) ) {
|
106 |
WP_CLI::line( 'Beaver Builder - Processing page: ' . $post_id );
|
107 |
}
|
inc/importers/batch-processing/class-astra-sites-batch-processing-brizy.php
CHANGED
@@ -79,10 +79,7 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing_Brizy' ) ) :
|
|
79 |
}
|
80 |
|
81 |
foreach ( $post_ids as $post_id ) {
|
82 |
-
$
|
83 |
-
if ( $is_brizy_post ) {
|
84 |
-
$this->import_single_post( $post_id );
|
85 |
-
}
|
86 |
}
|
87 |
}
|
88 |
|
@@ -94,6 +91,18 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing_Brizy' ) ) :
|
|
94 |
*/
|
95 |
public function import_single_post( $post_id = 0 ) {
|
96 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
if ( defined( 'WP_CLI' ) ) {
|
98 |
WP_CLI::line( 'Brizy - Processing page: ' . $post_id );
|
99 |
}
|
@@ -104,13 +113,8 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing_Brizy' ) ) :
|
|
104 |
|
105 |
$json_value = null;
|
106 |
|
107 |
-
$post
|
108 |
-
$
|
109 |
-
|
110 |
-
// @codingStandardsIgnoreStart
|
111 |
-
// Decode current data.
|
112 |
-
$json_value = base64_decode( $data['editor_data'] );
|
113 |
-
// @codingStandardsIgnoreEnd
|
114 |
|
115 |
// Empty mapping? Then return.
|
116 |
if ( ! empty( $ids_mapping ) ) {
|
@@ -120,19 +124,14 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing_Brizy' ) ) :
|
|
120 |
astra_sites_error_log( $ids_mapping );
|
121 |
|
122 |
foreach ( $ids_mapping as $old_id => $new_id ) {
|
123 |
-
$
|
124 |
}
|
125 |
}
|
126 |
|
127 |
-
|
128 |
-
|
129 |
-
$
|
130 |
-
|
131 |
-
|
132 |
-
$post->set_editor_data( $json_value );
|
133 |
-
$post->storage()->set( Brizy_Editor_Post::BRIZY_POST, $data );
|
134 |
-
$post->compile_page();
|
135 |
-
$post->save();
|
136 |
}
|
137 |
|
138 |
}
|
79 |
}
|
80 |
|
81 |
foreach ( $post_ids as $post_id ) {
|
82 |
+
$this->import_single_post( $post_id );
|
|
|
|
|
|
|
83 |
}
|
84 |
}
|
85 |
|
91 |
*/
|
92 |
public function import_single_post( $post_id = 0 ) {
|
93 |
|
94 |
+
$is_brizy_post = get_post_meta( $post_id, 'brizy_post_uid', true );
|
95 |
+
if ( ! $is_brizy_post ) {
|
96 |
+
return;
|
97 |
+
}
|
98 |
+
|
99 |
+
// Is page imported with Starter Sites?
|
100 |
+
// If not then skip batch process.
|
101 |
+
$imported_from_demo_site = get_post_meta( $post_id, '_astra_sites_imported_post', true );
|
102 |
+
if ( ! $imported_from_demo_site ) {
|
103 |
+
return;
|
104 |
+
}
|
105 |
+
|
106 |
if ( defined( 'WP_CLI' ) ) {
|
107 |
WP_CLI::line( 'Brizy - Processing page: ' . $post_id );
|
108 |
}
|
113 |
|
114 |
$json_value = null;
|
115 |
|
116 |
+
$post = Brizy_Editor_Post::get( (int) $post_id );
|
117 |
+
$editor_data = $post->get_editor_data();
|
|
|
|
|
|
|
|
|
|
|
118 |
|
119 |
// Empty mapping? Then return.
|
120 |
if ( ! empty( $ids_mapping ) ) {
|
124 |
astra_sites_error_log( $ids_mapping );
|
125 |
|
126 |
foreach ( $ids_mapping as $old_id => $new_id ) {
|
127 |
+
$editor_data = str_replace( '[wpforms id=\"' . $old_id, '[wpforms id=\"' . $new_id, $editor_data );
|
128 |
}
|
129 |
}
|
130 |
|
131 |
+
$post->set_editor_data( $editor_data );
|
132 |
+
$post->set_editor_version( BRIZY_EDITOR_VERSION );
|
133 |
+
$post->set_needs_compile( true );
|
134 |
+
$post->saveStorage();
|
|
|
|
|
|
|
|
|
|
|
135 |
}
|
136 |
|
137 |
}
|
inc/importers/batch-processing/class-astra-sites-batch-processing-elementor.php
CHANGED
@@ -63,10 +63,7 @@ class Astra_Sites_Batch_Processing_Elementor extends Source_Local {
|
|
63 |
}
|
64 |
|
65 |
foreach ( $post_ids as $post_id ) {
|
66 |
-
$
|
67 |
-
if ( $is_elementor_post ) {
|
68 |
-
$this->import_single_post( $post_id );
|
69 |
-
}
|
70 |
}
|
71 |
}
|
72 |
/**
|
@@ -78,6 +75,18 @@ class Astra_Sites_Batch_Processing_Elementor extends Source_Local {
|
|
78 |
*/
|
79 |
public function import_single_post( $post_id = 0 ) {
|
80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
if ( defined( 'WP_CLI' ) ) {
|
82 |
\WP_CLI::line( 'Elementor - Processing page: ' . $post_id );
|
83 |
}
|
63 |
}
|
64 |
|
65 |
foreach ( $post_ids as $post_id ) {
|
66 |
+
$this->import_single_post( $post_id );
|
|
|
|
|
|
|
67 |
}
|
68 |
}
|
69 |
/**
|
75 |
*/
|
76 |
public function import_single_post( $post_id = 0 ) {
|
77 |
|
78 |
+
$is_elementor_post = get_post_meta( $post_id, '_elementor_version', true );
|
79 |
+
if ( ! $is_elementor_post ) {
|
80 |
+
return;
|
81 |
+
}
|
82 |
+
|
83 |
+
// Is page imported with Starter Sites?
|
84 |
+
// If not then skip batch process.
|
85 |
+
$imported_from_demo_site = get_post_meta( $post_id, '_astra_sites_imported_post', true );
|
86 |
+
if ( ! $imported_from_demo_site ) {
|
87 |
+
return;
|
88 |
+
}
|
89 |
+
|
90 |
if ( defined( 'WP_CLI' ) ) {
|
91 |
\WP_CLI::line( 'Elementor - Processing page: ' . $post_id );
|
92 |
}
|
inc/importers/batch-processing/class-astra-sites-batch-processing-gutenberg.php
CHANGED
@@ -118,6 +118,13 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing_Gutenberg' ) ) :
|
|
118 |
WP_CLI::line( 'Gutenberg - Processing page: ' . $post_id );
|
119 |
}
|
120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
$is_elementor_page = get_post_meta( $post_id, '_elementor_version', true );
|
122 |
$is_beaver_builder_page = get_post_meta( $post_id, '_fl_builder_enabled', true );
|
123 |
$is_brizy_page = get_post_meta( $post_id, 'brizy_post_uid', true );
|
118 |
WP_CLI::line( 'Gutenberg - Processing page: ' . $post_id );
|
119 |
}
|
120 |
|
121 |
+
// Is page imported with Starter Sites?
|
122 |
+
// If not then skip batch process.
|
123 |
+
$imported_from_demo_site = get_post_meta( $post_id, '_astra_sites_imported_post', true );
|
124 |
+
if ( ! $imported_from_demo_site ) {
|
125 |
+
return;
|
126 |
+
}
|
127 |
+
|
128 |
$is_elementor_page = get_post_meta( $post_id, '_elementor_version', true );
|
129 |
$is_beaver_builder_page = get_post_meta( $post_id, '_fl_builder_enabled', true );
|
130 |
$is_brizy_page = get_post_meta( $post_id, 'brizy_post_uid', true );
|
inc/importers/batch-processing/class-astra-sites-batch-processing-importer.php
CHANGED
@@ -53,7 +53,7 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing_Importer' ) ) :
|
|
53 |
*/
|
54 |
public function import_categories() {
|
55 |
astra_sites_error_log( 'Requesting Tags' );
|
56 |
-
update_site_option( 'astra-sites-batch-status-string', 'Requesting Tags' );
|
57 |
|
58 |
$api_args = array(
|
59 |
'timeout' => 30,
|
@@ -70,7 +70,7 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing_Importer' ) ) :
|
|
70 |
astra_sites_error_log( 'HTTP Request Error!' );
|
71 |
}
|
72 |
} else {
|
73 |
-
update_site_option( 'astra-sites-tags', $tags );
|
74 |
|
75 |
if ( defined( 'WP_CLI' ) ) {
|
76 |
$this->generate_file( 'astra-sites-tags', $tags );
|
@@ -79,7 +79,7 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing_Importer' ) ) :
|
|
79 |
}
|
80 |
|
81 |
astra_sites_error_log( 'Tags Imported Successfully!' );
|
82 |
-
update_site_option( 'astra-sites-batch-status-string', 'Tags Imported Successfully!' );
|
83 |
}
|
84 |
|
85 |
/**
|
@@ -105,7 +105,7 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing_Importer' ) ) :
|
|
105 |
*/
|
106 |
public function import_site_categories() {
|
107 |
astra_sites_error_log( 'Requesting Site Categories' );
|
108 |
-
update_site_option( 'astra-sites-batch-status-string', 'Requesting Site Categories' );
|
109 |
|
110 |
$api_args = array(
|
111 |
'timeout' => 30,
|
@@ -122,7 +122,7 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing_Importer' ) ) :
|
|
122 |
astra_sites_error_log( 'HTTP Request Error!' );
|
123 |
}
|
124 |
} else {
|
125 |
-
update_site_option( 'astra-sites-categories', $categories );
|
126 |
|
127 |
if ( defined( 'WP_CLI' ) ) {
|
128 |
$this->generate_file( 'astra-sites-categories', $categories );
|
@@ -131,7 +131,7 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing_Importer' ) ) :
|
|
131 |
}
|
132 |
|
133 |
astra_sites_error_log( 'Site Categories Imported Successfully!' );
|
134 |
-
update_site_option( 'astra-sites-batch-status-string', 'Site Categories Imported Successfully!' );
|
135 |
}
|
136 |
|
137 |
/**
|
@@ -142,7 +142,7 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing_Importer' ) ) :
|
|
142 |
*/
|
143 |
public function import_block_categories() {
|
144 |
astra_sites_error_log( 'Requesting Block Categories' );
|
145 |
-
update_site_option( 'astra-sites-batch-status-string', 'Requesting Block Categories' );
|
146 |
|
147 |
$api_args = array(
|
148 |
'timeout' => 30,
|
@@ -164,7 +164,7 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing_Importer' ) ) :
|
|
164 |
$categories[ $value['id'] ] = $value;
|
165 |
}
|
166 |
|
167 |
-
update_site_option( 'astra-blocks-categories', $categories );
|
168 |
|
169 |
if ( defined( 'WP_CLI' ) ) {
|
170 |
$this->generate_file( 'astra-blocks-categories', $categories );
|
@@ -173,7 +173,7 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing_Importer' ) ) :
|
|
173 |
}
|
174 |
|
175 |
astra_sites_error_log( 'Block Categories Imported Successfully!' );
|
176 |
-
update_site_option( 'astra-sites-batch-status-string', 'Categories Imported Successfully!' );
|
177 |
}
|
178 |
|
179 |
|
@@ -238,7 +238,7 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing_Importer' ) ) :
|
|
238 |
*/
|
239 |
public function import_page_builders() {
|
240 |
astra_sites_error_log( 'Requesting Page Builders' );
|
241 |
-
update_site_option( 'astra-sites-batch-status-string', 'Requesting Page Builders' );
|
242 |
|
243 |
$purchase_key = Astra_Sites::get_instance()->get_license_key();
|
244 |
$site_url = get_site_url();
|
@@ -259,7 +259,7 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing_Importer' ) ) :
|
|
259 |
astra_sites_error_log( 'HTTP Request Error!' );
|
260 |
}
|
261 |
} else {
|
262 |
-
update_site_option( 'astra-sites-page-builders', $page_builders );
|
263 |
|
264 |
if ( defined( 'WP_CLI' ) ) {
|
265 |
$this->generate_file( 'astra-sites-page-builders', $page_builders );
|
@@ -268,7 +268,7 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing_Importer' ) ) :
|
|
268 |
}
|
269 |
|
270 |
astra_sites_error_log( 'Page Builders Imported Successfully!' );
|
271 |
-
update_site_option( 'astra-sites-batch-status-string', 'Page Builders Imported Successfully!' );
|
272 |
}
|
273 |
|
274 |
/**
|
@@ -286,7 +286,7 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing_Importer' ) ) :
|
|
286 |
);
|
287 |
$all_blocks = array();
|
288 |
astra_sites_error_log( 'BLOCK: Requesting ' . $page );
|
289 |
-
update_site_option( 'astra-blocks-batch-status-string', 'Requesting for blocks page - ' . $page );
|
290 |
$response = wp_remote_get( trailingslashit( Astra_Sites::get_instance()->get_api_domain() ) . '/wp-json/astra-blocks/v1/blocks?per_page=100&page=' . $page, $api_args );
|
291 |
if ( ! is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) === 200 ) {
|
292 |
$astra_blocks = json_decode( wp_remote_retrieve_body( $response ), true );
|
@@ -300,9 +300,9 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing_Importer' ) ) :
|
|
300 |
}
|
301 |
} else {
|
302 |
astra_sites_error_log( 'BLOCK: Storing data for page ' . $page . ' in option astra-blocks-' . $page );
|
303 |
-
update_site_option( 'astra-blocks-batch-status-string', 'Storing data for page ' . $page . ' in option astra-blocks-' . $page );
|
304 |
|
305 |
-
update_site_option( 'astra-blocks-' . $page, $astra_blocks );
|
306 |
|
307 |
if ( defined( 'WP_CLI' ) ) {
|
308 |
$this->generate_file( 'astra-blocks-' . $page, $astra_blocks );
|
@@ -313,7 +313,7 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing_Importer' ) ) :
|
|
313 |
}
|
314 |
|
315 |
astra_sites_error_log( 'BLOCK: Complete storing data for blocks ' . $page );
|
316 |
-
update_site_option( 'astra-blocks-batch-status-string', 'Complete storing data for page ' . $page );
|
317 |
}
|
318 |
|
319 |
/**
|
@@ -331,7 +331,7 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing_Importer' ) ) :
|
|
331 |
);
|
332 |
$sites_and_pages = array();
|
333 |
astra_sites_error_log( 'Requesting ' . $page );
|
334 |
-
update_site_option( 'astra-sites-batch-status-string', 'Requesting ' . $page );
|
335 |
|
336 |
$query_args = apply_filters(
|
337 |
'astra_sites_import_sites_query_args',
|
@@ -356,9 +356,9 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing_Importer' ) ) :
|
|
356 |
}
|
357 |
} else {
|
358 |
astra_sites_error_log( 'Storing data for page ' . $page . ' in option astra-sites-and-pages-page-' . $page );
|
359 |
-
update_site_option( 'astra-sites-batch-status-string', 'Storing data for page ' . $page . ' in option astra-sites-and-pages-page-' . $page );
|
360 |
|
361 |
-
update_site_option( 'astra-sites-and-pages-page-' . $page, $sites_and_pages );
|
362 |
|
363 |
if ( defined( 'WP_CLI' ) ) {
|
364 |
$this->generate_file( 'astra-sites-and-pages-page-' . $page, $sites_and_pages );
|
@@ -369,7 +369,7 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing_Importer' ) ) :
|
|
369 |
}
|
370 |
|
371 |
astra_sites_error_log( 'Complete storing data for page ' . $page );
|
372 |
-
update_site_option( 'astra-sites-batch-status-string', 'Complete storing data for page ' . $page );
|
373 |
|
374 |
return $sites_and_pages;
|
375 |
}
|
53 |
*/
|
54 |
public function import_categories() {
|
55 |
astra_sites_error_log( 'Requesting Tags' );
|
56 |
+
update_site_option( 'astra-sites-batch-status-string', 'Requesting Tags', 'no' );
|
57 |
|
58 |
$api_args = array(
|
59 |
'timeout' => 30,
|
70 |
astra_sites_error_log( 'HTTP Request Error!' );
|
71 |
}
|
72 |
} else {
|
73 |
+
update_site_option( 'astra-sites-tags', $tags, 'no' );
|
74 |
|
75 |
if ( defined( 'WP_CLI' ) ) {
|
76 |
$this->generate_file( 'astra-sites-tags', $tags );
|
79 |
}
|
80 |
|
81 |
astra_sites_error_log( 'Tags Imported Successfully!' );
|
82 |
+
update_site_option( 'astra-sites-batch-status-string', 'Tags Imported Successfully!', 'no' );
|
83 |
}
|
84 |
|
85 |
/**
|
105 |
*/
|
106 |
public function import_site_categories() {
|
107 |
astra_sites_error_log( 'Requesting Site Categories' );
|
108 |
+
update_site_option( 'astra-sites-batch-status-string', 'Requesting Site Categories', 'no' );
|
109 |
|
110 |
$api_args = array(
|
111 |
'timeout' => 30,
|
122 |
astra_sites_error_log( 'HTTP Request Error!' );
|
123 |
}
|
124 |
} else {
|
125 |
+
update_site_option( 'astra-sites-categories', $categories, 'no' );
|
126 |
|
127 |
if ( defined( 'WP_CLI' ) ) {
|
128 |
$this->generate_file( 'astra-sites-categories', $categories );
|
131 |
}
|
132 |
|
133 |
astra_sites_error_log( 'Site Categories Imported Successfully!' );
|
134 |
+
update_site_option( 'astra-sites-batch-status-string', 'Site Categories Imported Successfully!', 'no' );
|
135 |
}
|
136 |
|
137 |
/**
|
142 |
*/
|
143 |
public function import_block_categories() {
|
144 |
astra_sites_error_log( 'Requesting Block Categories' );
|
145 |
+
update_site_option( 'astra-sites-batch-status-string', 'Requesting Block Categories', 'no' );
|
146 |
|
147 |
$api_args = array(
|
148 |
'timeout' => 30,
|
164 |
$categories[ $value['id'] ] = $value;
|
165 |
}
|
166 |
|
167 |
+
update_site_option( 'astra-blocks-categories', $categories, 'no' );
|
168 |
|
169 |
if ( defined( 'WP_CLI' ) ) {
|
170 |
$this->generate_file( 'astra-blocks-categories', $categories );
|
173 |
}
|
174 |
|
175 |
astra_sites_error_log( 'Block Categories Imported Successfully!' );
|
176 |
+
update_site_option( 'astra-sites-batch-status-string', 'Categories Imported Successfully!', 'no' );
|
177 |
}
|
178 |
|
179 |
|
238 |
*/
|
239 |
public function import_page_builders() {
|
240 |
astra_sites_error_log( 'Requesting Page Builders' );
|
241 |
+
update_site_option( 'astra-sites-batch-status-string', 'Requesting Page Builders', 'no' );
|
242 |
|
243 |
$purchase_key = Astra_Sites::get_instance()->get_license_key();
|
244 |
$site_url = get_site_url();
|
259 |
astra_sites_error_log( 'HTTP Request Error!' );
|
260 |
}
|
261 |
} else {
|
262 |
+
update_site_option( 'astra-sites-page-builders', $page_builders, 'no' );
|
263 |
|
264 |
if ( defined( 'WP_CLI' ) ) {
|
265 |
$this->generate_file( 'astra-sites-page-builders', $page_builders );
|
268 |
}
|
269 |
|
270 |
astra_sites_error_log( 'Page Builders Imported Successfully!' );
|
271 |
+
update_site_option( 'astra-sites-batch-status-string', 'Page Builders Imported Successfully!', 'no' );
|
272 |
}
|
273 |
|
274 |
/**
|
286 |
);
|
287 |
$all_blocks = array();
|
288 |
astra_sites_error_log( 'BLOCK: Requesting ' . $page );
|
289 |
+
update_site_option( 'astra-blocks-batch-status-string', 'Requesting for blocks page - ' . $page, 'no' );
|
290 |
$response = wp_remote_get( trailingslashit( Astra_Sites::get_instance()->get_api_domain() ) . '/wp-json/astra-blocks/v1/blocks?per_page=100&page=' . $page, $api_args );
|
291 |
if ( ! is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) === 200 ) {
|
292 |
$astra_blocks = json_decode( wp_remote_retrieve_body( $response ), true );
|
300 |
}
|
301 |
} else {
|
302 |
astra_sites_error_log( 'BLOCK: Storing data for page ' . $page . ' in option astra-blocks-' . $page );
|
303 |
+
update_site_option( 'astra-blocks-batch-status-string', 'Storing data for page ' . $page . ' in option astra-blocks-' . $page, 'no' );
|
304 |
|
305 |
+
update_site_option( 'astra-blocks-' . $page, $astra_blocks, 'no' );
|
306 |
|
307 |
if ( defined( 'WP_CLI' ) ) {
|
308 |
$this->generate_file( 'astra-blocks-' . $page, $astra_blocks );
|
313 |
}
|
314 |
|
315 |
astra_sites_error_log( 'BLOCK: Complete storing data for blocks ' . $page );
|
316 |
+
update_site_option( 'astra-blocks-batch-status-string', 'Complete storing data for page ' . $page, 'no' );
|
317 |
}
|
318 |
|
319 |
/**
|
331 |
);
|
332 |
$sites_and_pages = array();
|
333 |
astra_sites_error_log( 'Requesting ' . $page );
|
334 |
+
update_site_option( 'astra-sites-batch-status-string', 'Requesting ' . $page, 'no' );
|
335 |
|
336 |
$query_args = apply_filters(
|
337 |
'astra_sites_import_sites_query_args',
|
356 |
}
|
357 |
} else {
|
358 |
astra_sites_error_log( 'Storing data for page ' . $page . ' in option astra-sites-and-pages-page-' . $page );
|
359 |
+
update_site_option( 'astra-sites-batch-status-string', 'Storing data for page ' . $page . ' in option astra-sites-and-pages-page-' . $page, 'no' );
|
360 |
|
361 |
+
update_site_option( 'astra-sites-and-pages-page-' . $page, $sites_and_pages, 'no' );
|
362 |
|
363 |
if ( defined( 'WP_CLI' ) ) {
|
364 |
$this->generate_file( 'astra-sites-and-pages-page-' . $page, $sites_and_pages );
|
369 |
}
|
370 |
|
371 |
astra_sites_error_log( 'Complete storing data for page ' . $page );
|
372 |
+
update_site_option( 'astra-sites-batch-status-string', 'Complete storing data for page ' . $page, 'no' );
|
373 |
|
374 |
return $sites_and_pages;
|
375 |
}
|
inc/importers/batch-processing/class-astra-sites-batch-processing.php
CHANGED
@@ -261,8 +261,8 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing' ) ) :
|
|
261 |
public function update_library_complete() {
|
262 |
Astra_Sites_Importer::get_instance()->update_latest_checksums();
|
263 |
|
264 |
-
update_site_option( 'astra-sites-batch-is-complete', 'no' );
|
265 |
-
update_site_option( 'astra-sites-manual-sync-complete', 'yes' );
|
266 |
wp_send_json_success();
|
267 |
}
|
268 |
|
@@ -313,7 +313,7 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing' ) ) :
|
|
313 |
|
314 |
// Set last export checksums.
|
315 |
if ( ! empty( $result['last_export_checksums'] ) ) {
|
316 |
-
update_site_option( 'astra-sites-last-export-checksums-latest', $result['last_export_checksums'] );
|
317 |
|
318 |
$this->last_export_checksums = $result['last_export_checksums'];
|
319 |
}
|
@@ -382,7 +382,7 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing' ) ) :
|
|
382 |
// If batch failed then user have at least the data from the JSON file.
|
383 |
$this->process_batch();
|
384 |
|
385 |
-
update_site_option( 'astra-sites-fresh-site', 'yes' );
|
386 |
|
387 |
// If not fresh user then trigger batch import on the transient and option
|
388 |
// Only on the Astra Sites page.
|
@@ -422,7 +422,7 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing' ) ) :
|
|
422 |
$status = Astra_Sites_Page::get_instance()->test_cron();
|
423 |
if ( is_wp_error( $status ) ) {
|
424 |
astra_sites_error_log( 'Error! Batch Not Start due to disabled cron events!' );
|
425 |
-
update_site_option( 'astra-sites-batch-status-string', 'Error! Batch Not Start due to disabled cron events!' );
|
426 |
|
427 |
if ( defined( 'WP_CLI' ) ) {
|
428 |
WP_CLI::line( 'Error! Batch Not Start due to disabled cron events!' );
|
@@ -560,7 +560,7 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing' ) ) :
|
|
560 |
WP_CLI::line( $message );
|
561 |
} else {
|
562 |
astra_sites_error_log( $message );
|
563 |
-
update_site_option( 'astra-sites-batch-status-string', $message );
|
564 |
}
|
565 |
}
|
566 |
|
@@ -574,8 +574,7 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing' ) ) :
|
|
574 |
public function process_import() {
|
575 |
|
576 |
// Batch is already started? Then return.
|
577 |
-
$status
|
578 |
-
$expired = get_transient( 'astra-sites-import-check' );
|
579 |
if ( 'in-process' === $status ) {
|
580 |
return;
|
581 |
}
|
@@ -589,7 +588,7 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing' ) ) :
|
|
589 |
// For 1 week.
|
590 |
set_transient( 'astra-sites-import-check', 'true', apply_filters( 'astra_sites_sync_check_time', WEEK_IN_SECONDS ) );
|
591 |
|
592 |
-
update_site_option( 'astra-sites-batch-status', 'in-process' );
|
593 |
|
594 |
// Process batch.
|
595 |
$this->process_batch();
|
@@ -603,7 +602,7 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing' ) ) :
|
|
603 |
public function get_total_requests() {
|
604 |
|
605 |
astra_sites_error_log( 'Getting Total Pages' );
|
606 |
-
update_site_option( 'astra-sites-batch-status-string', 'Getting Total Pages' );
|
607 |
|
608 |
$api_args = array(
|
609 |
'timeout' => 60,
|
@@ -616,7 +615,7 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing' ) ) :
|
|
616 |
if ( isset( $total_requests['pages'] ) ) {
|
617 |
|
618 |
$this->log( 'Updated requests ' . $total_requests['pages'] );
|
619 |
-
update_site_option( 'astra-sites-requests', $total_requests['pages'] );
|
620 |
Astra_Sites_Batch_Processing_Importer::get_instance()->generate_file( 'astra-sites-requests', $total_requests['pages'] );
|
621 |
|
622 |
return $total_requests['pages'];
|
@@ -624,7 +623,7 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing' ) ) :
|
|
624 |
}
|
625 |
|
626 |
astra_sites_error_log( 'Request Failed! Still Calling..' );
|
627 |
-
update_site_option( 'astra-sites-batch-status-string', 'Request Failed! Still Calling..' );
|
628 |
|
629 |
$this->get_total_requests();
|
630 |
}
|
@@ -637,7 +636,7 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing' ) ) :
|
|
637 |
public function get_total_blocks_requests() {
|
638 |
|
639 |
astra_sites_error_log( 'BLOCK: Getting Total Blocks' );
|
640 |
-
update_site_option( 'astra-sites-batch-status-string', 'Getting Total Blocks' );
|
641 |
|
642 |
$api_args = array(
|
643 |
'timeout' => 60,
|
@@ -649,16 +648,16 @@ if ( ! class_exists( 'Astra_Sites_Batch_Processing' ) ) :
|
|
649 |
|
650 |
if ( isset( $total_requests['pages'] ) ) {
|
651 |
astra_sites_error_log( 'BLOCK: Updated requests ' . $total_requests['pages'] );
|
652 |
-
update_site_option( 'astra-blocks-batch-status-string', 'Updated requests ' . $total_requests['pages'] );
|
653 |
|
654 |
-
update_site_option( 'astra-blocks-requests', $total_requests['pages'] );
|
655 |
|
656 |
return $total_requests['pages'];
|
657 |
}
|
658 |
}
|
659 |
|
660 |
astra_sites_error_log( 'BLOCK: Request Failed! Still Calling..' );
|
661 |
-
update_site_option( 'astra-blocks-batch-status-string', 'Request Failed! Still Calling..' );
|
662 |
|
663 |
$this->get_total_blocks_requests();
|
664 |
}
|
261 |
public function update_library_complete() {
|
262 |
Astra_Sites_Importer::get_instance()->update_latest_checksums();
|
263 |
|
264 |
+
update_site_option( 'astra-sites-batch-is-complete', 'no', 'no' );
|
265 |
+
update_site_option( 'astra-sites-manual-sync-complete', 'yes', 'no' );
|
266 |
wp_send_json_success();
|
267 |
}
|
268 |
|
313 |
|
314 |
// Set last export checksums.
|
315 |
if ( ! empty( $result['last_export_checksums'] ) ) {
|
316 |
+
update_site_option( 'astra-sites-last-export-checksums-latest', $result['last_export_checksums'], 'no' );
|
317 |
|
318 |
$this->last_export_checksums = $result['last_export_checksums'];
|
319 |
}
|
382 |
// If batch failed then user have at least the data from the JSON file.
|
383 |
$this->process_batch();
|
384 |
|
385 |
+
update_site_option( 'astra-sites-fresh-site', 'yes', 'no' );
|
386 |
|
387 |
// If not fresh user then trigger batch import on the transient and option
|
388 |
// Only on the Astra Sites page.
|
422 |
$status = Astra_Sites_Page::get_instance()->test_cron();
|
423 |
if ( is_wp_error( $status ) ) {
|
424 |
astra_sites_error_log( 'Error! Batch Not Start due to disabled cron events!' );
|
425 |
+
update_site_option( 'astra-sites-batch-status-string', 'Error! Batch Not Start due to disabled cron events!', 'no' );
|
426 |
|
427 |
if ( defined( 'WP_CLI' ) ) {
|
428 |
WP_CLI::line( 'Error! Batch Not Start due to disabled cron events!' );
|
560 |
WP_CLI::line( $message );
|
561 |
} else {
|
562 |
astra_sites_error_log( $message );
|
563 |
+
update_site_option( 'astra-sites-batch-status-string', $message, 'no' );
|
564 |
}
|
565 |
}
|
566 |
|
574 |
public function process_import() {
|
575 |
|
576 |
// Batch is already started? Then return.
|
577 |
+
$status = get_site_option( 'astra-sites-batch-status' );
|
|
|
578 |
if ( 'in-process' === $status ) {
|
579 |
return;
|
580 |
}
|
588 |
// For 1 week.
|
589 |
set_transient( 'astra-sites-import-check', 'true', apply_filters( 'astra_sites_sync_check_time', WEEK_IN_SECONDS ) );
|
590 |
|
591 |
+
update_site_option( 'astra-sites-batch-status', 'in-process', 'no' );
|
592 |
|
593 |
// Process batch.
|
594 |
$this->process_batch();
|
602 |
public function get_total_requests() {
|
603 |
|
604 |
astra_sites_error_log( 'Getting Total Pages' );
|
605 |
+
update_site_option( 'astra-sites-batch-status-string', 'Getting Total Pages', 'no' );
|
606 |
|
607 |
$api_args = array(
|
608 |
'timeout' => 60,
|
615 |
if ( isset( $total_requests['pages'] ) ) {
|
616 |
|
617 |
$this->log( 'Updated requests ' . $total_requests['pages'] );
|
618 |
+
update_site_option( 'astra-sites-requests', $total_requests['pages'], 'no' );
|
619 |
Astra_Sites_Batch_Processing_Importer::get_instance()->generate_file( 'astra-sites-requests', $total_requests['pages'] );
|
620 |
|
621 |
return $total_requests['pages'];
|
623 |
}
|
624 |
|
625 |
astra_sites_error_log( 'Request Failed! Still Calling..' );
|
626 |
+
update_site_option( 'astra-sites-batch-status-string', 'Request Failed! Still Calling..', 'no' );
|
627 |
|
628 |
$this->get_total_requests();
|
629 |
}
|
636 |
public function get_total_blocks_requests() {
|
637 |
|
638 |
astra_sites_error_log( 'BLOCK: Getting Total Blocks' );
|
639 |
+
update_site_option( 'astra-sites-batch-status-string', 'Getting Total Blocks', 'no' );
|
640 |
|
641 |
$api_args = array(
|
642 |
'timeout' => 60,
|
648 |
|
649 |
if ( isset( $total_requests['pages'] ) ) {
|
650 |
astra_sites_error_log( 'BLOCK: Updated requests ' . $total_requests['pages'] );
|
651 |
+
update_site_option( 'astra-blocks-batch-status-string', 'Updated requests ' . $total_requests['pages'], 'no' );
|
652 |
|
653 |
+
update_site_option( 'astra-blocks-requests', $total_requests['pages'], 'no' );
|
654 |
|
655 |
return $total_requests['pages'];
|
656 |
}
|
657 |
}
|
658 |
|
659 |
astra_sites_error_log( 'BLOCK: Request Failed! Still Calling..' );
|
660 |
+
update_site_option( 'astra-blocks-batch-status-string', 'Request Failed! Still Calling..', 'no' );
|
661 |
|
662 |
$this->get_total_blocks_requests();
|
663 |
}
|
inc/importers/batch-processing/helpers/class-wp-background-process-astra-site-importer.php
CHANGED
@@ -42,31 +42,31 @@ if ( class_exists( 'WP_Background_Process' ) ) :
|
|
42 |
|
43 |
if ( 'import_page_builders' === $method ) {
|
44 |
astra_sites_error_log( '-------- Importing Page Builders --------' );
|
45 |
-
update_site_option( 'astra-sites-batch-status-string', 'Importing Page Builders' );
|
46 |
$process->import_page_builders();
|
47 |
} elseif ( 'import_categories' === $method ) {
|
48 |
astra_sites_error_log( '-------- Importing Tags --------' );
|
49 |
-
update_site_option( 'astra-sites-batch-status-string', 'Importing Tags' );
|
50 |
$process->import_categories();
|
51 |
} elseif ( 'import_sites' === $method ) {
|
52 |
astra_sites_error_log( '-------- Importing Sites --------' );
|
53 |
$page = $object['page'];
|
54 |
astra_sites_error_log( 'Inside Batch ' . $page );
|
55 |
-
update_site_option( 'astra-sites-batch-status-string', 'Inside Batch ' . $page );
|
56 |
$process->import_sites( $page );
|
57 |
} elseif ( 'import_blocks' === $method ) {
|
58 |
astra_sites_error_log( '-------- Importing Blocks --------' );
|
59 |
$page = $object['page'];
|
60 |
astra_sites_error_log( 'Inside Batch ' . $page );
|
61 |
-
update_site_option( 'astra-sites-batch-status-string', 'Inside Batch ' . $page );
|
62 |
$process->import_blocks( $page );
|
63 |
} elseif ( 'import_block_categories' === $method ) {
|
64 |
astra_sites_error_log( '-------- Importing Blocks Categories --------' );
|
65 |
-
update_site_option( 'astra-sites-batch-status-string', 'Importing Blocks Categories' );
|
66 |
$process->import_block_categories();
|
67 |
} elseif ( 'import_site_categories' === $method ) {
|
68 |
astra_sites_error_log( '-------- Importing Site Categories --------' );
|
69 |
-
update_site_option( 'astra-sites-batch-status-string', 'Importing Site Categories' );
|
70 |
$process->import_site_categories();
|
71 |
}
|
72 |
|
@@ -85,9 +85,9 @@ if ( class_exists( 'WP_Background_Process' ) ) :
|
|
85 |
parent::complete();
|
86 |
|
87 |
astra_sites_error_log( esc_html__( 'All processes are complete', 'astra-sites' ) );
|
88 |
-
update_site_option( 'astra-sites-batch-status-string', 'All processes are complete' );
|
89 |
delete_site_option( 'astra-sites-batch-status' );
|
90 |
-
update_site_option( 'astra-sites-batch-is-complete', 'yes' );
|
91 |
|
92 |
do_action( 'astra_sites_site_import_batch_complete' );
|
93 |
}
|
42 |
|
43 |
if ( 'import_page_builders' === $method ) {
|
44 |
astra_sites_error_log( '-------- Importing Page Builders --------' );
|
45 |
+
update_site_option( 'astra-sites-batch-status-string', 'Importing Page Builders', 'no' );
|
46 |
$process->import_page_builders();
|
47 |
} elseif ( 'import_categories' === $method ) {
|
48 |
astra_sites_error_log( '-------- Importing Tags --------' );
|
49 |
+
update_site_option( 'astra-sites-batch-status-string', 'Importing Tags', 'no' );
|
50 |
$process->import_categories();
|
51 |
} elseif ( 'import_sites' === $method ) {
|
52 |
astra_sites_error_log( '-------- Importing Sites --------' );
|
53 |
$page = $object['page'];
|
54 |
astra_sites_error_log( 'Inside Batch ' . $page );
|
55 |
+
update_site_option( 'astra-sites-batch-status-string', 'Inside Batch ' . $page, 'no' );
|
56 |
$process->import_sites( $page );
|
57 |
} elseif ( 'import_blocks' === $method ) {
|
58 |
astra_sites_error_log( '-------- Importing Blocks --------' );
|
59 |
$page = $object['page'];
|
60 |
astra_sites_error_log( 'Inside Batch ' . $page );
|
61 |
+
update_site_option( 'astra-sites-batch-status-string', 'Inside Batch ' . $page, 'no' );
|
62 |
$process->import_blocks( $page );
|
63 |
} elseif ( 'import_block_categories' === $method ) {
|
64 |
astra_sites_error_log( '-------- Importing Blocks Categories --------' );
|
65 |
+
update_site_option( 'astra-sites-batch-status-string', 'Importing Blocks Categories', 'no' );
|
66 |
$process->import_block_categories();
|
67 |
} elseif ( 'import_site_categories' === $method ) {
|
68 |
astra_sites_error_log( '-------- Importing Site Categories --------' );
|
69 |
+
update_site_option( 'astra-sites-batch-status-string', 'Importing Site Categories', 'no' );
|
70 |
$process->import_site_categories();
|
71 |
}
|
72 |
|
85 |
parent::complete();
|
86 |
|
87 |
astra_sites_error_log( esc_html__( 'All processes are complete', 'astra-sites' ) );
|
88 |
+
update_site_option( 'astra-sites-batch-status-string', 'All processes are complete', 'no' );
|
89 |
delete_site_option( 'astra-sites-batch-status' );
|
90 |
+
update_site_option( 'astra-sites-batch-is-complete', 'yes', 'no' );
|
91 |
|
92 |
do_action( 'astra_sites_site_import_batch_complete' );
|
93 |
}
|
inc/importers/batch-processing/helpers/class-wp-background-process.php
CHANGED
@@ -100,7 +100,7 @@ if ( ! class_exists( 'WP_Background_Process' ) ) {
|
|
100 |
$key = $this->generate_key();
|
101 |
|
102 |
if ( ! empty( $this->data ) ) {
|
103 |
-
update_site_option( $key, $this->data );
|
104 |
}
|
105 |
|
106 |
return $this;
|
@@ -116,7 +116,7 @@ if ( ! class_exists( 'WP_Background_Process' ) ) {
|
|
116 |
*/
|
117 |
public function update( $key, $data ) {
|
118 |
if ( ! empty( $data ) ) {
|
119 |
-
update_site_option( $key, $data );
|
120 |
}
|
121 |
|
122 |
return $this;
|
100 |
$key = $this->generate_key();
|
101 |
|
102 |
if ( ! empty( $this->data ) ) {
|
103 |
+
update_site_option( $key, $this->data, 'no' );
|
104 |
}
|
105 |
|
106 |
return $this;
|
116 |
*/
|
117 |
public function update( $key, $data ) {
|
118 |
if ( ! empty( $data ) ) {
|
119 |
+
update_site_option( $key, $data, 'no' );
|
120 |
}
|
121 |
|
122 |
return $this;
|
inc/importers/wxr-importer/class-astra-wxr-importer.php
CHANGED
@@ -224,7 +224,7 @@ class Astra_WXR_Importer {
|
|
224 |
}
|
225 |
|
226 |
// Set EXT and real MIME type only for the file name `wpforms.json` or `wpforms-{page-id}.json`.
|
227 |
-
if ( strpos( $filename, 'wpforms' ) !== false ) {
|
228 |
$defaults['ext'] = 'json';
|
229 |
$defaults['type'] = 'text/plain';
|
230 |
}
|
224 |
}
|
225 |
|
226 |
// Set EXT and real MIME type only for the file name `wpforms.json` or `wpforms-{page-id}.json`.
|
227 |
+
if ( ( strpos( $filename, 'wpforms' ) !== false ) || ( strpos( $filename, 'cartflows' ) !== false ) ) {
|
228 |
$defaults['ext'] = 'json';
|
229 |
$defaults['type'] = 'text/plain';
|
230 |
}
|
inc/includes/templates.php
CHANGED
@@ -211,7 +211,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
211 |
<div class="astra-sites-library-template astra-theme" data-block-id={{key}}>
|
212 |
<div class="astra-sites-library-template-inner" >
|
213 |
<div class="elementor-template-library-template-body theme-screenshot" data-step="1">
|
214 |
-
<img src="{{data[ key ]['
|
215 |
<div class="elementor-template-library-template-preview">
|
216 |
<i class="eicon-zoom-in" aria-hidden="true"></i>
|
217 |
</div>
|
211 |
<div class="astra-sites-library-template astra-theme" data-block-id={{key}}>
|
212 |
<div class="astra-sites-library-template-inner" >
|
213 |
<div class="elementor-template-library-template-body theme-screenshot" data-step="1">
|
214 |
+
<img src="{{data[ key ]['thumbnail-image-url']}}">
|
215 |
<div class="elementor-template-library-template-preview">
|
216 |
<i class="eicon-zoom-in" aria-hidden="true"></i>
|
217 |
</div>
|
inc/lib/astra-notices/class-astra-notices.php
CHANGED
@@ -35,7 +35,7 @@ if ( ! class_exists( 'Astra_Notices' ) ) :
|
|
35 |
* @var array Notices.
|
36 |
* @since 1.4.0
|
37 |
*/
|
38 |
-
private static $version = '1.1.
|
39 |
|
40 |
/**
|
41 |
* Notices
|
@@ -112,6 +112,11 @@ if ( ! class_exists( 'Astra_Notices' ) ) :
|
|
112 |
* @return void
|
113 |
*/
|
114 |
public function dismiss_notice() {
|
|
|
|
|
|
|
|
|
|
|
115 |
$notice_id = ( isset( $_POST['notice_id'] ) ) ? sanitize_key( $_POST['notice_id'] ) : '';
|
116 |
$repeat_notice_after = ( isset( $_POST['repeat_notice_after'] ) ) ? absint( $_POST['repeat_notice_after'] ) : '';
|
117 |
$nonce = ( isset( $_POST['nonce'] ) ) ? sanitize_key( $_POST['nonce'] ) : '';
|
@@ -241,10 +246,10 @@ if ( ! class_exists( 'Astra_Notices' ) ) :
|
|
241 |
|
242 |
?>
|
243 |
<div id="<?php echo esc_attr( $notice['id'] ); ?>" class="<?php echo esc_attr( $notice['classes'] ); ?>" data-repeat-notice-after="<?php echo esc_attr( $notice['repeat-notice-after'] ); ?>">
|
244 |
-
<
|
245 |
<?php do_action( "astra_notice_inside_markup_{$notice['id']}" ); ?>
|
246 |
<?php echo wp_kses_post( $notice['message'] ); ?>
|
247 |
-
</
|
248 |
</div>
|
249 |
<?php
|
250 |
|
@@ -347,7 +352,7 @@ if ( ! class_exists( 'Astra_Notices' ) ) :
|
|
347 |
return plugin_dir_url( __FILE__ );
|
348 |
}
|
349 |
|
350 |
-
return
|
351 |
}
|
352 |
|
353 |
}
|
35 |
* @var array Notices.
|
36 |
* @since 1.4.0
|
37 |
*/
|
38 |
+
private static $version = '1.1.6';
|
39 |
|
40 |
/**
|
41 |
* Notices
|
112 |
* @return void
|
113 |
*/
|
114 |
public function dismiss_notice() {
|
115 |
+
|
116 |
+
if ( ! apply_filters( 'astra_notices_user_cap_check', current_user_can( 'manage_options' ) ) ) {
|
117 |
+
return;
|
118 |
+
}
|
119 |
+
|
120 |
$notice_id = ( isset( $_POST['notice_id'] ) ) ? sanitize_key( $_POST['notice_id'] ) : '';
|
121 |
$repeat_notice_after = ( isset( $_POST['repeat_notice_after'] ) ) ? absint( $_POST['repeat_notice_after'] ) : '';
|
122 |
$nonce = ( isset( $_POST['nonce'] ) ) ? sanitize_key( $_POST['nonce'] ) : '';
|
246 |
|
247 |
?>
|
248 |
<div id="<?php echo esc_attr( $notice['id'] ); ?>" class="<?php echo esc_attr( $notice['classes'] ); ?>" data-repeat-notice-after="<?php echo esc_attr( $notice['repeat-notice-after'] ); ?>">
|
249 |
+
<div class="notice-container">
|
250 |
<?php do_action( "astra_notice_inside_markup_{$notice['id']}" ); ?>
|
251 |
<?php echo wp_kses_post( $notice['message'] ); ?>
|
252 |
+
</div>
|
253 |
</div>
|
254 |
<?php
|
255 |
|
352 |
return plugin_dir_url( __FILE__ );
|
353 |
}
|
354 |
|
355 |
+
return '';
|
356 |
}
|
357 |
|
358 |
}
|
inc/lib/astra-notices/notices.js
CHANGED
@@ -80,9 +80,9 @@
|
|
80 |
type: 'POST',
|
81 |
data: {
|
82 |
action : 'astra-notice-dismiss',
|
|
|
83 |
notice_id : notice_id,
|
84 |
repeat_notice_after : parseInt( repeat_notice_after ),
|
85 |
-
nonce : astraNotices._notice_nonce
|
86 |
},
|
87 |
});
|
88 |
|
@@ -92,4 +92,4 @@
|
|
92 |
$( function() {
|
93 |
AstraNotices.init();
|
94 |
} );
|
95 |
-
} )( jQuery );
|
80 |
type: 'POST',
|
81 |
data: {
|
82 |
action : 'astra-notice-dismiss',
|
83 |
+
nonce : astraNotices._notice_nonce,
|
84 |
notice_id : notice_id,
|
85 |
repeat_notice_after : parseInt( repeat_notice_after ),
|
|
|
86 |
},
|
87 |
});
|
88 |
|
92 |
$( function() {
|
93 |
AstraNotices.init();
|
94 |
} );
|
95 |
+
} )( jQuery );
|
inc/lib/bsf-analytics/assets/css/minified/style.min-rtl.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
#bsf-optin-notice{padding:1px 12px;border-right-color:#007cba}#bsf-optin-notice .notice-container{padding-top:10px;padding-bottom:12px}#bsf-optin-notice .notice-content{margin:0}#bsf-optin-notice .notice-heading{padding:0 0 12px 20px}#bsf-optin-notice .button-primary{margin-left:5px}
|
inc/lib/bsf-analytics/assets/css/minified/style.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
#bsf-optin-notice{padding:1px 12px;border-left-color:#007cba}#bsf-optin-notice .notice-container{padding-top:10px;padding-bottom:12px}#bsf-optin-notice .notice-content{margin:0}#bsf-optin-notice .notice-heading{padding:0 20px 12px 0}#bsf-optin-notice .button-primary{margin-right:5px}
|
inc/lib/bsf-analytics/assets/css/unminified/style-rtl.css
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#bsf-optin-notice {
|
2 |
+
padding: 1px 12px;
|
3 |
+
border-right-color: #007cba;
|
4 |
+
}
|
5 |
+
|
6 |
+
#bsf-optin-notice .notice-container {
|
7 |
+
padding-top: 10px;
|
8 |
+
padding-bottom: 12px;
|
9 |
+
}
|
10 |
+
|
11 |
+
#bsf-optin-notice .notice-content {
|
12 |
+
margin: 0;
|
13 |
+
}
|
14 |
+
|
15 |
+
#bsf-optin-notice .notice-heading {
|
16 |
+
padding: 0 0 12px 20px;
|
17 |
+
}
|
18 |
+
|
19 |
+
#bsf-optin-notice .button-primary {
|
20 |
+
margin-left: 5px;
|
21 |
+
}
|
inc/lib/bsf-analytics/assets/css/unminified/style.css
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#bsf-optin-notice {
|
2 |
+
padding: 1px 12px;
|
3 |
+
border-left-color: #007cba;
|
4 |
+
}
|
5 |
+
|
6 |
+
#bsf-optin-notice .notice-container {
|
7 |
+
padding-top: 10px;
|
8 |
+
padding-bottom: 12px;
|
9 |
+
}
|
10 |
+
|
11 |
+
#bsf-optin-notice .notice-content {
|
12 |
+
margin: 0;
|
13 |
+
}
|
14 |
+
|
15 |
+
#bsf-optin-notice .notice-heading {
|
16 |
+
padding: 0 20px 12px 0;
|
17 |
+
}
|
18 |
+
|
19 |
+
#bsf-optin-notice .button-primary {
|
20 |
+
margin-right: 5px;
|
21 |
+
}
|
inc/lib/bsf-analytics/class-bsf-analytics-stats.php
ADDED
@@ -0,0 +1,257 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* BSF analytics stat class file.
|
4 |
+
*
|
5 |
+
* @package bsf-analytics
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit; // Exit if accessed directly.
|
10 |
+
}
|
11 |
+
|
12 |
+
if ( ! class_exists( 'BSF_Analytics_Stats' ) ) {
|
13 |
+
/**
|
14 |
+
* BSF analytics stat class.
|
15 |
+
*/
|
16 |
+
class BSF_Analytics_Stats {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Active plugins.
|
20 |
+
*
|
21 |
+
* Holds the sites active plugins list.
|
22 |
+
*
|
23 |
+
* @var array
|
24 |
+
*/
|
25 |
+
private $plugins;
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Instance of BSF_Analytics_Stats.
|
29 |
+
*
|
30 |
+
* Holds only the first object of class.
|
31 |
+
*
|
32 |
+
* @var object
|
33 |
+
*/
|
34 |
+
private static $instance = null;
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Create only once instance of a class.
|
38 |
+
*
|
39 |
+
* @return object
|
40 |
+
* @since 1.0.0
|
41 |
+
*/
|
42 |
+
public static function instance() {
|
43 |
+
if ( null === self::$instance ) {
|
44 |
+
self::$instance = new self();
|
45 |
+
}
|
46 |
+
|
47 |
+
return self::$instance;
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Get stats.
|
52 |
+
*
|
53 |
+
* @return array stats data.
|
54 |
+
* @since 1.0.0
|
55 |
+
*/
|
56 |
+
public function get_stats() {
|
57 |
+
return apply_filters( 'bsf_core_stats', $this->get_default_stats() );
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Retrieve stats for site.
|
62 |
+
*
|
63 |
+
* @return array stats data.
|
64 |
+
* @since 1.0.0
|
65 |
+
*/
|
66 |
+
private function get_default_stats() {
|
67 |
+
return array(
|
68 |
+
'graupi_version' => defined( 'BSF_UPDATER_VERSION' ) ? BSF_UPDATER_VERSION : false,
|
69 |
+
'domain_name' => get_site_url(),
|
70 |
+
'php_os' => PHP_OS,
|
71 |
+
'server_software' => $_SERVER['SERVER_SOFTWARE'],
|
72 |
+
'mysql_version' => $this->get_mysql_version(),
|
73 |
+
'php_version' => $this->get_php_version(),
|
74 |
+
'php_max_input_vars' => ini_get( 'max_input_vars' ), // phpcs:ignore:PHPCompatibility.IniDirectives.NewIniDirectives.max_input_varsFound
|
75 |
+
'php_post_max_size' => ini_get( 'post_max_size' ),
|
76 |
+
'php_max_execution_time' => ini_get( 'max_execution_time' ),
|
77 |
+
'php_memory_limit' => ini_get( 'memory_limit' ),
|
78 |
+
'zip_installed' => extension_loaded( 'zip' ),
|
79 |
+
'imagick_availabile' => extension_loaded( 'imagick' ),
|
80 |
+
'xmlreader_exists' => class_exists( 'XMLReader' ),
|
81 |
+
'gd_available' => extension_loaded( 'gd' ),
|
82 |
+
'curl_version' => $this->get_curl_version(),
|
83 |
+
'curl_ssl_version' => $this->get_curl_ssl_version(),
|
84 |
+
'is_writable' => $this->is_content_writable(),
|
85 |
+
|
86 |
+
'wp_version' => get_bloginfo( 'version' ),
|
87 |
+
'user_count' => $this->get_user_count(),
|
88 |
+
'site_language' => get_locale(),
|
89 |
+
'timezone' => wp_timezone_string(),
|
90 |
+
'is_ssl' => is_ssl(),
|
91 |
+
'is_multisite' => is_multisite(),
|
92 |
+
'network_url' => network_site_url(),
|
93 |
+
'external_object_cache' => (bool) wp_using_ext_object_cache(),
|
94 |
+
'wp_debug' => WP_DEBUG,
|
95 |
+
'wp_debug_display' => WP_DEBUG_DISPLAY,
|
96 |
+
'script_debug' => SCRIPT_DEBUG,
|
97 |
+
|
98 |
+
'active_plugins' => $this->get_active_plugins(),
|
99 |
+
|
100 |
+
'active_theme' => get_template(),
|
101 |
+
'active_stylesheet' => get_stylesheet(),
|
102 |
+
);
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Get installed PHP version.
|
107 |
+
*
|
108 |
+
* @return float PHP version.
|
109 |
+
* @since 1.0.0
|
110 |
+
*/
|
111 |
+
private function get_php_version() {
|
112 |
+
if ( defined( 'PHP_MAJOR_VERSION' ) && defined( 'PHP_MINOR_VERSION' ) && defined( 'PHP_RELEASE_VERSION' ) ) { // phpcs:ignore
|
113 |
+
return PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION . '.' . PHP_RELEASE_VERSION;
|
114 |
+
}
|
115 |
+
|
116 |
+
return phpversion();
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* User count on site.
|
121 |
+
*
|
122 |
+
* @return int User count.
|
123 |
+
* @since 1.0.0
|
124 |
+
*/
|
125 |
+
private function get_user_count() {
|
126 |
+
if ( is_multisite() ) {
|
127 |
+
$user_count = get_user_count();
|
128 |
+
} else {
|
129 |
+
$count = count_users();
|
130 |
+
$user_count = $count['total_users'];
|
131 |
+
}
|
132 |
+
|
133 |
+
return $user_count;
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Get active plugin's data.
|
138 |
+
*
|
139 |
+
* @return array active plugin's list.
|
140 |
+
* @since 1.0.0
|
141 |
+
*/
|
142 |
+
private function get_active_plugins() {
|
143 |
+
if ( ! $this->plugins ) {
|
144 |
+
// Ensure get_plugin_data function is loaded.
|
145 |
+
if ( ! function_exists( 'get_plugin_data' ) ) {
|
146 |
+
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
147 |
+
}
|
148 |
+
|
149 |
+
$plugins = wp_get_active_and_valid_plugins();
|
150 |
+
$plugins = array_map( 'get_plugin_data', $plugins );
|
151 |
+
$this->plugins = array_map( array( $this, 'format_plugin' ), $plugins );
|
152 |
+
}
|
153 |
+
|
154 |
+
return $this->plugins;
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Format plugin data.
|
159 |
+
*
|
160 |
+
* @param string $plugin plugin.
|
161 |
+
* @return array formatted plugin data.
|
162 |
+
* @since 1.0.0
|
163 |
+
*/
|
164 |
+
public function format_plugin( $plugin ) {
|
165 |
+
return array(
|
166 |
+
'name' => html_entity_decode( $plugin['Name'], ENT_COMPAT, 'UTF-8' ),
|
167 |
+
'url' => $plugin['PluginURI'],
|
168 |
+
'version' => $plugin['Version'],
|
169 |
+
'slug' => $plugin['TextDomain'],
|
170 |
+
'author_name' => html_entity_decode( wp_strip_all_tags( $plugin['Author'] ), ENT_COMPAT, 'UTF-8' ),
|
171 |
+
'author_url' => $plugin['AuthorURI'],
|
172 |
+
);
|
173 |
+
}
|
174 |
+
|
175 |
+
/**
|
176 |
+
* Curl SSL version.
|
177 |
+
*
|
178 |
+
* @return float SSL version.
|
179 |
+
* @since 1.0.0
|
180 |
+
*/
|
181 |
+
private function get_curl_ssl_version() {
|
182 |
+
$curl = array();
|
183 |
+
if ( function_exists( 'curl_version' ) ) {
|
184 |
+
$curl = curl_version(); // phpcs:ignore WordPress.WP.AlternativeFunctions.curl_curl_version
|
185 |
+
}
|
186 |
+
|
187 |
+
return isset( $curl['ssl_version'] ) ? $curl['ssl_version'] : false;
|
188 |
+
}
|
189 |
+
|
190 |
+
/**
|
191 |
+
* Get cURL version.
|
192 |
+
*
|
193 |
+
* @return float cURL version.
|
194 |
+
* @since 1.0.0
|
195 |
+
*/
|
196 |
+
private function get_curl_version() {
|
197 |
+
$curl = array();
|
198 |
+
if ( function_exists( 'curl_version' ) ) {
|
199 |
+
$curl = curl_version(); // phpcs:ignore WordPress.WP.AlternativeFunctions.curl_curl_version
|
200 |
+
}
|
201 |
+
|
202 |
+
return isset( $curl['version'] ) ? $curl['version'] : false;
|
203 |
+
}
|
204 |
+
|
205 |
+
/**
|
206 |
+
* Get MySQL version.
|
207 |
+
*
|
208 |
+
* @return float MySQL version.
|
209 |
+
* @since 1.0.0
|
210 |
+
*/
|
211 |
+
private function get_mysql_version() {
|
212 |
+
global $wpdb;
|
213 |
+
return $wpdb->db_version();
|
214 |
+
}
|
215 |
+
|
216 |
+
/**
|
217 |
+
* Check if content directory is writable.
|
218 |
+
*
|
219 |
+
* @return bool
|
220 |
+
* @since 1.0.0
|
221 |
+
*/
|
222 |
+
private function is_content_writable() {
|
223 |
+
$upload_dir = wp_upload_dir();
|
224 |
+
return wp_is_writable( $upload_dir['basedir'] );
|
225 |
+
}
|
226 |
+
}
|
227 |
+
}
|
228 |
+
|
229 |
+
/**
|
230 |
+
* Polyfill for sites using WP version less than 5.3
|
231 |
+
*/
|
232 |
+
if ( ! function_exists( 'wp_timezone_string' ) ) {
|
233 |
+
/**
|
234 |
+
* Get timezone string.
|
235 |
+
*
|
236 |
+
* @return string timezone string.
|
237 |
+
* @since 1.0.0
|
238 |
+
*/
|
239 |
+
function wp_timezone_string() {
|
240 |
+
$timezone_string = get_option( 'timezone_string' );
|
241 |
+
|
242 |
+
if ( $timezone_string ) {
|
243 |
+
return $timezone_string;
|
244 |
+
}
|
245 |
+
|
246 |
+
$offset = (float) get_option( 'gmt_offset' );
|
247 |
+
$hours = (int) $offset;
|
248 |
+
$minutes = ( $offset - $hours );
|
249 |
+
|
250 |
+
$sign = ( $offset < 0 ) ? '-' : '+';
|
251 |
+
$abs_hour = abs( $hours );
|
252 |
+
$abs_mins = abs( $minutes * 60 );
|
253 |
+
$tz_offset = sprintf( '%s%02d:%02d', $sign, $abs_hour, $abs_mins );
|
254 |
+
|
255 |
+
return $tz_offset;
|
256 |
+
}
|
257 |
+
}
|
inc/lib/bsf-analytics/class-bsf-analytics.php
ADDED
@@ -0,0 +1,503 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* BSF analytics class file.
|
4 |
+
*
|
5 |
+
* @version 1.0.0
|
6 |
+
*
|
7 |
+
* @package bsf-analytics
|
8 |
+
*/
|
9 |
+
|
10 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
+
exit; // Exit if accessed directly.
|
12 |
+
}
|
13 |
+
|
14 |
+
if ( ! class_exists( 'BSF_Analytics' ) ) {
|
15 |
+
|
16 |
+
/**
|
17 |
+
* BSF analytics
|
18 |
+
*/
|
19 |
+
class BSF_Analytics {
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Member Variable
|
23 |
+
*
|
24 |
+
* @var string Usage tracking document URL
|
25 |
+
*/
|
26 |
+
private $usage_doc_link = 'https://store.brainstormforce.com/usage-tracking/?utm_source=wp_dashboard&utm_medium=general_settings&utm_campaign=usage_tracking';
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Setup actions, load files.
|
30 |
+
*
|
31 |
+
* @since 1.0.0
|
32 |
+
*/
|
33 |
+
public function __construct() {
|
34 |
+
|
35 |
+
define( 'BSF_ANALYTICS_FILE', __FILE__ );
|
36 |
+
define( 'BSF_ANALYTICS_VERSION', '1.0.0' );
|
37 |
+
define( 'BSF_ANALYTICS_PATH', dirname( __FILE__ ) );
|
38 |
+
define( 'BSF_ANALYTICS_URI', $this->bsf_analytics_url() );
|
39 |
+
|
40 |
+
add_action( 'admin_init', array( $this, 'handle_optin_optout' ) );
|
41 |
+
add_action( 'cron_schedules', array( $this, 'every_two_days_schedule' ) );
|
42 |
+
add_action( 'admin_notices', array( $this, 'option_notice' ) );
|
43 |
+
add_action( 'astra_notice_before_markup_bsf-optin-notice', array( $this, 'enqueue_assets' ) );
|
44 |
+
|
45 |
+
add_action( 'init', array( $this, 'schedule_unschedule_event' ) );
|
46 |
+
|
47 |
+
if ( ! has_action( 'bsf_analytics_send', array( $this, 'send' ) ) ) {
|
48 |
+
add_action( 'bsf_analytics_send', array( $this, 'send' ) );
|
49 |
+
}
|
50 |
+
|
51 |
+
add_action( 'admin_init', array( $this, 'register_usage_tracking_setting' ) );
|
52 |
+
|
53 |
+
add_action( 'update_option_bsf_analytics_optin', array( $this, 'update_analytics_option_callback' ), 10, 3 );
|
54 |
+
add_action( 'add_option_bsf_analytics_optin', array( $this, 'add_analytics_option_callback' ), 10, 2 );
|
55 |
+
|
56 |
+
$this->includes();
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* BSF Analytics URL
|
61 |
+
*
|
62 |
+
* @return String URL of bsf-analytics directory.
|
63 |
+
* @since 1.0.0
|
64 |
+
*/
|
65 |
+
public function bsf_analytics_url() {
|
66 |
+
|
67 |
+
$path = wp_normalize_path( BSF_ANALYTICS_PATH );
|
68 |
+
$theme_dir = wp_normalize_path( get_template_directory() );
|
69 |
+
|
70 |
+
if ( strpos( $path, $theme_dir ) !== false ) {
|
71 |
+
return rtrim( get_template_directory_uri() . '/admin/bsf-analytics/', '/' );
|
72 |
+
} else {
|
73 |
+
return rtrim( plugin_dir_url( BSF_ANALYTICS_FILE ), '/' );
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Get API URL for sending analytics.
|
79 |
+
*
|
80 |
+
* @return string API URL.
|
81 |
+
* @since 1.0.0
|
82 |
+
*/
|
83 |
+
private function get_api_url() {
|
84 |
+
return defined( 'BSF_API_URL' ) ? BSF_API_URL : 'https://support.brainstormforce.com/';
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Enqueue Scripts.
|
89 |
+
*
|
90 |
+
* @since 1.0.0
|
91 |
+
* @return void
|
92 |
+
*/
|
93 |
+
public function enqueue_assets() {
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Load unminified if SCRIPT_DEBUG is true.
|
97 |
+
*
|
98 |
+
* Directory and Extensions.
|
99 |
+
*/
|
100 |
+
$dir_name = ( SCRIPT_DEBUG ) ? 'unminified' : 'minified';
|
101 |
+
$file_rtl = ( is_rtl() ) ? '-rtl' : '';
|
102 |
+
$css_ext = ( SCRIPT_DEBUG ) ? '.css' : '.min.css';
|
103 |
+
|
104 |
+
$css_uri = BSF_ANALYTICS_URI . '/assets/css/' . $dir_name . '/style' . $file_rtl . $css_ext;
|
105 |
+
|
106 |
+
wp_enqueue_style( 'bsf-analytics-admin-style', $css_uri, false, BSF_ANALYTICS_VERSION, 'all' );
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Send analytics API call.
|
111 |
+
*
|
112 |
+
* @since 1.0.0
|
113 |
+
*/
|
114 |
+
public function send() {
|
115 |
+
wp_remote_post(
|
116 |
+
$this->get_api_url() . 'wp-json/bsf-core/v1/analytics/',
|
117 |
+
array(
|
118 |
+
'body' => BSF_Analytics_Stats::instance()->get_stats(),
|
119 |
+
'timeout' => 5,
|
120 |
+
'blocking' => false,
|
121 |
+
)
|
122 |
+
);
|
123 |
+
}
|
124 |
+
|
125 |
+
/**
|
126 |
+
* Check if usage tracking is enabled.
|
127 |
+
*
|
128 |
+
* @return bool
|
129 |
+
* @since 1.0.0
|
130 |
+
*/
|
131 |
+
public function is_tracking_enabled() {
|
132 |
+
$is_enabled = get_site_option( 'bsf_analytics_optin' ) === 'yes' ? true : false;
|
133 |
+
$is_enabled = $this->is_white_label_enabled() ? false : $is_enabled;
|
134 |
+
|
135 |
+
return apply_filters( 'bsf_tracking_enabled', $is_enabled );
|
136 |
+
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* Check if WHITE label is enabled for BSF products.
|
140 |
+
*
|
141 |
+
* @return bool
|
142 |
+
* @since 1.0.0
|
143 |
+
*/
|
144 |
+
public function is_white_label_enabled() {
|
145 |
+
|
146 |
+
$options = apply_filters( 'bsf_white_label_options', array() );
|
147 |
+
$is_enabled = false;
|
148 |
+
|
149 |
+
if ( is_array( $options ) ) {
|
150 |
+
foreach ( $options as $option ) {
|
151 |
+
if ( true === $option ) {
|
152 |
+
$is_enabled = true;
|
153 |
+
break;
|
154 |
+
}
|
155 |
+
}
|
156 |
+
}
|
157 |
+
|
158 |
+
return $is_enabled;
|
159 |
+
}
|
160 |
+
|
161 |
+
/**
|
162 |
+
* Display admin notice for usage tracking.
|
163 |
+
*
|
164 |
+
* @since 1.0.0
|
165 |
+
*/
|
166 |
+
public function option_notice() {
|
167 |
+
|
168 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
169 |
+
return;
|
170 |
+
}
|
171 |
+
|
172 |
+
// Don't display the notice if tracking is disabled or White Label is enabled for any of our plugins.
|
173 |
+
if ( false !== get_site_option( 'bsf_analytics_optin', false ) || $this->is_white_label_enabled() ) {
|
174 |
+
return;
|
175 |
+
}
|
176 |
+
|
177 |
+
// Show tracker consent notice after 24 hours from installed time.
|
178 |
+
if ( strtotime( '+24 hours', $this->get_analytics_install_time() ) > time() ) {
|
179 |
+
return;
|
180 |
+
}
|
181 |
+
|
182 |
+
/* translators: %s product name */
|
183 |
+
$notice_string = __( 'Want to help make <strong>%1s</strong> even more awesome? Allow us to collect non-sensitive diagnostic data and usage information. ', 'astra-sites' );
|
184 |
+
|
185 |
+
if ( is_multisite() ) {
|
186 |
+
$notice_string .= __( 'This will be applicable for all sites from the network.', 'astra-sites' );
|
187 |
+
}
|
188 |
+
|
189 |
+
Astra_Notices::add_notice(
|
190 |
+
array(
|
191 |
+
'id' => 'bsf-optin-notice',
|
192 |
+
'type' => '',
|
193 |
+
'message' => sprintf(
|
194 |
+
'<div class="notice-content">
|
195 |
+
<div class="notice-heading">
|
196 |
+
%1$s
|
197 |
+
</div>
|
198 |
+
<div class="astra-notices-container">
|
199 |
+
<a href="%2$s" class="astra-notices button-primary">
|
200 |
+
%3$s
|
201 |
+
</a>
|
202 |
+
<a href="%4$s" data-repeat-notice-after="%5$s" class="astra-notices button-secondary">
|
203 |
+
%6$s
|
204 |
+
</a>
|
205 |
+
</div>
|
206 |
+
</div>',
|
207 |
+
/* translators: %s usage doc link */
|
208 |
+
sprintf( $notice_string . '<a href="%2s" target="_blank" rel="noreferrer noopener">%3s</a>', $this->get_product_name(), esc_url( $this->usage_doc_link ), __( ' Know More.', 'astra-sites' ) ),
|
209 |
+
add_query_arg(
|
210 |
+
array(
|
211 |
+
'bsf_analytics_optin' => 'yes',
|
212 |
+
'bsf_analytics_nonce' => wp_create_nonce( 'bsf_analytics_optin' ),
|
213 |
+
)
|
214 |
+
),
|
215 |
+
__( 'Yes! Allow it', 'astra-sites' ),
|
216 |
+
add_query_arg(
|
217 |
+
array(
|
218 |
+
'bsf_analytics_optin' => 'no',
|
219 |
+
'bsf_analytics_nonce' => wp_create_nonce( 'bsf_analytics_optin' ),
|
220 |
+
)
|
221 |
+
),
|
222 |
+
MONTH_IN_SECONDS,
|
223 |
+
__( 'No Thanks', 'astra-sites' )
|
224 |
+
),
|
225 |
+
'show_if' => true,
|
226 |
+
'repeat-notice-after' => false,
|
227 |
+
'priority' => 18,
|
228 |
+
'display-with-other-notices' => true,
|
229 |
+
)
|
230 |
+
);
|
231 |
+
}
|
232 |
+
|
233 |
+
/**
|
234 |
+
* Process usage tracking opt out.
|
235 |
+
*
|
236 |
+
* @since 1.0.0
|
237 |
+
*/
|
238 |
+
public function handle_optin_optout() {
|
239 |
+
if ( ! isset( $_GET['bsf_analytics_nonce'] ) ) {
|
240 |
+
return;
|
241 |
+
}
|
242 |
+
|
243 |
+
if ( ! wp_verify_nonce( sanitize_text_field( $_GET['bsf_analytics_nonce'] ), 'bsf_analytics_optin' ) ) {
|
244 |
+
return;
|
245 |
+
}
|
246 |
+
|
247 |
+
$optin_status = sanitize_text_field( $_GET['bsf_analytics_optin'] );
|
248 |
+
|
249 |
+
if ( 'yes' === $optin_status ) {
|
250 |
+
$this->optin();
|
251 |
+
} elseif ( 'no' === $optin_status ) {
|
252 |
+
$this->optout();
|
253 |
+
}
|
254 |
+
|
255 |
+
wp_safe_redirect(
|
256 |
+
remove_query_arg(
|
257 |
+
array(
|
258 |
+
'bsf_analytics_optin',
|
259 |
+
'bsf_analytics_nonce',
|
260 |
+
)
|
261 |
+
)
|
262 |
+
);
|
263 |
+
}
|
264 |
+
|
265 |
+
/**
|
266 |
+
* Opt in to usage tracking.
|
267 |
+
*
|
268 |
+
* @since 1.0.0
|
269 |
+
*/
|
270 |
+
private function optin() {
|
271 |
+
update_site_option( 'bsf_analytics_optin', 'yes' );
|
272 |
+
}
|
273 |
+
|
274 |
+
/**
|
275 |
+
* Opt out to usage tracking.
|
276 |
+
*
|
277 |
+
* @since 1.0.0
|
278 |
+
*/
|
279 |
+
private function optout() {
|
280 |
+
update_site_option( 'bsf_analytics_optin', 'no' );
|
281 |
+
}
|
282 |
+
|
283 |
+
/**
|
284 |
+
* Add two days event schedule variables.
|
285 |
+
*
|
286 |
+
* @param array $schedules scheduled array data.
|
287 |
+
* @since 1.0.0
|
288 |
+
*/
|
289 |
+
public function every_two_days_schedule( $schedules ) {
|
290 |
+
$schedules['every_two_days'] = array(
|
291 |
+
'interval' => 2 * DAY_IN_SECONDS,
|
292 |
+
'display' => __( 'Every two days', 'astra-sites' ),
|
293 |
+
);
|
294 |
+
|
295 |
+
return $schedules;
|
296 |
+
}
|
297 |
+
|
298 |
+
/**
|
299 |
+
* Schedule usage tracking event.
|
300 |
+
*
|
301 |
+
* @since 1.0.0
|
302 |
+
*/
|
303 |
+
private function schedule_event() {
|
304 |
+
if ( ! wp_next_scheduled( 'bsf_analytics_send' ) && $this->is_tracking_enabled() ) {
|
305 |
+
wp_schedule_event( time(), 'every_two_days', 'bsf_analytics_send' );
|
306 |
+
}
|
307 |
+
}
|
308 |
+
|
309 |
+
/**
|
310 |
+
* Unschedule usage tracking event.
|
311 |
+
*
|
312 |
+
* @since 1.0.0
|
313 |
+
*/
|
314 |
+
private function unschedule_event() {
|
315 |
+
wp_clear_scheduled_hook( 'bsf_analytics_send' );
|
316 |
+
}
|
317 |
+
|
318 |
+
/**
|
319 |
+
* Load analytics stat class.
|
320 |
+
*
|
321 |
+
* @since 1.0.0
|
322 |
+
*/
|
323 |
+
private function includes() {
|
324 |
+
require_once __DIR__ . '/class-bsf-analytics-stats.php';
|
325 |
+
}
|
326 |
+
|
327 |
+
/**
|
328 |
+
* Register usage tracking option in General settings page.
|
329 |
+
*
|
330 |
+
* @since 1.0.0
|
331 |
+
*/
|
332 |
+
public function register_usage_tracking_setting() {
|
333 |
+
|
334 |
+
if ( ! apply_filters( 'bsf_tracking_enabled', true ) || $this->is_white_label_enabled() ) {
|
335 |
+
return;
|
336 |
+
}
|
337 |
+
|
338 |
+
register_setting(
|
339 |
+
'general', // Options group.
|
340 |
+
'bsf_analytics_optin', // Option name/database.
|
341 |
+
array( 'sanitize_callback' => array( $this, 'sanitize_option' ) ) // sanitize callback function.
|
342 |
+
);
|
343 |
+
|
344 |
+
add_settings_field(
|
345 |
+
'bsf-analytics-optin', // Field ID.
|
346 |
+
__( 'Usage Tracking', 'astra-sites' ), // Field title.
|
347 |
+
array( $this, 'render_settings_field_html' ), // Field callback function.
|
348 |
+
'general' // Settings page slug.
|
349 |
+
);
|
350 |
+
}
|
351 |
+
|
352 |
+
/**
|
353 |
+
* Sanitize Callback Function
|
354 |
+
*
|
355 |
+
* @param bool $input Option value.
|
356 |
+
* @since 1.0.0
|
357 |
+
*/
|
358 |
+
public function sanitize_option( $input ) {
|
359 |
+
|
360 |
+
if ( ! $input || 'no' === $input ) {
|
361 |
+
return 'no';
|
362 |
+
}
|
363 |
+
|
364 |
+
return 'yes';
|
365 |
+
}
|
366 |
+
|
367 |
+
/**
|
368 |
+
* Print settings field HTML.
|
369 |
+
*
|
370 |
+
* @since 1.0.0
|
371 |
+
*/
|
372 |
+
public function render_settings_field_html() {
|
373 |
+
?>
|
374 |
+
<label for="bsf-analytics-optin">
|
375 |
+
<input id="bsf-analytics-optin" type="checkbox" value="1" name="bsf_analytics_optin" <?php checked( get_site_option( 'bsf_analytics_optin', 'no' ), 'yes' ); ?>>
|
376 |
+
<?php
|
377 |
+
esc_html_e( 'Allow Brainstorm Force products to track non-sensitive usage tracking data.', 'astra-sites' );
|
378 |
+
|
379 |
+
if ( is_multisite() ) {
|
380 |
+
esc_html_e( ' This will be applicable for all sites from the network.', 'astra-sites' );
|
381 |
+
}
|
382 |
+
?>
|
383 |
+
</label>
|
384 |
+
<?php
|
385 |
+
echo wp_kses_post( sprintf( '<a href="%1s" target="_blank" rel="noreferrer noopener">%2s</a>', esc_url( $this->usage_doc_link ), __( 'Learn More.', 'astra-sites' ) ) );
|
386 |
+
}
|
387 |
+
|
388 |
+
/**
|
389 |
+
* Get current product name.
|
390 |
+
*
|
391 |
+
* @return string $plugin_data['Name] Name of plugin.
|
392 |
+
* @since 1.0.0
|
393 |
+
*/
|
394 |
+
private function get_product_name() {
|
395 |
+
|
396 |
+
$base = wp_normalize_path( dirname( __FILE__ ) );
|
397 |
+
$theme_dir = wp_normalize_path( get_template_directory() );
|
398 |
+
|
399 |
+
if ( false !== strpos( $base, $theme_dir ) ) {
|
400 |
+
$theme = wp_get_theme( get_template() );
|
401 |
+
return $theme->get( 'Name' );
|
402 |
+
}
|
403 |
+
|
404 |
+
$base = plugin_basename( __FILE__ );
|
405 |
+
|
406 |
+
$exploded_path = explode( '/', $base, 2 );
|
407 |
+
$plugin_slug = $exploded_path[0];
|
408 |
+
|
409 |
+
if ( ! function_exists( 'get_plugin_data' ) ) {
|
410 |
+
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
411 |
+
}
|
412 |
+
|
413 |
+
$plugin_main_file = WP_PLUGIN_DIR . '/' . $plugin_slug . '/' . $plugin_slug . '.php';
|
414 |
+
$plugin_data = get_plugin_data( wp_normalize_path( $plugin_main_file ) );
|
415 |
+
|
416 |
+
return $plugin_data['Name'];
|
417 |
+
}
|
418 |
+
|
419 |
+
/**
|
420 |
+
* Set analytics installed time in option.
|
421 |
+
*
|
422 |
+
* @return string $time analytics installed time.
|
423 |
+
* @since 1.0.0
|
424 |
+
*/
|
425 |
+
private function get_analytics_install_time() {
|
426 |
+
|
427 |
+
$time = get_site_option( 'bsf_analytics_installed_time' );
|
428 |
+
|
429 |
+
if ( ! $time ) {
|
430 |
+
$time = time();
|
431 |
+
update_site_option( 'bsf_analytics_installed_time', time() );
|
432 |
+
}
|
433 |
+
|
434 |
+
return $time;
|
435 |
+
}
|
436 |
+
|
437 |
+
/**
|
438 |
+
* Schedule/unschedule cron event on updation of option.
|
439 |
+
*
|
440 |
+
* @param string $old_value old value of option.
|
441 |
+
* @param string $value value of option.
|
442 |
+
* @param string $option Option name.
|
443 |
+
* @since 1.0.0
|
444 |
+
*/
|
445 |
+
public function update_analytics_option_callback( $old_value, $value, $option ) {
|
446 |
+
$this->add_option_to_network( $value );
|
447 |
+
}
|
448 |
+
|
449 |
+
/**
|
450 |
+
* Analytics option add callback.
|
451 |
+
*
|
452 |
+
* @param string $option Option name.
|
453 |
+
* @param string $value value of option.
|
454 |
+
* @since 1.0.0
|
455 |
+
*/
|
456 |
+
public function add_analytics_option_callback( $option, $value ) {
|
457 |
+
$this->add_option_to_network( $value );
|
458 |
+
}
|
459 |
+
|
460 |
+
/**
|
461 |
+
* Schedule or unschedule event based on analytics option value.
|
462 |
+
*
|
463 |
+
* @since 1.0.0
|
464 |
+
*/
|
465 |
+
public function schedule_unschedule_event() {
|
466 |
+
|
467 |
+
if ( true === $this->is_white_label_enabled() ) {
|
468 |
+
$this->unschedule_event();
|
469 |
+
return;
|
470 |
+
}
|
471 |
+
|
472 |
+
$analytics_option = get_site_option( 'bsf_analytics_optin' );
|
473 |
+
|
474 |
+
if ( 'no' === $analytics_option ) {
|
475 |
+
$this->unschedule_event();
|
476 |
+
} elseif ( 'yes' === $analytics_option ) {
|
477 |
+
$this->schedule_event();
|
478 |
+
}
|
479 |
+
}
|
480 |
+
|
481 |
+
/**
|
482 |
+
* Save analytics option to network.
|
483 |
+
*
|
484 |
+
* @param string $value value of option.
|
485 |
+
* @since 1.0.0
|
486 |
+
*/
|
487 |
+
public function add_option_to_network( $value ) {
|
488 |
+
|
489 |
+
// If action coming from general settings page.
|
490 |
+
if ( isset( $_POST['option_page'] ) && 'general' === $_POST['option_page'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
|
491 |
+
|
492 |
+
if ( get_site_option( 'bsf_analytics_optin' ) ) {
|
493 |
+
update_site_option( 'bsf_analytics_optin', $value );
|
494 |
+
} else {
|
495 |
+
add_site_option( 'bsf_analytics_optin', $value );
|
496 |
+
}
|
497 |
+
}
|
498 |
+
}
|
499 |
+
}
|
500 |
+
|
501 |
+
new BSF_Analytics();
|
502 |
+
|
503 |
+
}
|
languages/astra-sites.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the Starter Templates package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Starter Templates 2.2.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/astra-sites\n"
|
7 |
-
"POT-Creation-Date: 2020-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -68,17 +68,17 @@ msgstr ""
|
|
68 |
#: inc/classes/class-astra-sites-importer.php:298
|
69 |
#: inc/classes/class-astra-sites-importer.php:342
|
70 |
#: inc/classes/class-astra-sites-importer.php:414
|
71 |
-
#: inc/classes/class-astra-sites-importer.php:
|
72 |
-
#: inc/classes/class-astra-sites-importer.php:
|
73 |
-
#: inc/classes/class-astra-sites-importer.php:
|
74 |
-
#: inc/classes/class-astra-sites-importer.php:
|
75 |
-
#: inc/classes/class-astra-sites-importer.php:
|
76 |
-
#: inc/classes/class-astra-sites-importer.php:
|
77 |
-
#: inc/classes/class-astra-sites-importer.php:
|
78 |
-
#: inc/classes/class-astra-sites-importer.php:
|
79 |
-
#: inc/classes/class-astra-sites.php:230 inc/classes/class-astra-sites.php:
|
80 |
-
#: inc/classes/class-astra-sites.php:
|
81 |
-
#: inc/classes/class-astra-sites.php:
|
82 |
msgid "You are not allowed to perform this action"
|
83 |
msgstr ""
|
84 |
|
@@ -101,11 +101,11 @@ msgstr ""
|
|
101 |
msgid "Invalid site XML file!"
|
102 |
msgstr ""
|
103 |
|
104 |
-
#: inc/classes/class-astra-sites-importer.php:
|
105 |
msgid "Site options are empty!"
|
106 |
msgstr ""
|
107 |
|
108 |
-
#: inc/classes/class-astra-sites-importer.php:
|
109 |
msgid "Widget data is empty!"
|
110 |
msgstr ""
|
111 |
|
@@ -159,7 +159,7 @@ msgstr ""
|
|
159 |
#: inc/classes/class-astra-sites-page.php:595
|
160 |
#: inc/classes/class-astra-sites-page.php:597
|
161 |
#: inc/classes/class-astra-sites-page.php:609
|
162 |
-
#: inc/classes/class-astra-sites.php:
|
163 |
#: inc/includes/templates.php:35
|
164 |
msgid "All"
|
165 |
msgstr ""
|
@@ -424,188 +424,188 @@ msgstr ""
|
|
424 |
msgid "Provided API URL is empty! Please try again!"
|
425 |
msgstr ""
|
426 |
|
427 |
-
#: inc/classes/class-astra-sites.php:
|
428 |
msgid "Theme Activated"
|
429 |
msgstr ""
|
430 |
|
431 |
-
#: inc/classes/class-astra-sites.php:
|
432 |
msgid "User does not have permission!"
|
433 |
msgstr ""
|
434 |
|
435 |
-
#: inc/classes/class-astra-sites.php:
|
436 |
msgid "See Library"
|
437 |
msgstr ""
|
438 |
|
439 |
-
#: inc/classes/class-astra-sites.php:
|
440 |
msgid "Animals"
|
441 |
msgstr ""
|
442 |
|
443 |
-
#: inc/classes/class-astra-sites.php:
|
444 |
msgid "Architecture/Buildings"
|
445 |
msgstr ""
|
446 |
|
447 |
-
#: inc/classes/class-astra-sites.php:
|
448 |
msgid "Backgrounds/Textures"
|
449 |
msgstr ""
|
450 |
|
451 |
-
#: inc/classes/class-astra-sites.php:
|
452 |
msgid "Beauty/Fashion"
|
453 |
msgstr ""
|
454 |
|
455 |
-
#: inc/classes/class-astra-sites.php:
|
456 |
msgid "Business/Finance"
|
457 |
msgstr ""
|
458 |
|
459 |
-
#: inc/classes/class-astra-sites.php:
|
460 |
msgid "Computer/Communication"
|
461 |
msgstr ""
|
462 |
|
463 |
-
#: inc/classes/class-astra-sites.php:
|
464 |
msgid "Education"
|
465 |
msgstr ""
|
466 |
|
467 |
-
#: inc/classes/class-astra-sites.php:
|
468 |
msgid "Emotions"
|
469 |
msgstr ""
|
470 |
|
471 |
-
#: inc/classes/class-astra-sites.php:
|
472 |
msgid "Food/Drink"
|
473 |
msgstr ""
|
474 |
|
475 |
-
#: inc/classes/class-astra-sites.php:
|
476 |
msgid "Health/Medical"
|
477 |
msgstr ""
|
478 |
|
479 |
-
#: inc/classes/class-astra-sites.php:
|
480 |
msgid "Industry/Craft"
|
481 |
msgstr ""
|
482 |
|
483 |
-
#: inc/classes/class-astra-sites.php:
|
484 |
msgid "Music"
|
485 |
msgstr ""
|
486 |
|
487 |
-
#: inc/classes/class-astra-sites.php:
|
488 |
msgid "Nature/Landscapes"
|
489 |
msgstr ""
|
490 |
|
491 |
-
#: inc/classes/class-astra-sites.php:
|
492 |
msgid "People"
|
493 |
msgstr ""
|
494 |
|
495 |
-
#: inc/classes/class-astra-sites.php:
|
496 |
msgid "Places/Monuments"
|
497 |
msgstr ""
|
498 |
|
499 |
-
#: inc/classes/class-astra-sites.php:
|
500 |
msgid "Religion"
|
501 |
msgstr ""
|
502 |
|
503 |
-
#: inc/classes/class-astra-sites.php:
|
504 |
msgid "Science/Technology"
|
505 |
msgstr ""
|
506 |
|
507 |
-
#: inc/classes/class-astra-sites.php:
|
508 |
msgid "Sports"
|
509 |
msgstr ""
|
510 |
|
511 |
-
#: inc/classes/class-astra-sites.php:
|
512 |
msgid "Transportation/Traffic"
|
513 |
msgstr ""
|
514 |
|
515 |
-
#: inc/classes/class-astra-sites.php:
|
516 |
msgid "Travel/Vacation"
|
517 |
msgstr ""
|
518 |
|
519 |
-
#: inc/classes/class-astra-sites.php:
|
520 |
msgid "Popular"
|
521 |
msgstr ""
|
522 |
|
523 |
-
#: inc/classes/class-astra-sites.php:
|
524 |
msgid "Latest"
|
525 |
msgstr ""
|
526 |
|
527 |
-
#: inc/classes/class-astra-sites.php:
|
528 |
msgid "Upcoming"
|
529 |
msgstr ""
|
530 |
|
531 |
-
#: inc/classes/class-astra-sites.php:
|
532 |
msgid "Editor's Choice"
|
533 |
msgstr ""
|
534 |
|
535 |
-
#: inc/classes/class-astra-sites.php:
|
536 |
msgid "Any Orientation"
|
537 |
msgstr ""
|
538 |
|
539 |
-
#: inc/classes/class-astra-sites.php:
|
540 |
msgid "Vertical"
|
541 |
msgstr ""
|
542 |
|
543 |
-
#: inc/classes/class-astra-sites.php:
|
544 |
msgid "Horizontal"
|
545 |
msgstr ""
|
546 |
|
547 |
-
#: inc/classes/class-astra-sites.php:
|
548 |
msgid "Free Images from Pixabay"
|
549 |
msgstr ""
|
550 |
|
551 |
-
#: inc/classes/class-astra-sites.php:
|
552 |
msgid "Pixabay Search - Ex: flowers"
|
553 |
msgstr ""
|
554 |
|
555 |
-
#: inc/classes/class-astra-sites.php:
|
556 |
msgid "Downloading..."
|
557 |
msgstr ""
|
558 |
|
559 |
-
#: inc/classes/class-astra-sites.php:
|
560 |
msgid "Validating..."
|
561 |
msgstr ""
|
562 |
|
563 |
-
#: inc/classes/class-astra-sites.php:
|
564 |
msgid "Please enter an API key."
|
565 |
msgstr ""
|
566 |
|
567 |
-
#: inc/classes/class-astra-sites.php:
|
568 |
msgid "An error occured with code "
|
569 |
msgstr ""
|
570 |
|
571 |
-
#: inc/classes/class-astra-sites.php:
|
572 |
msgid "Installed! Activating.."
|
573 |
msgstr ""
|
574 |
|
575 |
-
#: inc/classes/class-astra-sites.php:
|
576 |
msgid "Activating..."
|
577 |
msgstr ""
|
578 |
|
579 |
-
#: inc/classes/class-astra-sites.php:
|
580 |
msgid "Activated!"
|
581 |
msgstr ""
|
582 |
|
583 |
-
#: inc/classes/class-astra-sites.php:
|
584 |
msgid "Installing..."
|
585 |
msgstr ""
|
586 |
|
587 |
-
#: inc/classes/class-astra-sites.php:
|
588 |
-
#: inc/classes/class-astra-sites.php:
|
589 |
msgid "Get Agency Bundle"
|
590 |
msgstr ""
|
591 |
|
592 |
-
#: inc/classes/class-astra-sites.php:
|
593 |
msgid "Upgrade"
|
594 |
msgstr ""
|
595 |
|
596 |
-
#: inc/classes/class-astra-sites.php:
|
597 |
msgid ""
|
598 |
"Syncing template library in the background. The process can take anywhere "
|
599 |
"between 2 to 3 minutes. We will notify you once done."
|
600 |
msgstr ""
|
601 |
|
602 |
-
#: inc/classes/class-astra-sites.php:
|
603 |
msgid ""
|
604 |
"Some of the files required during the import process are "
|
605 |
"missing.<br/><br/>Please try again after some time."
|
606 |
msgstr ""
|
607 |
|
608 |
-
#: inc/classes/class-astra-sites.php:
|
609 |
msgid ""
|
610 |
"<p>WordPress debug mode is currently enabled on your website. This has "
|
611 |
"interrupted the import process..</p><p>Kindly disable debug mode and try "
|
@@ -614,7 +614,8 @@ msgid ""
|
|
614 |
"mode.</p><p><code>define('WP_DEBUG', false);</code></p>"
|
615 |
msgstr ""
|
616 |
|
617 |
-
#: inc/classes/class-astra-sites.php:
|
|
|
618 |
#. translators: %s is a documentation link.
|
619 |
msgid ""
|
620 |
"<p>Your website is facing a temporary issue in connecting the template "
|
@@ -622,169 +623,175 @@ msgid ""
|
|
622 |
"the issue and continue importing template.</p>"
|
623 |
msgstr ""
|
624 |
|
625 |
-
#: inc/classes/class-astra-sites.php:
|
626 |
#. translators: %s are white label strings.
|
627 |
msgid ""
|
628 |
"Warning! %1$s Import process is not complete. Don't close the window until "
|
629 |
"import process complete. Do you still want to leave the window?"
|
630 |
msgstr ""
|
631 |
|
632 |
-
#: inc/classes/class-astra-sites.php:
|
633 |
msgid "Done! View Site"
|
634 |
msgstr ""
|
635 |
|
636 |
-
#: inc/classes/class-astra-sites.php:
|
637 |
#. translators: %s is a template name
|
638 |
msgid "Import \"%s\" Template"
|
639 |
msgstr ""
|
640 |
|
641 |
-
#: inc/classes/class-astra-sites.php:
|
642 |
msgid "Installing Required Plugins.."
|
643 |
msgstr ""
|
644 |
|
645 |
-
#: inc/classes/class-astra-sites.php:
|
646 |
#. translators: %s are white label strings.
|
647 |
msgid "Installing %1$s Theme.."
|
648 |
msgstr ""
|
649 |
|
650 |
-
#: inc/classes/class-astra-sites.php:
|
651 |
msgid "XMLReader Support Missing"
|
652 |
msgstr ""
|
653 |
|
654 |
-
#: inc/classes/class-astra-sites.php:
|
655 |
msgid ""
|
656 |
"You're close to importing the template. To complete the process, enable "
|
657 |
"XMLReader support on your website."
|
658 |
msgstr ""
|
659 |
|
660 |
-
#: inc/classes/class-astra-sites.php:
|
661 |
msgid ""
|
662 |
"You can get in touch with your server administrator to enable XMLReader "
|
663 |
"support."
|
664 |
msgstr ""
|
665 |
|
666 |
-
#: inc/classes/class-astra-sites.php:
|
667 |
msgid "cURL Support Missing"
|
668 |
msgstr ""
|
669 |
|
670 |
-
#: inc/classes/class-astra-sites.php:
|
671 |
msgid "To run a smooth import, kindly enable cURL support on your website."
|
672 |
msgstr ""
|
673 |
|
674 |
-
#: inc/classes/class-astra-sites.php:
|
675 |
msgid "You can get in touch with your server administrator to enable cURL support."
|
676 |
msgstr ""
|
677 |
|
678 |
-
#: inc/classes/class-astra-sites.php:
|
679 |
msgid "Disable Debug Mode"
|
680 |
msgstr ""
|
681 |
|
682 |
-
#: inc/classes/class-astra-sites.php:
|
683 |
msgid ""
|
684 |
"WordPress debug mode is currently enabled on your website. With this, any "
|
685 |
"errors from third-party plugins might affect the import process."
|
686 |
msgstr ""
|
687 |
|
688 |
-
#: inc/classes/class-astra-sites.php:
|
689 |
msgid ""
|
690 |
"Kindly disable it to continue importing the Starter Template. To do so, you "
|
691 |
"can add the following code into the wp-config.php file."
|
692 |
msgstr ""
|
693 |
|
694 |
-
#: inc/classes/class-astra-sites.php:
|
695 |
msgid "Update Plugin"
|
696 |
msgstr ""
|
697 |
|
698 |
-
#: inc/classes/class-astra-sites.php:
|
699 |
#. translators: %s update page link.
|
700 |
msgid "Updates are available for plugins used in this starter template."
|
701 |
msgstr ""
|
702 |
|
703 |
-
#: inc/classes/class-astra-sites.php:
|
704 |
msgid ""
|
705 |
"Kindly <a href=\"%s\" target=\"_blank\">update</a> them for a successful "
|
706 |
"import. Skipping this step might break the template design/feature."
|
707 |
msgstr ""
|
708 |
|
709 |
-
#: inc/classes/class-astra-sites.php:
|
710 |
#: inc/includes/templates.php:443
|
711 |
msgid "Required Plugins Missing"
|
712 |
msgstr ""
|
713 |
|
714 |
-
#: inc/classes/class-astra-sites.php:
|
715 |
msgid ""
|
716 |
"This starter template requires premium plugins. As these are third party "
|
717 |
"premium plugins, you'll need to purchase, install and activate them first."
|
718 |
msgstr ""
|
719 |
|
720 |
-
#: inc/classes/class-astra-sites.php:
|
721 |
msgid "Dynamic Page"
|
722 |
msgstr ""
|
723 |
|
724 |
-
#: inc/classes/class-astra-sites.php:
|
725 |
msgid ""
|
726 |
"The page template you are about to import contains a dynamic widget/module. "
|
727 |
"Please note this dynamic data will not be available with the imported page."
|
728 |
msgstr ""
|
729 |
|
730 |
-
#: inc/classes/class-astra-sites.php:
|
731 |
msgid "You will need to add it manually on the page."
|
732 |
msgstr ""
|
733 |
|
734 |
-
#: inc/classes/class-astra-sites.php:
|
735 |
msgid "This dynamic content will be available when you import the entire site."
|
736 |
msgstr ""
|
737 |
|
738 |
-
#: inc/classes/class-astra-sites.php:
|
739 |
#. translators: %s are link.
|
740 |
msgid ""
|
741 |
"This is a premium website demo available only with the Agency Bundles you "
|
742 |
"can purchase it from <a href=\"%s\" target=\"_blank\">here</a>."
|
743 |
msgstr ""
|
744 |
|
745 |
-
#: inc/classes/class-astra-sites.php:
|
746 |
#. translators: %s are link.
|
747 |
msgid ""
|
748 |
"This is a premium template available with 'Agency' packages. <a href=\"%s\" "
|
749 |
"target=\"_blank\">Validate Your License</a> Key to import this template."
|
750 |
msgstr ""
|
751 |
|
752 |
-
#: inc/classes/class-astra-sites.php:
|
753 |
msgid "Template"
|
754 |
msgstr ""
|
755 |
|
756 |
-
#: inc/classes/class-astra-sites.php:
|
757 |
msgid "Block"
|
758 |
msgstr ""
|
759 |
|
760 |
-
#: inc/classes/class-astra-sites.php:
|
761 |
msgid "Dismiss"
|
762 |
msgstr ""
|
763 |
|
764 |
-
#: inc/classes/class-astra-sites.php:
|
765 |
msgid "Install Required Plugins"
|
766 |
msgstr ""
|
767 |
|
768 |
-
#: inc/classes/class-astra-sites.php:
|
769 |
#. translators: %s are link.
|
770 |
msgid ""
|
771 |
"You can locate <strong>Starter Templates Settings</strong> under the "
|
772 |
"<strong>Page Settings</strong> of the Style Tab."
|
773 |
msgstr ""
|
774 |
|
775 |
-
#: inc/classes/class-astra-sites.php:
|
776 |
msgid "Read More →"
|
777 |
msgstr ""
|
778 |
|
779 |
-
#: inc/classes/class-astra-sites.php:
|
780 |
msgid "Error: You don't have the required permissions to install plugins."
|
781 |
msgstr ""
|
782 |
|
783 |
-
#: inc/classes/class-astra-sites.php:
|
784 |
msgid "Plugin Activated"
|
785 |
msgstr ""
|
786 |
|
787 |
-
#: inc/classes/class-astra-sites.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
788 |
msgid "Template library refreshed!"
|
789 |
msgstr ""
|
790 |
|
@@ -825,7 +832,7 @@ msgstr ""
|
|
825 |
msgid "No Title"
|
826 |
msgstr ""
|
827 |
|
828 |
-
#: inc/importers/wxr-importer/class-astra-wxr-importer.php:
|
829 |
msgid "Import complete!"
|
830 |
msgstr ""
|
831 |
|
@@ -1021,14 +1028,14 @@ msgstr ""
|
|
1021 |
|
1022 |
#: inc/includes/admin-page.php:96 inc/includes/admin-page.php:102
|
1023 |
#: inc/includes/admin-page.php:104 inc/includes/admin-page.php:491
|
1024 |
-
#: inc/includes/admin-page.php:637 inc/includes/admin-page.php:
|
1025 |
#: inc/includes/templates.php:455
|
1026 |
msgid "Skip & Import"
|
1027 |
msgstr ""
|
1028 |
|
1029 |
#: inc/includes/admin-page.php:97 inc/includes/admin-page.php:105
|
1030 |
#: inc/includes/admin-page.php:492 inc/includes/admin-page.php:638
|
1031 |
-
#: inc/includes/admin-page.php:
|
1032 |
msgid "Cancel"
|
1033 |
msgstr ""
|
1034 |
|
@@ -1260,38 +1267,48 @@ msgid ""
|
|
1260 |
msgstr ""
|
1261 |
|
1262 |
#: inc/includes/admin-page.php:709
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1263 |
msgid "Import Widgets"
|
1264 |
msgstr ""
|
1265 |
|
1266 |
-
#: inc/includes/admin-page.php:
|
1267 |
msgid ""
|
1268 |
"Plugins needed to import this template are missing. Required plugins will "
|
1269 |
"be installed and activated automatically."
|
1270 |
msgstr ""
|
1271 |
|
1272 |
-
#: inc/includes/admin-page.php:
|
1273 |
msgid "Import Content"
|
1274 |
msgstr ""
|
1275 |
|
1276 |
-
#: inc/includes/admin-page.php:
|
1277 |
msgid ""
|
1278 |
"Selecting this option will import dummy pages, posts, images, and menus. If "
|
1279 |
"you do not want to import dummy content, please uncheck this option."
|
1280 |
msgstr ""
|
1281 |
|
1282 |
-
#: inc/includes/admin-page.php:
|
1283 |
#. translators: %s is the dynamic string.
|
1284 |
msgid ""
|
1285 |
"Import process can take anywhere between 2 to 10 minutes depending on the "
|
1286 |
"size of the %s and speed of the connection."
|
1287 |
msgstr ""
|
1288 |
|
1289 |
-
#: inc/includes/admin-page.php:
|
1290 |
#. translators: %s is the dynamic string.
|
1291 |
msgid "Please do NOT close this browser window until the %s is imported completely."
|
1292 |
msgstr ""
|
1293 |
|
1294 |
-
#: inc/includes/admin-page.php:
|
1295 |
msgid "Import"
|
1296 |
msgstr ""
|
1297 |
|
@@ -1377,10 +1394,54 @@ msgstr ""
|
|
1377 |
msgid "Plugin Description:"
|
1378 |
msgstr ""
|
1379 |
|
1380 |
-
#: inc/lib/astra-notices/class-astra-notices.php:
|
1381 |
msgid "WordPress Nonce not validated."
|
1382 |
msgstr ""
|
1383 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1384 |
#. Plugin URI of the plugin/theme
|
1385 |
msgid "https://wpastra.com/"
|
1386 |
msgstr ""
|
2 |
# This file is distributed under the same license as the Starter Templates package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Starter Templates 2.2.5\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/astra-sites\n"
|
7 |
+
"POT-Creation-Date: 2020-06-10 09:48:43+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
68 |
#: inc/classes/class-astra-sites-importer.php:298
|
69 |
#: inc/classes/class-astra-sites-importer.php:342
|
70 |
#: inc/classes/class-astra-sites-importer.php:414
|
71 |
+
#: inc/classes/class-astra-sites-importer.php:464
|
72 |
+
#: inc/classes/class-astra-sites-importer.php:512
|
73 |
+
#: inc/classes/class-astra-sites-importer.php:664
|
74 |
+
#: inc/classes/class-astra-sites-importer.php:692
|
75 |
+
#: inc/classes/class-astra-sites-importer.php:726
|
76 |
+
#: inc/classes/class-astra-sites-importer.php:778
|
77 |
+
#: inc/classes/class-astra-sites-importer.php:817
|
78 |
+
#: inc/classes/class-astra-sites-importer.php:852
|
79 |
+
#: inc/classes/class-astra-sites.php:230 inc/classes/class-astra-sites.php:404
|
80 |
+
#: inc/classes/class-astra-sites.php:507 inc/classes/class-astra-sites.php:578
|
81 |
+
#: inc/classes/class-astra-sites.php:769 inc/classes/class-astra-sites.php:788
|
82 |
msgid "You are not allowed to perform this action"
|
83 |
msgstr ""
|
84 |
|
101 |
msgid "Invalid site XML file!"
|
102 |
msgstr ""
|
103 |
|
104 |
+
#: inc/classes/class-astra-sites-importer.php:442
|
105 |
msgid "Site options are empty!"
|
106 |
msgstr ""
|
107 |
|
108 |
+
#: inc/classes/class-astra-sites-importer.php:493
|
109 |
msgid "Widget data is empty!"
|
110 |
msgstr ""
|
111 |
|
159 |
#: inc/classes/class-astra-sites-page.php:595
|
160 |
#: inc/classes/class-astra-sites-page.php:597
|
161 |
#: inc/classes/class-astra-sites-page.php:609
|
162 |
+
#: inc/classes/class-astra-sites.php:992 inc/includes/templates.php:28
|
163 |
#: inc/includes/templates.php:35
|
164 |
msgid "All"
|
165 |
msgstr ""
|
424 |
msgid "Provided API URL is empty! Please try again!"
|
425 |
msgstr ""
|
426 |
|
427 |
+
#: inc/classes/class-astra-sites.php:796
|
428 |
msgid "Theme Activated"
|
429 |
msgstr ""
|
430 |
|
431 |
+
#: inc/classes/class-astra-sites.php:843
|
432 |
msgid "User does not have permission!"
|
433 |
msgstr ""
|
434 |
|
435 |
+
#: inc/classes/class-astra-sites.php:930
|
436 |
msgid "See Library"
|
437 |
msgstr ""
|
438 |
|
439 |
+
#: inc/classes/class-astra-sites.php:993
|
440 |
msgid "Animals"
|
441 |
msgstr ""
|
442 |
|
443 |
+
#: inc/classes/class-astra-sites.php:994
|
444 |
msgid "Architecture/Buildings"
|
445 |
msgstr ""
|
446 |
|
447 |
+
#: inc/classes/class-astra-sites.php:995
|
448 |
msgid "Backgrounds/Textures"
|
449 |
msgstr ""
|
450 |
|
451 |
+
#: inc/classes/class-astra-sites.php:996
|
452 |
msgid "Beauty/Fashion"
|
453 |
msgstr ""
|
454 |
|
455 |
+
#: inc/classes/class-astra-sites.php:997
|
456 |
msgid "Business/Finance"
|
457 |
msgstr ""
|
458 |
|
459 |
+
#: inc/classes/class-astra-sites.php:998
|
460 |
msgid "Computer/Communication"
|
461 |
msgstr ""
|
462 |
|
463 |
+
#: inc/classes/class-astra-sites.php:999
|
464 |
msgid "Education"
|
465 |
msgstr ""
|
466 |
|
467 |
+
#: inc/classes/class-astra-sites.php:1000
|
468 |
msgid "Emotions"
|
469 |
msgstr ""
|
470 |
|
471 |
+
#: inc/classes/class-astra-sites.php:1001
|
472 |
msgid "Food/Drink"
|
473 |
msgstr ""
|
474 |
|
475 |
+
#: inc/classes/class-astra-sites.php:1002
|
476 |
msgid "Health/Medical"
|
477 |
msgstr ""
|
478 |
|
479 |
+
#: inc/classes/class-astra-sites.php:1003
|
480 |
msgid "Industry/Craft"
|
481 |
msgstr ""
|
482 |
|
483 |
+
#: inc/classes/class-astra-sites.php:1004
|
484 |
msgid "Music"
|
485 |
msgstr ""
|
486 |
|
487 |
+
#: inc/classes/class-astra-sites.php:1005
|
488 |
msgid "Nature/Landscapes"
|
489 |
msgstr ""
|
490 |
|
491 |
+
#: inc/classes/class-astra-sites.php:1006
|
492 |
msgid "People"
|
493 |
msgstr ""
|
494 |
|
495 |
+
#: inc/classes/class-astra-sites.php:1007
|
496 |
msgid "Places/Monuments"
|
497 |
msgstr ""
|
498 |
|
499 |
+
#: inc/classes/class-astra-sites.php:1008
|
500 |
msgid "Religion"
|
501 |
msgstr ""
|
502 |
|
503 |
+
#: inc/classes/class-astra-sites.php:1009
|
504 |
msgid "Science/Technology"
|
505 |
msgstr ""
|
506 |
|
507 |
+
#: inc/classes/class-astra-sites.php:1010
|
508 |
msgid "Sports"
|
509 |
msgstr ""
|
510 |
|
511 |
+
#: inc/classes/class-astra-sites.php:1011
|
512 |
msgid "Transportation/Traffic"
|
513 |
msgstr ""
|
514 |
|
515 |
+
#: inc/classes/class-astra-sites.php:1012
|
516 |
msgid "Travel/Vacation"
|
517 |
msgstr ""
|
518 |
|
519 |
+
#: inc/classes/class-astra-sites.php:1015
|
520 |
msgid "Popular"
|
521 |
msgstr ""
|
522 |
|
523 |
+
#: inc/classes/class-astra-sites.php:1016
|
524 |
msgid "Latest"
|
525 |
msgstr ""
|
526 |
|
527 |
+
#: inc/classes/class-astra-sites.php:1017
|
528 |
msgid "Upcoming"
|
529 |
msgstr ""
|
530 |
|
531 |
+
#: inc/classes/class-astra-sites.php:1018
|
532 |
msgid "Editor's Choice"
|
533 |
msgstr ""
|
534 |
|
535 |
+
#: inc/classes/class-astra-sites.php:1021
|
536 |
msgid "Any Orientation"
|
537 |
msgstr ""
|
538 |
|
539 |
+
#: inc/classes/class-astra-sites.php:1022
|
540 |
msgid "Vertical"
|
541 |
msgstr ""
|
542 |
|
543 |
+
#: inc/classes/class-astra-sites.php:1023
|
544 |
msgid "Horizontal"
|
545 |
msgstr ""
|
546 |
|
547 |
+
#: inc/classes/class-astra-sites.php:1025
|
548 |
msgid "Free Images from Pixabay"
|
549 |
msgstr ""
|
550 |
|
551 |
+
#: inc/classes/class-astra-sites.php:1026
|
552 |
msgid "Pixabay Search - Ex: flowers"
|
553 |
msgstr ""
|
554 |
|
555 |
+
#: inc/classes/class-astra-sites.php:1027
|
556 |
msgid "Downloading..."
|
557 |
msgstr ""
|
558 |
|
559 |
+
#: inc/classes/class-astra-sites.php:1028
|
560 |
msgid "Validating..."
|
561 |
msgstr ""
|
562 |
|
563 |
+
#: inc/classes/class-astra-sites.php:1029
|
564 |
msgid "Please enter an API key."
|
565 |
msgstr ""
|
566 |
|
567 |
+
#: inc/classes/class-astra-sites.php:1030
|
568 |
msgid "An error occured with code "
|
569 |
msgstr ""
|
570 |
|
571 |
+
#: inc/classes/class-astra-sites.php:1082
|
572 |
msgid "Installed! Activating.."
|
573 |
msgstr ""
|
574 |
|
575 |
+
#: inc/classes/class-astra-sites.php:1083
|
576 |
msgid "Activating..."
|
577 |
msgstr ""
|
578 |
|
579 |
+
#: inc/classes/class-astra-sites.php:1084
|
580 |
msgid "Activated!"
|
581 |
msgstr ""
|
582 |
|
583 |
+
#: inc/classes/class-astra-sites.php:1085
|
584 |
msgid "Installing..."
|
585 |
msgstr ""
|
586 |
|
587 |
+
#: inc/classes/class-astra-sites.php:1167
|
588 |
+
#: inc/classes/class-astra-sites.php:1362
|
589 |
msgid "Get Agency Bundle"
|
590 |
msgstr ""
|
591 |
|
592 |
+
#: inc/classes/class-astra-sites.php:1169
|
593 |
msgid "Upgrade"
|
594 |
msgstr ""
|
595 |
|
596 |
+
#: inc/classes/class-astra-sites.php:1173
|
597 |
msgid ""
|
598 |
"Syncing template library in the background. The process can take anywhere "
|
599 |
"between 2 to 3 minutes. We will notify you once done."
|
600 |
msgstr ""
|
601 |
|
602 |
+
#: inc/classes/class-astra-sites.php:1174
|
603 |
msgid ""
|
604 |
"Some of the files required during the import process are "
|
605 |
"missing.<br/><br/>Please try again after some time."
|
606 |
msgstr ""
|
607 |
|
608 |
+
#: inc/classes/class-astra-sites.php:1175
|
609 |
msgid ""
|
610 |
"<p>WordPress debug mode is currently enabled on your website. This has "
|
611 |
"interrupted the import process..</p><p>Kindly disable debug mode and try "
|
614 |
"mode.</p><p><code>define('WP_DEBUG', false);</code></p>"
|
615 |
msgstr ""
|
616 |
|
617 |
+
#: inc/classes/class-astra-sites.php:1177
|
618 |
+
#: inc/classes/class-astra-sites.php:1179
|
619 |
#. translators: %s is a documentation link.
|
620 |
msgid ""
|
621 |
"<p>Your website is facing a temporary issue in connecting the template "
|
623 |
"the issue and continue importing template.</p>"
|
624 |
msgstr ""
|
625 |
|
626 |
+
#: inc/classes/class-astra-sites.php:1183
|
627 |
#. translators: %s are white label strings.
|
628 |
msgid ""
|
629 |
"Warning! %1$s Import process is not complete. Don't close the window until "
|
630 |
"import process complete. Do you still want to leave the window?"
|
631 |
msgstr ""
|
632 |
|
633 |
+
#: inc/classes/class-astra-sites.php:1184
|
634 |
msgid "Done! View Site"
|
635 |
msgstr ""
|
636 |
|
637 |
+
#: inc/classes/class-astra-sites.php:1187
|
638 |
#. translators: %s is a template name
|
639 |
msgid "Import \"%s\" Template"
|
640 |
msgstr ""
|
641 |
|
642 |
+
#: inc/classes/class-astra-sites.php:1190
|
643 |
msgid "Installing Required Plugins.."
|
644 |
msgstr ""
|
645 |
|
646 |
+
#: inc/classes/class-astra-sites.php:1192
|
647 |
#. translators: %s are white label strings.
|
648 |
msgid "Installing %1$s Theme.."
|
649 |
msgstr ""
|
650 |
|
651 |
+
#: inc/classes/class-astra-sites.php:1228
|
652 |
msgid "XMLReader Support Missing"
|
653 |
msgstr ""
|
654 |
|
655 |
+
#: inc/classes/class-astra-sites.php:1229
|
656 |
msgid ""
|
657 |
"You're close to importing the template. To complete the process, enable "
|
658 |
"XMLReader support on your website."
|
659 |
msgstr ""
|
660 |
|
661 |
+
#: inc/classes/class-astra-sites.php:1229
|
662 |
msgid ""
|
663 |
"You can get in touch with your server administrator to enable XMLReader "
|
664 |
"support."
|
665 |
msgstr ""
|
666 |
|
667 |
+
#: inc/classes/class-astra-sites.php:1232
|
668 |
msgid "cURL Support Missing"
|
669 |
msgstr ""
|
670 |
|
671 |
+
#: inc/classes/class-astra-sites.php:1233
|
672 |
msgid "To run a smooth import, kindly enable cURL support on your website."
|
673 |
msgstr ""
|
674 |
|
675 |
+
#: inc/classes/class-astra-sites.php:1233
|
676 |
msgid "You can get in touch with your server administrator to enable cURL support."
|
677 |
msgstr ""
|
678 |
|
679 |
+
#: inc/classes/class-astra-sites.php:1236
|
680 |
msgid "Disable Debug Mode"
|
681 |
msgstr ""
|
682 |
|
683 |
+
#: inc/classes/class-astra-sites.php:1237
|
684 |
msgid ""
|
685 |
"WordPress debug mode is currently enabled on your website. With this, any "
|
686 |
"errors from third-party plugins might affect the import process."
|
687 |
msgstr ""
|
688 |
|
689 |
+
#: inc/classes/class-astra-sites.php:1237
|
690 |
msgid ""
|
691 |
"Kindly disable it to continue importing the Starter Template. To do so, you "
|
692 |
"can add the following code into the wp-config.php file."
|
693 |
msgstr ""
|
694 |
|
695 |
+
#: inc/classes/class-astra-sites.php:1240
|
696 |
msgid "Update Plugin"
|
697 |
msgstr ""
|
698 |
|
699 |
+
#: inc/classes/class-astra-sites.php:1242
|
700 |
#. translators: %s update page link.
|
701 |
msgid "Updates are available for plugins used in this starter template."
|
702 |
msgstr ""
|
703 |
|
704 |
+
#: inc/classes/class-astra-sites.php:1242
|
705 |
msgid ""
|
706 |
"Kindly <a href=\"%s\" target=\"_blank\">update</a> them for a successful "
|
707 |
"import. Skipping this step might break the template design/feature."
|
708 |
msgstr ""
|
709 |
|
710 |
+
#: inc/classes/class-astra-sites.php:1245 inc/includes/admin-page.php:479
|
711 |
#: inc/includes/templates.php:443
|
712 |
msgid "Required Plugins Missing"
|
713 |
msgstr ""
|
714 |
|
715 |
+
#: inc/classes/class-astra-sites.php:1246 inc/includes/admin-page.php:483
|
716 |
msgid ""
|
717 |
"This starter template requires premium plugins. As these are third party "
|
718 |
"premium plugins, you'll need to purchase, install and activate them first."
|
719 |
msgstr ""
|
720 |
|
721 |
+
#: inc/classes/class-astra-sites.php:1249
|
722 |
msgid "Dynamic Page"
|
723 |
msgstr ""
|
724 |
|
725 |
+
#: inc/classes/class-astra-sites.php:1250 inc/includes/admin-page.php:632
|
726 |
msgid ""
|
727 |
"The page template you are about to import contains a dynamic widget/module. "
|
728 |
"Please note this dynamic data will not be available with the imported page."
|
729 |
msgstr ""
|
730 |
|
731 |
+
#: inc/classes/class-astra-sites.php:1250 inc/includes/admin-page.php:633
|
732 |
msgid "You will need to add it manually on the page."
|
733 |
msgstr ""
|
734 |
|
735 |
+
#: inc/classes/class-astra-sites.php:1250 inc/includes/admin-page.php:634
|
736 |
msgid "This dynamic content will be available when you import the entire site."
|
737 |
msgstr ""
|
738 |
|
739 |
+
#: inc/classes/class-astra-sites.php:1336
|
740 |
#. translators: %s are link.
|
741 |
msgid ""
|
742 |
"This is a premium website demo available only with the Agency Bundles you "
|
743 |
"can purchase it from <a href=\"%s\" target=\"_blank\">here</a>."
|
744 |
msgstr ""
|
745 |
|
746 |
+
#: inc/classes/class-astra-sites.php:1340
|
747 |
#. translators: %s are link.
|
748 |
msgid ""
|
749 |
"This is a premium template available with 'Agency' packages. <a href=\"%s\" "
|
750 |
"target=\"_blank\">Validate Your License</a> Key to import this template."
|
751 |
msgstr ""
|
752 |
|
753 |
+
#: inc/classes/class-astra-sites.php:1366
|
754 |
msgid "Template"
|
755 |
msgstr ""
|
756 |
|
757 |
+
#: inc/classes/class-astra-sites.php:1367
|
758 |
msgid "Block"
|
759 |
msgstr ""
|
760 |
|
761 |
+
#: inc/classes/class-astra-sites.php:1368 inc/includes/templates.php:65
|
762 |
msgid "Dismiss"
|
763 |
msgstr ""
|
764 |
|
765 |
+
#: inc/classes/class-astra-sites.php:1369 inc/includes/admin-page.php:729
|
766 |
msgid "Install Required Plugins"
|
767 |
msgstr ""
|
768 |
|
769 |
+
#: inc/classes/class-astra-sites.php:1373
|
770 |
#. translators: %s are link.
|
771 |
msgid ""
|
772 |
"You can locate <strong>Starter Templates Settings</strong> under the "
|
773 |
"<strong>Page Settings</strong> of the Style Tab."
|
774 |
msgstr ""
|
775 |
|
776 |
+
#: inc/classes/class-astra-sites.php:1375
|
777 |
msgid "Read More →"
|
778 |
msgstr ""
|
779 |
|
780 |
+
#: inc/classes/class-astra-sites.php:1490
|
781 |
msgid "Error: You don't have the required permissions to install plugins."
|
782 |
msgstr ""
|
783 |
|
784 |
+
#: inc/classes/class-astra-sites.php:1526
|
785 |
msgid "Plugin Activated"
|
786 |
msgstr ""
|
787 |
|
788 |
+
#: inc/classes/class-astra-sites.php:1642
|
789 |
+
msgid ""
|
790 |
+
"Insufficient Permission. Please contact your Super Admin to allow the "
|
791 |
+
"install required plugin permissions."
|
792 |
+
msgstr ""
|
793 |
+
|
794 |
+
#: inc/classes/class-astra-sites.php:1840
|
795 |
msgid "Template library refreshed!"
|
796 |
msgstr ""
|
797 |
|
832 |
msgid "No Title"
|
833 |
msgstr ""
|
834 |
|
835 |
+
#: inc/importers/wxr-importer/class-astra-wxr-importer.php:421
|
836 |
msgid "Import complete!"
|
837 |
msgstr ""
|
838 |
|
1028 |
|
1029 |
#: inc/includes/admin-page.php:96 inc/includes/admin-page.php:102
|
1030 |
#: inc/includes/admin-page.php:104 inc/includes/admin-page.php:491
|
1031 |
+
#: inc/includes/admin-page.php:637 inc/includes/admin-page.php:783
|
1032 |
#: inc/includes/templates.php:455
|
1033 |
msgid "Skip & Import"
|
1034 |
msgstr ""
|
1035 |
|
1036 |
#: inc/includes/admin-page.php:97 inc/includes/admin-page.php:105
|
1037 |
#: inc/includes/admin-page.php:492 inc/includes/admin-page.php:638
|
1038 |
+
#: inc/includes/admin-page.php:784 inc/includes/templates.php:456
|
1039 |
msgid "Cancel"
|
1040 |
msgstr ""
|
1041 |
|
1267 |
msgstr ""
|
1268 |
|
1269 |
#: inc/includes/admin-page.php:709
|
1270 |
+
msgid "Import Elementor Style Kit"
|
1271 |
+
msgstr ""
|
1272 |
+
|
1273 |
+
#: inc/includes/admin-page.php:713
|
1274 |
+
msgid ""
|
1275 |
+
"This demo is built using Elementor Style Kit. By unchecking this the styles "
|
1276 |
+
"won't appear exactly like shown in the preview."
|
1277 |
+
msgstr ""
|
1278 |
+
|
1279 |
+
#: inc/includes/admin-page.php:722
|
1280 |
msgid "Import Widgets"
|
1281 |
msgstr ""
|
1282 |
|
1283 |
+
#: inc/includes/admin-page.php:732
|
1284 |
msgid ""
|
1285 |
"Plugins needed to import this template are missing. Required plugins will "
|
1286 |
"be installed and activated automatically."
|
1287 |
msgstr ""
|
1288 |
|
1289 |
+
#: inc/includes/admin-page.php:741
|
1290 |
msgid "Import Content"
|
1291 |
msgstr ""
|
1292 |
|
1293 |
+
#: inc/includes/admin-page.php:744
|
1294 |
msgid ""
|
1295 |
"Selecting this option will import dummy pages, posts, images, and menus. If "
|
1296 |
"you do not want to import dummy content, please uncheck this option."
|
1297 |
msgstr ""
|
1298 |
|
1299 |
+
#: inc/includes/admin-page.php:762
|
1300 |
#. translators: %s is the dynamic string.
|
1301 |
msgid ""
|
1302 |
"Import process can take anywhere between 2 to 10 minutes depending on the "
|
1303 |
"size of the %s and speed of the connection."
|
1304 |
msgstr ""
|
1305 |
|
1306 |
+
#: inc/includes/admin-page.php:768
|
1307 |
#. translators: %s is the dynamic string.
|
1308 |
msgid "Please do NOT close this browser window until the %s is imported completely."
|
1309 |
msgstr ""
|
1310 |
|
1311 |
+
#: inc/includes/admin-page.php:782
|
1312 |
msgid "Import"
|
1313 |
msgstr ""
|
1314 |
|
1394 |
msgid "Plugin Description:"
|
1395 |
msgstr ""
|
1396 |
|
1397 |
+
#: inc/lib/astra-notices/class-astra-notices.php:125
|
1398 |
msgid "WordPress Nonce not validated."
|
1399 |
msgstr ""
|
1400 |
|
1401 |
+
#: inc/lib/bsf-analytics/class-bsf-analytics.php:183
|
1402 |
+
#. translators: %s product name
|
1403 |
+
msgid ""
|
1404 |
+
"Want to help make <strong>%1s</strong> even more awesome? Allow us to "
|
1405 |
+
"collect non-sensitive diagnostic data and usage information. "
|
1406 |
+
msgstr ""
|
1407 |
+
|
1408 |
+
#: inc/lib/bsf-analytics/class-bsf-analytics.php:186
|
1409 |
+
msgid "This will be applicable for all sites from the network."
|
1410 |
+
msgstr ""
|
1411 |
+
|
1412 |
+
#: inc/lib/bsf-analytics/class-bsf-analytics.php:208
|
1413 |
+
#. translators: %s usage doc link
|
1414 |
+
msgid " Know More."
|
1415 |
+
msgstr ""
|
1416 |
+
|
1417 |
+
#: inc/lib/bsf-analytics/class-bsf-analytics.php:215
|
1418 |
+
msgid "Yes! Allow it"
|
1419 |
+
msgstr ""
|
1420 |
+
|
1421 |
+
#: inc/lib/bsf-analytics/class-bsf-analytics.php:223
|
1422 |
+
msgid "No Thanks"
|
1423 |
+
msgstr ""
|
1424 |
+
|
1425 |
+
#: inc/lib/bsf-analytics/class-bsf-analytics.php:292
|
1426 |
+
msgid "Every two days"
|
1427 |
+
msgstr ""
|
1428 |
+
|
1429 |
+
#: inc/lib/bsf-analytics/class-bsf-analytics.php:346
|
1430 |
+
msgid "Usage Tracking"
|
1431 |
+
msgstr ""
|
1432 |
+
|
1433 |
+
#: inc/lib/bsf-analytics/class-bsf-analytics.php:377
|
1434 |
+
msgid "Allow Brainstorm Force products to track non-sensitive usage tracking data."
|
1435 |
+
msgstr ""
|
1436 |
+
|
1437 |
+
#: inc/lib/bsf-analytics/class-bsf-analytics.php:380
|
1438 |
+
msgid " This will be applicable for all sites from the network."
|
1439 |
+
msgstr ""
|
1440 |
+
|
1441 |
+
#: inc/lib/bsf-analytics/class-bsf-analytics.php:385
|
1442 |
+
msgid "Learn More."
|
1443 |
+
msgstr ""
|
1444 |
+
|
1445 |
#. Plugin URI of the plugin/theme
|
1446 |
msgid "https://wpastra.com/"
|
1447 |
msgstr ""
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: Elementor,Beaver Builder,Templates,Gutenberg,Astra Starter Sites
|
|
5 |
Requires at least: 4.4
|
6 |
Requires PHP: 5.3
|
7 |
Tested up to: 5.4
|
8 |
-
Stable tag: 2.2.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -65,7 +65,7 @@ You can extend this library with premium ready-to-use website demos by purchasin
|
|
65 |
|
66 |
= WHY PEOPLE LOVE THE ASTRA THEME? =
|
67 |
|
68 |
-
Over
|
69 |
|
70 |
= HERE ARE A FEW REASONS WHY THEY LOVE ASTRA – =
|
71 |
|
@@ -138,6 +138,15 @@ We are open to suggestions and would love to work on topics that our users are l
|
|
138 |
|
139 |
== Changelog ==
|
140 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
v2.2.4 - 04-May-2020
|
142 |
- Improvement: Demo data is stored Network Wide for Multisite instance.
|
143 |
- Improvement: Users can opt-out from Elementor Theme Kit if needed while importing the site.
|
5 |
Requires at least: 4.4
|
6 |
Requires PHP: 5.3
|
7 |
Tested up to: 5.4
|
8 |
+
Stable tag: 2.2.5
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
65 |
|
66 |
= WHY PEOPLE LOVE THE ASTRA THEME? =
|
67 |
|
68 |
+
Over 900,000+ users are empowering their websites with Astra! From beginners to industry experts, everyone is loving Astra for its performance and ease of use.
|
69 |
|
70 |
= HERE ARE A FEW REASONS WHY THEY LOVE ASTRA – =
|
71 |
|
138 |
|
139 |
== Changelog ==
|
140 |
|
141 |
+
v2.2.5 - 15-June-2020
|
142 |
+
- Improvement: Performance enhancements in order to improve the TTFB (time to first byte).
|
143 |
+
- Improvement: Now users can see better error messages (if any) while import.
|
144 |
+
- Improvement: Handled the multisite plugin install/activate capability issue for standard administrator user.
|
145 |
+
- Fix: Resolved a conflict with Groundhogg plugin.
|
146 |
+
- Fix: Resolved a conflict between 3rd party plugins and Pixabay Images.
|
147 |
+
- Fix: Fixed latest Brizy page builder related issues.
|
148 |
+
- Fix: Fixed the repeated content import issues.
|
149 |
+
|
150 |
v2.2.4 - 04-May-2020
|
151 |
- Improvement: Demo data is stored Network Wide for Multisite instance.
|
152 |
- Improvement: Users can opt-out from Elementor Theme Kit if needed while importing the site.
|