Astra Starter Sites - Version 2.6.11

Version Description

Download this release

Release Info

Developer brainstormworg
Plugin Icon Astra Starter Sites
Version 2.6.11
Comparing to
See all releases

Code changes from version 2.6.10 to 2.6.11

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.6.10
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.6.10' );
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.6.11
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.6.11' );
23
  }
24
 
25
  if ( ! defined( 'ASTRA_SITES_FILE' ) ) {
inc/assets/js/admin-page.js CHANGED
@@ -170,6 +170,7 @@ var AstraSitesAjaxQueue = (function () {
170
 
171
  AstraSitesAdmin = {
172
 
 
173
  wpcontent_left_margin: $('#wpcontent').css('margin-left'),
174
  header: $('#astra-sites-menu-page .nav-tab-wrapper'),
175
  header_offset: 0,
@@ -2082,11 +2083,11 @@ var AstraSitesAjaxQueue = (function () {
2082
  if ($(this).hasClass('updating-message')) {
2083
  return;
2084
  }
2085
- if ( AstraSitesAdmin.subscribe_skiped || AstraSitesAdmin.subscription_form_submitted == 'yes') {
2086
  $('.user-building-for-title').hide();
2087
  $('.astra-sites-advanced-options').show();
2088
  $('.astra-sites-advanced-options-heading').hide();
2089
- $( '#astra-sites-subscription-form-one' ).hide();
2090
  }
2091
  if (false === AstraSitesAdmin.subscribe_skiped && $('.subscription-enabled').length && AstraSitesAdmin.subscription_form_submitted !== 'yes') {
2092
  AstraSitesAdmin._validate_field($('.subscription-input-wp-user-type'));
@@ -2102,7 +2103,7 @@ var AstraSitesAjaxQueue = (function () {
2102
 
2103
  $('.install-theme-info').hide();
2104
 
2105
- if ( false === AstraSitesAdmin.subscribe_skiped && $('.subscription-enabled').length && AstraSitesAdmin.subscription_form_submitted !== 'yes') {
2106
  $('.subscription-popup').show();
2107
  $('.astra-sites-result-preview .default').hide();
2108
  } else {
@@ -3584,7 +3585,7 @@ var AstraSitesAjaxQueue = (function () {
3584
  data: {
3585
  action: 'astra-required-plugins',
3586
  _ajax_nonce: astraSitesVars._ajax_nonce,
3587
- required_plugins: requiredPlugins,
3588
  options: AstraSitesAdmin.options_data,
3589
  enabledExtensions: AstraSitesAdmin.enabled_extensions,
3590
  },
@@ -3605,14 +3606,14 @@ var AstraSitesAjaxQueue = (function () {
3605
  .done(function (response) {
3606
  console.log('Required Plugin Status From The Site:');
3607
  AstraSitesAdmin._log(response);
3608
- console.groupEnd();
3609
- if ( AstraSitesAdmin.subscribe_skiped || AstraSitesAdmin.subscription_form_submitted == 'yes') {
3610
  $('.user-building-for-title').hide();
3611
  $('.astra-sites-advanced-options-heading').hide();
3612
  $('.astra-sites-advanced-options').show();
3613
  $('#astra-sites-subscription-form-one').hide();
3614
  }
3615
- if ( false === AstraSitesAdmin.subscribe_skiped && $('.subscription-enabled').length && AstraSitesAdmin.subscription_form_submitted !== 'yes') {
3616
  $('.astra-sites-result-preview .heading h3').html(astraSitesVars.headings.subscription);
3617
  $('.site-import-cancel').hide();
3618
 
@@ -3747,7 +3748,7 @@ var AstraSitesAjaxQueue = (function () {
3747
  return;
3748
  }
3749
 
3750
- if ( false === AstraSitesAdmin.subscribe_skiped && $('.subscription-enabled').length && AstraSitesAdmin.subscription_form_submitted !== 'yes') {
3751
  $('.subscription-popup').show();
3752
  $('.astra-sites-result-preview .default').hide();
3753
  } else {
170
 
171
  AstraSitesAdmin = {
172
 
173
+ import_source: 'legacy',
174
  wpcontent_left_margin: $('#wpcontent').css('margin-left'),
175
  header: $('#astra-sites-menu-page .nav-tab-wrapper'),
176
  header_offset: 0,
2083
  if ($(this).hasClass('updating-message')) {
2084
  return;
2085
  }
2086
+ if (AstraSitesAdmin.subscribe_skiped || AstraSitesAdmin.subscription_form_submitted == 'yes') {
2087
  $('.user-building-for-title').hide();
2088
  $('.astra-sites-advanced-options').show();
2089
  $('.astra-sites-advanced-options-heading').hide();
2090
+ $('#astra-sites-subscription-form-one').hide();
2091
  }
2092
  if (false === AstraSitesAdmin.subscribe_skiped && $('.subscription-enabled').length && AstraSitesAdmin.subscription_form_submitted !== 'yes') {
2093
  AstraSitesAdmin._validate_field($('.subscription-input-wp-user-type'));
2103
 
2104
  $('.install-theme-info').hide();
2105
 
2106
+ if (false === AstraSitesAdmin.subscribe_skiped && $('.subscription-enabled').length && AstraSitesAdmin.subscription_form_submitted !== 'yes') {
2107
  $('.subscription-popup').show();
2108
  $('.astra-sites-result-preview .default').hide();
2109
  } else {
3585
  data: {
3586
  action: 'astra-required-plugins',
3587
  _ajax_nonce: astraSitesVars._ajax_nonce,
3588
+ required_plugins: JSON.stringify(requiredPlugins),
3589
  options: AstraSitesAdmin.options_data,
3590
  enabledExtensions: AstraSitesAdmin.enabled_extensions,
3591
  },
3606
  .done(function (response) {
3607
  console.log('Required Plugin Status From The Site:');
3608
  AstraSitesAdmin._log(response);
3609
+ console.groupEnd();
3610
+ if (AstraSitesAdmin.subscribe_skiped || AstraSitesAdmin.subscription_form_submitted == 'yes') {
3611
  $('.user-building-for-title').hide();
3612
  $('.astra-sites-advanced-options-heading').hide();
3613
  $('.astra-sites-advanced-options').show();
3614
  $('#astra-sites-subscription-form-one').hide();
3615
  }
3616
+ if (false === AstraSitesAdmin.subscribe_skiped && $('.subscription-enabled').length && AstraSitesAdmin.subscription_form_submitted !== 'yes') {
3617
  $('.astra-sites-result-preview .heading h3').html(astraSitesVars.headings.subscription);
3618
  $('.site-import-cancel').hide();
3619
 
3748
  return;
3749
  }
3750
 
3751
+ if (false === AstraSitesAdmin.subscribe_skiped && $('.subscription-enabled').length && AstraSitesAdmin.subscription_form_submitted !== 'yes') {
3752
  $('.subscription-popup').show();
3753
  $('.astra-sites-result-preview .default').hide();
3754
  } else {
inc/assets/js/{dist/common.js → common.js} RENAMED
@@ -1,5 +1,5 @@
1
  (function($){
2
-
3
  $scope = {};
4
 
5
  AstraImageCommon = {
@@ -288,8 +288,11 @@
288
  /**
289
  * Initialize AstraImageCommon
290
  */
291
- $(function(){
 
292
  AstraImageCommon.init();
 
293
  });
294
 
295
- })(jQuery);
 
1
  (function($){
2
+
3
  $scope = {};
4
 
5
  AstraImageCommon = {
288
  /**
289
  * Initialize AstraImageCommon
290
  */
291
+ $( function(){
292
+
293
  AstraImageCommon.init();
294
+
295
  });
296
 
297
+ })(jQuery);
298
+
inc/assets/js/dist/index.js DELETED
@@ -1,340 +0,0 @@
1
- /******/ (function(modules) { // webpackBootstrap
2
- /******/ // The module cache
3
- /******/ var installedModules = {};
4
- /******/
5
- /******/ // The require function
6
- /******/ function __webpack_require__(moduleId) {
7
- /******/
8
- /******/ // Check if module is in cache
9
- /******/ if(installedModules[moduleId]) {
10
- /******/ return installedModules[moduleId].exports;
11
- /******/ }
12
- /******/ // Create a new module (and put it into the cache)
13
- /******/ var module = installedModules[moduleId] = {
14
- /******/ i: moduleId,
15
- /******/ l: false,
16
- /******/ exports: {}
17
- /******/ };
18
- /******/
19
- /******/ // Execute the module function
20
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21
- /******/
22
- /******/ // Flag the module as loaded
23
- /******/ module.l = true;
24
- /******/
25
- /******/ // Return the exports of the module
26
- /******/ return module.exports;
27
- /******/ }
28
- /******/
29
- /******/
30
- /******/ // expose the modules object (__webpack_modules__)
31
- /******/ __webpack_require__.m = modules;
32
- /******/
33
- /******/ // expose the module cache
34
- /******/ __webpack_require__.c = installedModules;
35
- /******/
36
- /******/ // define getter function for harmony exports
37
- /******/ __webpack_require__.d = function(exports, name, getter) {
38
- /******/ if(!__webpack_require__.o(exports, name)) {
39
- /******/ Object.defineProperty(exports, name, {
40
- /******/ configurable: false,
41
- /******/ enumerable: true,
42
- /******/ get: getter
43
- /******/ });
44
- /******/ }
45
- /******/ };
46
- /******/
47
- /******/ // getDefaultExport function for compatibility with non-harmony modules
48
- /******/ __webpack_require__.n = function(module) {
49
- /******/ var getter = module && module.__esModule ?
50
- /******/ function getDefault() { return module['default']; } :
51
- /******/ function getModuleExports() { return module; };
52
- /******/ __webpack_require__.d(getter, 'a', getter);
53
- /******/ return getter;
54
- /******/ };
55
- /******/
56
- /******/ // Object.prototype.hasOwnProperty.call
57
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
58
- /******/
59
- /******/ // __webpack_public_path__
60
- /******/ __webpack_require__.p = "";
61
- /******/
62
- /******/ // Load entry module and return exports
63
- /******/ return __webpack_require__(__webpack_require__.s = 0);
64
- /******/ })
65
- /************************************************************************/
66
- /******/ ([
67
- /* 0 */
68
- /*!************************************!*\
69
- !*** ./inc/assets/js/src/index.js ***!
70
- \************************************/
71
- /*! dynamic exports provided */
72
- /*! all exports used */
73
- /***/ (function(module, exports, __webpack_require__) {
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
-
132
- };
133
-
134
- /**
135
- * Initialize AstraImages
136
- */
137
- $(function () {
138
-
139
- AstraImages.init();
140
-
141
- if (astraImages.is_bb_active && astraImages.is_bb_editor) {
142
- if (undefined !== FLBuilder) {
143
- if (null !== FLBuilder._singlePhotoSelector) {
144
- FLBuilder._singlePhotoSelector.on('open', function (event) {
145
- AstraImages.init();
146
- });
147
- }
148
- }
149
- }
150
- });
151
- })(jQuery);
152
-
153
- /***/ }),
154
- /* 1 */
155
- /*!************************************!*\
156
- !*** ./inc/assets/js/src/frame.js ***!
157
- \************************************/
158
- /*! dynamic exports provided */
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);
166
-
167
- AstraAttachmentsBrowser = Frame.extend({
168
- tagName: 'div',
169
- className: 'attachments-browser ast-attachments-browser',
170
- images: [],
171
- object: [],
172
- initialize: function initialize() {
173
- _.defaults(this.options, {
174
- filters: false,
175
- search: true,
176
- date: true,
177
- display: false,
178
- sidebar: true,
179
- AttachmentView: wp.media.view.Attachment.Library
180
- });
181
-
182
- // Add a heading before the attachments list.
183
- this.createContent();
184
- },
185
-
186
- createContent: function createContent() {
187
-
188
- this.attachmentsHeading = new wp.media.view.Heading({
189
- text: astraImages.title,
190
- level: 'h3',
191
- className: 'ast-media-views-heading'
192
- });
193
- // this.views.add( this.attachmentsHeading );
194
- this.views.add(new wp.media.view.AstraContent());
195
- this.$el.find('.ast-image__search').wrapAll('<div class="ast-image__search-wrap">').parent().html();
196
- this.$el.find('.ast-image__search-wrap').append('<span class="ast-icon-search search-icon"></span>');
197
- },
198
-
199
- photoUploadComplete: function photoUploadComplete(savedImage) {
200
- if (savedImage && savedImage.attachmentData) {
201
- this.model.frame.content.mode("browse");
202
- this.model.get("selection").add(savedImage.attachmentData);
203
- this.model.frame.trigger("library:selection:add");
204
- this.model.get("selection");
205
- jQuery(".media-frame .media-button-select").click();
206
- }
207
- }
208
- });
209
-
210
- module.exports = AstraAttachmentsBrowser;
211
-
212
- /***/ }),
213
- /* 2 */
214
- /*!**************************************!*\
215
- !*** ./inc/assets/js/src/content.js ***!
216
- \**************************************/
217
- /*! dynamic exports provided */
218
- /*! all exports used */
219
- /***/ (function(module, exports, __webpack_require__) {
220
-
221
- wp.media.view.AstraSearch = __webpack_require__(/*! ./search.js */ 3);
222
-
223
- var AstraContent = wp.media.View.extend({
224
-
225
- tagName: 'div',
226
- className: 'ast-attachments-search-wrap',
227
- initialize: function initialize() {
228
- this.value = this.options.value;
229
- },
230
-
231
- render: function render() {
232
-
233
- var search = new wp.media.view.AstraSearch({
234
- controller: this.controller,
235
- model: this.model
236
- });
237
- this.views.add(search);
238
- return this;
239
- }
240
- });
241
-
242
- module.exports = AstraContent;
243
-
244
- /***/ }),
245
- /* 3 */
246
- /*!*************************************!*\
247
- !*** ./inc/assets/js/src/search.js ***!
248
- \*************************************/
249
- /*! dynamic exports provided */
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',
259
- id: 'ast-image-search-input',
260
- searching: false,
261
- images: [],
262
- attributes: {
263
- placeholder: astraImages.search_placeholder,
264
- type: 'search',
265
- 'aria-describedby': 'live-search-desc'
266
- },
267
-
268
- events: {
269
- 'search': 'search',
270
- 'keyup': 'search',
271
- 'blur': 'pushState',
272
- 'infinite': 'infinite'
273
- },
274
-
275
- initialize: function initialize(options) {
276
-
277
- this.parent = options.parent;
278
- },
279
-
280
- infinite: function infinite(event) {
281
-
282
- // Since doSearch is debounced, it will only run when user input comes to a rest.
283
- this.doSearch(event);
284
- },
285
-
286
- search: function search(event) {
287
-
288
- // Clear on escape.
289
- if (event.type === 'keyup' && event.which === 27) {
290
- event.target.value = '';
291
- }
292
- if ('' == event.target.value) {
293
- this.$el.removeClass('has-input');
294
- } else {
295
- this.$el.addClass('has-input');
296
- }
297
-
298
- $scope.find('.ast-image__skeleton').animate({ scrollTop: 0 }, 0);
299
- $('body').data('page', 1);
300
- AstraImageCommon.infiniteLoad = false;
301
-
302
- var thisObject = this;
303
- setTimeout(function () {
304
- thisObject.doSearch(event);
305
- }, 1000);
306
- },
307
-
308
- // Runs a search on the theme collection.
309
- doSearch: function doSearch(event) {
310
-
311
- if (this.searching) {
312
- return;
313
- }
314
-
315
- var thisObject = this;
316
- thisObject.searching = true;
317
- AstraImageCommon.config.q = event.target.value;
318
- var url = astraImages.pixabay_url + '?' + $.param(AstraImageCommon.config);
319
-
320
- if (url) {
321
- fetch(url).then(function (response) {
322
- return response.json();
323
- }).then(function (result) {
324
- thisObject.searching = false;
325
- this.images = result.hits;
326
- wp.media.view.AstraAttachmentsBrowser.images = this.images;
327
- $(document).trigger('ast-image__refresh');
328
- });
329
- }
330
- },
331
-
332
- pushState: function pushState(event) {
333
- $(document).trigger('ast-image__refresh');
334
- }
335
- });
336
-
337
- module.exports = AstraSearch;
338
-
339
- /***/ })
340
- /******/ ]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/assets/js/dist/main.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('wp-polyfill'), 'version' => '9a6ce3242818e82a525576bb7feea785');
inc/assets/js/dist/main.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(e){var t={};function a(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=t,a.d=function(e,t,i){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(a.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(i,n,function(t){return e[t]}.bind(null,n));return i},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=0)}([function(e,t,a){e.exports=a(1)},function(e,t,a){!function(e){var t=function(){if(null!=wp&&wp.media){var e=jQuery,t=wp.media.view.MediaFrame.Select;wp.media.view.AstraAttachmentsBrowser=a(2),wp.media.view.MediaFrame.Select=t.extend({browseRouter:function(e){t.prototype.browseRouter.apply(this,arguments),e.set({astraimages:{text:astraImages.title,priority:70}})},bindHandlers:function(){t.prototype.bindHandlers.apply(this,arguments),this.on("content:create:astraimages",this.astraimages,this)},astraimages:function(t){var a=this.state(),i=new wp.media.view.AstraAttachmentsBrowser({controller:this,model:a,AttachmentView:a.get("AttachmentView")});t.view=i,wp.media.view.AstraAttachmentsBrowser.object=i,setTimeout((function(){e(document).trigger("ast-image__set-scope")}),100)}})}};e((function(){t(),astraImages.is_bb_active&&astraImages.is_bb_editor&&void 0!==FLBuilder&&null!==FLBuilder._singlePhotoSelector&&FLBuilder._singlePhotoSelector.on("open",(function(e){t()}))}))}(jQuery)},function(e,t,a){var i,n=wp.media.view.Frame;wp.media.view.AstraContent=a(3),i=n.extend({tagName:"div",className:"attachments-browser ast-attachments-browser",images:[],object:[],initialize:function(){_.defaults(this.options,{filters:!1,search:!0,date:!0,display:!1,sidebar:!0,AttachmentView:wp.media.view.Attachment.Library}),this.createContent()},createContent:function(){this.attachmentsHeading=new wp.media.view.Heading({text:astraImages.title,level:"h3",className:"ast-media-views-heading"}),this.views.add(new wp.media.view.AstraContent),this.$el.find(".ast-image__search").wrapAll('<div class="ast-image__search-wrap">').parent().html(),this.$el.find(".ast-image__search-wrap").append('<span class="ast-icon-search search-icon"></span>')},photoUploadComplete:function(e){e&&e.attachmentData&&(this.model.frame.content.mode("browse"),this.model.get("selection").add(e.attachmentData),this.model.frame.trigger("library:selection:add"),this.model.get("selection"),jQuery(".media-frame .media-button-select").click())}}),e.exports=i},function(e,t,a){wp.media.view.AstraSearch=a(4);var i=wp.media.View.extend({tagName:"div",className:"ast-attachments-search-wrap",initialize:function(){this.value=this.options.value},render:function(){var e=new wp.media.view.AstraSearch({controller:this.controller,model:this.model});return this.views.add(e),this}});e.exports=i},function(e,t){$=jQuery;var a=wp.Backbone.View.extend({tagName:"input",className:"ast-image__search",id:"ast-image-search-input",searching:!1,images:[],attributes:{placeholder:astraImages.search_placeholder,type:"search","aria-describedby":"live-search-desc"},events:{search:"search",keyup:"search",blur:"pushState",infinite:"infinite"},initialize:function(e){this.parent=e.parent},infinite:function(e){this.doSearch(e)},search:function(e){"keyup"===e.type&&27===e.which&&(e.target.value=""),""==e.target.value?this.$el.removeClass("has-input"):this.$el.addClass("has-input"),$scope.find(".ast-image__skeleton").animate({scrollTop:0},0),$("body").data("page",1),AstraImageCommon.infiniteLoad=!1;var t=this;setTimeout((function(){t.doSearch(e)}),1e3)},doSearch:function(e){if(!this.searching){var t=this;t.searching=!0,AstraImageCommon.config.q=e.target.value;var a=astraImages.pixabay_url+"?"+$.param(AstraImageCommon.config);a&&fetch(a).then((function(e){return e.json()})).then((function(e){t.searching=!1,this.images=e.hits,wp.media.view.AstraAttachmentsBrowser.images=this.images,$(document).trigger("ast-image__refresh")}))}},pushState:function(e){$(document).trigger("ast-image__refresh")}});e.exports=a}]);
inc/assets/js/src/index.js CHANGED
@@ -55,7 +55,6 @@
55
  },
56
 
57
  };
58
-
59
 
60
  /**
61
  * Initialize AstraImages
55
  },
56
 
57
  };
 
58
 
59
  /**
60
  * Initialize AstraImages
inc/classes/class-astra-sites-importer-log.php CHANGED
@@ -250,9 +250,12 @@ if ( ! class_exists( 'Astra_Sites_Importer_Log' ) ) :
250
  // Style separator.
251
  $separator = PHP_EOL;
252
 
253
- astra_sites_error_log( $content );
 
 
 
 
254
 
255
- Astra_Sites::get_instance()->get_filesystem()->put_contents( $log_file, $existing_data . $separator . $content, FS_CHMOD_FILE );
256
  }
257
 
258
  /**
250
  // Style separator.
251
  $separator = PHP_EOL;
252
 
253
+ if ( apply_filters( 'astra_sites_debug_logs', false ) ) {
254
+ astra_sites_error_log( $content );
255
+
256
+ Astra_Sites::get_instance()->get_filesystem()->put_contents( $log_file, $existing_data . $separator . $content, FS_CHMOD_FILE );
257
+ }
258
 
 
259
  }
260
 
261
  /**
inc/classes/class-astra-sites-page.php CHANGED
@@ -69,7 +69,6 @@ if ( ! class_exists( 'Astra_Sites_Page' ) ) {
69
  * @param string $classes Space separated class string.
70
  */
71
  public function admin_body_class( $classes = '' ) {
72
-
73
  $is_page_builder_screen = isset( $_GET['change-page-builder'] ) ? true : false; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
74
  $current_page_builder = self::get_instance()->get_setting( 'page_builder' );
75
 
69
  * @param string $classes Space separated class string.
70
  */
71
  public function admin_body_class( $classes = '' ) {
 
72
  $is_page_builder_screen = isset( $_GET['change-page-builder'] ) ? true : false; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
73
  $current_page_builder = self::get_instance()->get_setting( 'page_builder' );
74
 
inc/classes/class-astra-sites.php CHANGED
@@ -708,12 +708,11 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
708
  }
709
 
710
  /**
711
- * Import Image.
712
  *
713
  * @since 2.0.0
714
  */
715
  public function create_image() {
716
-
717
  // Verify Nonce.
718
  check_ajax_referer( 'astra-sites', '_ajax_nonce' );
719
 
@@ -721,33 +720,43 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
721
  wp_send_json_error( __( 'You are not allowed to perform this action', 'astra-sites' ) );
722
  }
723
 
724
- $url = $_POST['url'];
725
- $name = $_POST['name'];
726
- $photo_id = $_POST['id'];
727
-
728
- $saved_images = get_option( 'astra-sites-saved-images', array() );
729
 
730
- $this->wp_upload_url = $this->get_wp_upload_url();
 
 
731
 
732
  $image = '';
733
  $result = array();
734
 
735
- if ( '' !== $url ) {
736
-
737
- $name = preg_replace( '/\.[^.]+$/', '', $name ) . '-' . $photo_id . '.jpg';
738
- $image = $this->create_image_from_url( $url, $name );
739
 
740
- if ( $image ) {
 
 
741
 
742
- $result['attachmentData'] = wp_prepare_attachment_for_js( $image );
743
- if ( did_action( 'elementor/loaded' ) ) {
744
- $result['data'] = Astra_Sites_Elementor_Images::get_instance()->get_attachment_data( $image );
745
- }
746
  }
 
 
747
  }
748
 
749
- if ( empty( $saved_images ) || false === $saved_images ) {
750
- $saved_images = array();
 
 
 
 
 
 
 
 
751
  }
752
 
753
  $saved_images[] = $photo_id;
@@ -771,47 +780,37 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
771
  *
772
  * @param String $url URL to pixabay image.
773
  * @param String $name Name to pixabay image.
 
774
  * @see http://codex.wordpress.org/Function_Reference/wp_insert_attachment#Example
775
  */
776
- public function create_image_from_url( $url, $name ) {
777
-
778
- if ( empty( $url ) || empty( $this->wp_upload_url ) ) {
779
- return false;
780
- }
781
 
782
- $filename = basename( $url );
 
783
 
784
- $upload_file = wp_upload_bits( $name, null, self::get_instance()->get_filesystem()->get_contents( $url ) );
785
-
786
- if ( ! $upload_file['error'] ) {
787
-
788
- $wp_filetype = wp_check_filetype( $name, null );
789
- $attachment = array(
790
- 'post_mime_type' => $wp_filetype['type'],
791
- 'post_parent' => 0,
792
- 'post_title' => preg_replace( '/\.[^.]+$/', '', $name ),
793
- 'post_content' => ASTRA_SITES_NAME . ' Image - ' . $name,
794
- 'post_status' => 'inherit',
795
- );
796
- $attachment_id = wp_insert_attachment( $attachment, $upload_file['file'], 0 );
797
-
798
- if ( ! is_wp_error( $attachment_id ) ) {
799
-
800
- require_once ABSPATH . 'wp-admin/includes/image.php';
801
- require_once ABSPATH . 'wp-admin/includes/media.php';
802
-
803
- $attachment_data = wp_generate_attachment_metadata( $attachment_id, $upload_file['file'] );
804
- wp_update_attachment_metadata( $attachment_id, $attachment_data );
805
 
806
- update_post_meta( $attachment_id, 'astra-images', $_POST['id'] ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
807
- update_post_meta( $attachment_id, '_wp_attachment_image_alt', sanitize_text_field( ! empty( $_POST['name'] ) ? $_POST['name'] : '' ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
808
 
809
- return $attachment_id;
810
- }
 
 
811
  }
812
 
813
- return false;
 
 
 
 
814
 
 
815
  }
816
 
817
  /**
@@ -1071,7 +1070,7 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
1071
  * @since 1.0.0
1072
  */
1073
  public static function get_api_domain() {
1074
- return apply_filters( 'astra_sites_api_domain', 'https://websitedemos.net/' );
1075
  }
1076
 
1077
  /**
@@ -1102,7 +1101,7 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
1102
 
1103
  wp_enqueue_script(
1104
  'astra-sites-images-common',
1105
- ASTRA_SITES_URI . 'inc/assets/js/dist/common.js',
1106
  array( 'jquery', 'wp-util' ), // Dependencies, defined above.
1107
  ASTRA_SITES_VER,
1108
  true
@@ -1168,7 +1167,7 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
1168
 
1169
  wp_enqueue_script(
1170
  'astra-sites-images-script',
1171
- ASTRA_SITES_URI . 'inc/assets/js/dist/index.js',
1172
  array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-components', 'wp-api-fetch', 'astra-sites-images-common' ), // Dependencies, defined above.
1173
  ASTRA_SITES_VER,
1174
  true
@@ -1244,6 +1243,7 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
1244
  // Admin Page.
1245
  wp_enqueue_style( 'astra-sites-admin', ASTRA_SITES_URI . 'inc/assets/css/admin.css', ASTRA_SITES_VER, true );
1246
  wp_style_add_data( 'astra-sites-admin', 'rtl', 'replace' );
 
1247
  wp_enqueue_script( 'astra-sites-admin-page', ASTRA_SITES_URI . 'inc/assets/js/admin-page.js', array( 'jquery', 'wp-util', 'updates', 'jquery-ui-autocomplete', 'astra-sites-api', 'astra-sites-history' ), ASTRA_SITES_VER, true );
1248
 
1249
  $data = $this->get_local_vars();
@@ -1657,7 +1657,6 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
1657
 
1658
  // Batch Import.
1659
  require_once ASTRA_SITES_DIR . 'inc/classes/batch-import/class-astra-sites-batch-import.php';
1660
-
1661
  }
1662
 
1663
  /**
@@ -1744,7 +1743,7 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
1744
  'notinstalled' => array(),
1745
  );
1746
 
1747
- $required_plugins = ( isset( $_POST['required_plugins'] ) ) ? $_POST['required_plugins'] : $required_plugins;
1748
 
1749
  $learndash_course_grid = 'https://www.learndash.com/add-on/course-grid/';
1750
  $learndash_woocommerce = 'https://www.learndash.com/add-on/woocommerce/';
@@ -1782,6 +1781,8 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
1782
  if ( ! empty( $required_plugins ) ) {
1783
  foreach ( $required_plugins as $key => $plugin ) {
1784
 
 
 
1785
  /**
1786
  * Has Pro Version Support?
1787
  * And
708
  }
709
 
710
  /**
711
+ * Download and save the image in the media library.
712
  *
713
  * @since 2.0.0
714
  */
715
  public function create_image() {
 
716
  // Verify Nonce.
717
  check_ajax_referer( 'astra-sites', '_ajax_nonce' );
718
 
720
  wp_send_json_error( __( 'You are not allowed to perform this action', 'astra-sites' ) );
721
  }
722
 
723
+ $url = isset( $_POST['url'] ) ? esc_url_raw( $_POST['url'] ) : false;
724
+ $name = isset( $_POST['name'] ) ? sanitize_text_field( $_POST['name'] ) : false;
725
+ $photo_id = isset( $_POST['id'] ) ? absint( $_POST['id'] ) : 0;
 
 
726
 
727
+ if ( false === $url ) {
728
+ wp_send_json_error( __( 'Need to send URL of the image to be downloaded', 'astra-sites' ) );
729
+ }
730
 
731
  $image = '';
732
  $result = array();
733
 
734
+ $name = preg_replace( '/\.[^.]+$/', '', $name ) . '-' . $photo_id . '.jpg';
735
+ $image = $this->create_image_from_url( $url, $name, $photo_id );
 
 
736
 
737
+ if ( is_wp_error( $image ) ) {
738
+ wp_send_json_error( $image );
739
+ }
740
 
741
+ if ( 0 !== $image ) {
742
+ $result['attachmentData'] = wp_prepare_attachment_for_js( $image );
743
+ if ( did_action( 'elementor/loaded' ) ) {
744
+ $result['data'] = Astra_Sites_Elementor_Images::get_instance()->get_attachment_data( $image );
745
  }
746
+ } else {
747
+ wp_send_json_error( __( 'Could not download the image.', 'astra-sites' ) );
748
  }
749
 
750
+ // Save downloaded image reference to an option.
751
+ if ( 0 !== $photo_id ) {
752
+ $saved_images = get_option( 'astra-sites-saved-images', array() );
753
+
754
+ if ( empty( $saved_images ) || false === $saved_images ) {
755
+ $saved_images = array();
756
+ }
757
+
758
+ $saved_images[] = $photo_id;
759
+ update_option( 'astra-sites-saved-images', $saved_images, 'no' );
760
  }
761
 
762
  $saved_images[] = $photo_id;
780
  *
781
  * @param String $url URL to pixabay image.
782
  * @param String $name Name to pixabay image.
783
+ * @param String $photo_id Photo ID to pixabay image.
784
  * @see http://codex.wordpress.org/Function_Reference/wp_insert_attachment#Example
785
  */
786
+ public function create_image_from_url( $url, $name, $photo_id ) {
787
+ $file_array = array();
788
+ $file_array['name'] = wp_basename( $name );
 
 
789
 
790
+ // Download file to temp location.
791
+ $file_array['tmp_name'] = download_url( $url );
792
 
793
+ // If error storing temporarily, return the error.
794
+ if ( is_wp_error( $file_array['tmp_name'] ) ) {
795
+ return $file_array;
796
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
797
 
798
+ // Do the validation and storage stuff.
799
+ $id = media_handle_sideload( $file_array, 0, null );
800
 
801
+ // If error storing permanently, unlink.
802
+ if ( is_wp_error( $id ) ) {
803
+ @unlink( $file_array['tmp_name'] ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
804
+ return $id;
805
  }
806
 
807
+ // Store the original attachment source in meta.
808
+ add_post_meta( $id, '_source_url', $url );
809
+
810
+ update_post_meta( $id, 'astra-images', $photo_id );
811
+ update_post_meta( $id, '_wp_attachment_image_alt', $name );
812
 
813
+ return $id;
814
  }
815
 
816
  /**
1070
  * @since 1.0.0
1071
  */
1072
  public static function get_api_domain() {
1073
+ return defined( 'STARTER_TEMPLATES_REMOTE_URL' ) ? STARTER_TEMPLATES_REMOTE_URL : apply_filters( 'astra_sites_api_domain', 'https://websitedemos.net/' );
1074
  }
1075
 
1076
  /**
1101
 
1102
  wp_enqueue_script(
1103
  'astra-sites-images-common',
1104
+ ASTRA_SITES_URI . 'inc/assets/js/common.js',
1105
  array( 'jquery', 'wp-util' ), // Dependencies, defined above.
1106
  ASTRA_SITES_VER,
1107
  true
1167
 
1168
  wp_enqueue_script(
1169
  'astra-sites-images-script',
1170
+ ASTRA_SITES_URI . 'inc/assets/js/dist/main.js',
1171
  array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-components', 'wp-api-fetch', 'astra-sites-images-common' ), // Dependencies, defined above.
1172
  ASTRA_SITES_VER,
1173
  true
1243
  // Admin Page.
1244
  wp_enqueue_style( 'astra-sites-admin', ASTRA_SITES_URI . 'inc/assets/css/admin.css', ASTRA_SITES_VER, true );
1245
  wp_style_add_data( 'astra-sites-admin', 'rtl', 'replace' );
1246
+
1247
  wp_enqueue_script( 'astra-sites-admin-page', ASTRA_SITES_URI . 'inc/assets/js/admin-page.js', array( 'jquery', 'wp-util', 'updates', 'jquery-ui-autocomplete', 'astra-sites-api', 'astra-sites-history' ), ASTRA_SITES_VER, true );
1248
 
1249
  $data = $this->get_local_vars();
1657
 
1658
  // Batch Import.
1659
  require_once ASTRA_SITES_DIR . 'inc/classes/batch-import/class-astra-sites-batch-import.php';
 
1660
  }
1661
 
1662
  /**
1743
  'notinstalled' => array(),
1744
  );
1745
 
1746
+ $required_plugins = ( isset( $_POST['required_plugins'] ) ) ? json_decode( stripslashes( $_POST['required_plugins'] ) ) : $required_plugins;
1747
 
1748
  $learndash_course_grid = 'https://www.learndash.com/add-on/course-grid/';
1749
  $learndash_woocommerce = 'https://www.learndash.com/add-on/woocommerce/';
1781
  if ( ! empty( $required_plugins ) ) {
1782
  foreach ( $required_plugins as $key => $plugin ) {
1783
 
1784
+ $plugin = (array) $plugin;
1785
+
1786
  /**
1787
  * Has Pro Version Support?
1788
  * And
inc/classes/functions.php CHANGED
@@ -24,7 +24,9 @@ if ( ! function_exists( 'astra_sites_error_log' ) ) :
24
  $message = wp_json_encode( $message );
25
  }
26
 
27
- error_log( $message ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log
 
 
28
  }
29
  }
30
 
24
  $message = wp_json_encode( $message );
25
  }
26
 
27
+ if ( apply_filters( 'astra_sites_debug_logs', false ) ) {
28
+ error_log( $message ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log
29
+ }
30
  }
31
  }
32
 
inc/importers/class-astra-sites-helper.php CHANGED
@@ -288,6 +288,59 @@ if ( ! class_exists( 'Astra_Sites_Helper' ) ) :
288
  return $data;
289
  }
290
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
291
  /**
292
  * Get the client IP address.
293
  *
288
  return $data;
289
  }
290
 
291
+ /**
292
+ * Extract image URLs and other URLs from a given HTML content.
293
+ *
294
+ * @since 2.6.10
295
+ *
296
+ * @param string $content HTML content string.
297
+ * @return array Array of URLS.
298
+ */
299
+ public static function extract_segregated_urls( $content ) {
300
+ // Extract all links.
301
+ preg_match_all( '#\bhttps?://[^,\s()<>]+(?:\([\w\d]+\)|([^,[:punct:]\s]|/))#', $content, $match );
302
+
303
+ $extracts = array(
304
+ 'image' => array(),
305
+ 'other' => array(),
306
+ );
307
+
308
+ $all_links = array_unique( $match[0] );
309
+
310
+ // Not have any link.
311
+ if ( empty( $all_links ) ) {
312
+ return array();
313
+ }
314
+
315
+ $image_links = array();
316
+ $other_links = array();
317
+
318
+ // Extract normal and image links.
319
+ foreach ( $all_links as $key => $link ) {
320
+ if ( preg_match( '/^((https?:\/\/)|(www\.))([a-z0-9-].?)+(:[0-9]+)?\/[\w\-]+\.(jpg|png|gif|jpeg)\/?$/i', $link ) ) {
321
+
322
+ // Get all image links.
323
+ // Avoid *-150x, *-300x and *-1024x images.
324
+ if (
325
+ false === strpos( $link, '-150x' ) &&
326
+ false === strpos( $link, '-300x' ) &&
327
+ false === strpos( $link, '-1024x' )
328
+ ) {
329
+ $image_links[] = $link;
330
+ }
331
+ } else {
332
+
333
+ // Collect other links.
334
+ $other_links[] = $link;
335
+ }
336
+ }
337
+
338
+ $extracts['image'] = $image_links;
339
+ $extracts['other'] = $other_links;
340
+
341
+ return $extracts;
342
+ }
343
+
344
  /**
345
  * Get the client IP address.
346
  *
inc/lib/ast-block-templates/ast-block-templates.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Gutenberg Starter Templates
4
  * Plugin URI: https://wpastra.com/
5
  * Description: Gutenberg single page templates, and blocks library to imported your website easily.
6
- * Version: 1.0.5
7
  * Author: Brainstorm Force
8
  * Author URI: https://www.brainstormforce.com
9
  * Text Domain: ast-block-templates
@@ -21,7 +21,7 @@ if ( apply_filters( 'ast_block_templates_disable', false ) ) {
21
 
22
  // Set constants.
23
  define( 'AST_BLOCK_TEMPLATES_LIBRARY_URL', 'https://websitedemos.net/' );
24
- define( 'AST_BLOCK_TEMPLATES_VER', '1.0.5' );
25
  define( 'AST_BLOCK_TEMPLATES_FILE', __FILE__ );
26
  define( 'AST_BLOCK_TEMPLATES_BASE', plugin_basename( AST_BLOCK_TEMPLATES_FILE ) );
27
  define( 'AST_BLOCK_TEMPLATES_DIR', plugin_dir_path( AST_BLOCK_TEMPLATES_FILE ) );
3
  * Plugin Name: Gutenberg Starter Templates
4
  * Plugin URI: https://wpastra.com/
5
  * Description: Gutenberg single page templates, and blocks library to imported your website easily.
6
+ * Version: 1.0.6
7
  * Author: Brainstorm Force
8
  * Author URI: https://www.brainstormforce.com
9
  * Text Domain: ast-block-templates
21
 
22
  // Set constants.
23
  define( 'AST_BLOCK_TEMPLATES_LIBRARY_URL', 'https://websitedemos.net/' );
24
+ define( 'AST_BLOCK_TEMPLATES_VER', '1.0.6' );
25
  define( 'AST_BLOCK_TEMPLATES_FILE', __FILE__ );
26
  define( 'AST_BLOCK_TEMPLATES_BASE', plugin_basename( AST_BLOCK_TEMPLATES_FILE ) );
27
  define( 'AST_BLOCK_TEMPLATES_DIR', plugin_dir_path( AST_BLOCK_TEMPLATES_FILE ) );
inc/lib/ast-block-templates/classes/class-ast-block-templates-sync-library.php CHANGED
@@ -53,6 +53,44 @@ if ( ! class_exists( 'Ast_Block_Templates_Sync_Library' ) ) :
53
  add_action( 'admin_head', array( $this, 'setup_templates' ) );
54
  }
55
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  /**
57
  * Start Importer
58
  *
@@ -62,6 +100,8 @@ if ( ! class_exists( 'Ast_Block_Templates_Sync_Library' ) ) :
62
  public function setup_templates() {
63
  $is_fresh_site = get_site_option( 'ast_block_templates_fresh_site', 'yes' );
64
 
 
 
65
  if ( 'no' === $is_fresh_site ) {
66
  return;
67
  }
@@ -91,6 +131,34 @@ if ( ! class_exists( 'Ast_Block_Templates_Sync_Library' ) ) :
91
 
92
  }
93
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  /**
95
  * Json Files Names.
96
  *
@@ -249,6 +317,7 @@ if ( ! class_exists( 'Ast_Block_Templates_Sync_Library' ) ) :
249
  public function update_latest_checksums() {
250
  $latest_checksums = get_site_option( 'ast-block-templates-last-export-checksums-latest', '' );
251
  update_site_option( 'ast-block-templates-last-export-checksums', $latest_checksums, 'no' );
 
252
  }
253
 
254
  /**
53
  add_action( 'admin_head', array( $this, 'setup_templates' ) );
54
  }
55
 
56
+ /**
57
+ * Auto Sync the library
58
+ *
59
+ * @since 1.0.6
60
+ * @return void
61
+ */
62
+ public function auto_sync() {
63
+
64
+ // Flush the data to the browsers.
65
+ if ( function_exists( 'fastcgi_finish_request' ) ) {
66
+ /**
67
+ *
68
+ * Any kind of output flush after fastcgi_finish_request is treated as exit;
69
+ * Hence, If any PHP Warnings/Notices after this can also terminate the execution.
70
+ * ignore_user_abort disables this and does not terminate the script on PHP Warnings/Notices.
71
+ * https://stackoverflow.com/questions/14191947/php-fpm-fastcgi-finish-request-reliable
72
+ */
73
+ ignore_user_abort( true );
74
+ fastcgi_finish_request();
75
+ }
76
+
77
+ ast_block_templates_log( 'Sync process for Gutenberg Blocks has started.' );
78
+ $this->import_categories();
79
+ $blocks = $this->get_total_blocks_requests();
80
+
81
+ for ( $i = 1; $i <= $blocks; $i++ ) {
82
+ $sites_and_pages = $this->import_blocks( $i );
83
+ }
84
+
85
+ $sites = $this->get_total_sites_count();
86
+
87
+ for ( $i = 1; $i <= $sites; $i++ ) {
88
+ $sites_and_pages = $this->import_sites( $i );
89
+ }
90
+ ast_block_templates_log( 'Sync process for Gutenberg Blocks is done.' );
91
+ $this->update_latest_checksums();
92
+ }
93
+
94
  /**
95
  * Start Importer
96
  *
100
  public function setup_templates() {
101
  $is_fresh_site = get_site_option( 'ast_block_templates_fresh_site', 'yes' );
102
 
103
+ $this->process_sync();
104
+
105
  if ( 'no' === $is_fresh_site ) {
106
  return;
107
  }
131
 
132
  }
133
 
134
+ /**
135
+ * Process Import
136
+ *
137
+ * @since 1.0.6
138
+ *
139
+ * @return mixed Null if process is already started.
140
+ */
141
+ public function process_sync() {
142
+
143
+ // Check if last sync and this sync has a gap of 24 hours.
144
+ $last_check_time = get_site_option( 'ast-block-templates-last-export-checksums-time', 0 );
145
+ if ( ( time() - $last_check_time ) < 86400 ) {
146
+ return;
147
+ }
148
+
149
+ $current_screen = get_current_screen();
150
+
151
+ // Bail if not on Blok editor screen.
152
+ if ( true !== $current_screen->is_block_editor ) {
153
+ return;
154
+ }
155
+
156
+ // Process sync.
157
+ if ( 'yes' === $this->get_last_export_checksums() ) {
158
+ add_action( 'shutdown', array( $this, 'auto_sync' ) );
159
+ }
160
+ }
161
+
162
  /**
163
  * Json Files Names.
164
  *
317
  public function update_latest_checksums() {
318
  $latest_checksums = get_site_option( 'ast-block-templates-last-export-checksums-latest', '' );
319
  update_site_option( 'ast-block-templates-last-export-checksums', $latest_checksums, 'no' );
320
+ update_site_option( 'ast-block-templates-last-export-checksums-time', time(), 'no' );
321
  }
322
 
323
  /**
inc/lib/ast-block-templates/version.json CHANGED
@@ -1,3 +1,3 @@
1
  {
2
- "ast-block-templates": "1.0.5"
3
  }
1
  {
2
+ "ast-block-templates": "1.0.6"
3
  }
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.6.10\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/astra-sites\n"
7
- "POT-Creation-Date: 2021-05-24 07:03:17+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -125,7 +125,7 @@ msgid "Site import is in process."
125
  msgstr ""
126
 
127
  #: inc/classes/batch-import/class-astra-sites-batch-site-import.php:260
128
- #: inc/classes/class-astra-sites-page.php:439
129
  msgid "Preparing Site Import"
130
  msgstr ""
131
 
@@ -134,37 +134,37 @@ msgid "Site import started."
134
  msgstr ""
135
 
136
  #: inc/classes/batch-import/class-astra-sites-batch-site-import.php:320
137
- #: inc/classes/class-astra-sites-page.php:442
138
  msgid "Installing Required Plugins"
139
  msgstr ""
140
 
141
  #: inc/classes/batch-import/class-astra-sites-batch-site-import.php:337
142
- #: inc/classes/class-astra-sites-page.php:445
143
  msgid "Importing Contact Forms"
144
  msgstr ""
145
 
146
  #: inc/classes/batch-import/class-astra-sites-batch-site-import.php:350
147
- #: inc/classes/class-astra-sites-page.php:448
148
  msgid "Setting up the Theme"
149
  msgstr ""
150
 
151
  #: inc/classes/batch-import/class-astra-sites-batch-site-import.php:360
152
- #: inc/classes/class-astra-sites-page.php:451
153
  msgid "Importing Media, Posts, and Pages"
154
  msgstr ""
155
 
156
  #: inc/classes/batch-import/class-astra-sites-batch-site-import.php:371
157
- #: inc/classes/class-astra-sites-page.php:454
158
  msgid "Importing Site Options"
159
  msgstr ""
160
 
161
  #: inc/classes/batch-import/class-astra-sites-batch-site-import.php:380
162
- #: inc/classes/class-astra-sites-page.php:457
163
  msgid "Importing Sidebar and Widgets"
164
  msgstr ""
165
 
166
  #: inc/classes/batch-import/class-astra-sites-batch-site-import.php:400
167
- #: inc/classes/class-astra-sites-page.php:460
168
  msgid "Import Complete"
169
  msgstr ""
170
 
@@ -195,25 +195,25 @@ msgid ""
195
  "wp-config.php file."
196
  msgstr ""
197
 
198
- #: inc/classes/class-astra-sites-importer-log.php:266
199
  msgid "Enabled"
200
  msgstr ""
201
 
202
- #: inc/classes/class-astra-sites-importer-log.php:269
203
  msgid "Disabled"
204
  msgstr ""
205
 
206
- #: inc/classes/class-astra-sites-importer-log.php:354
207
- #: inc/classes/class-astra-sites-importer-log.php:413
208
  msgid "Yes"
209
  msgstr ""
210
 
211
- #: inc/classes/class-astra-sites-importer-log.php:357
212
- #: inc/classes/class-astra-sites-importer-log.php:416
213
  msgid "No"
214
  msgstr ""
215
 
216
- #: inc/classes/class-astra-sites-importer-log.php:431
217
  msgid "You currently have no scheduled cron events."
218
  msgstr ""
219
 
@@ -230,8 +230,8 @@ msgstr ""
230
  #: inc/classes/class-astra-sites-importer.php:823
231
  #: inc/classes/class-astra-sites-importer.php:861
232
  #: inc/classes/class-astra-sites.php:329 inc/classes/class-astra-sites.php:544
233
- #: inc/classes/class-astra-sites.php:648 inc/classes/class-astra-sites.php:721
234
- #: inc/classes/class-astra-sites.php:912 inc/classes/class-astra-sites.php:931
235
  msgid "You are not allowed to perform this action"
236
  msgstr ""
237
 
@@ -262,7 +262,7 @@ msgstr ""
262
  msgid "Widget data is empty!"
263
  msgstr ""
264
 
265
- #: inc/classes/class-astra-sites-page.php:136
266
  #. translators: %1$s is the admin page URL, %2$s is product name.
267
  msgid ""
268
  "Thank you for choosing %1$s! Check the library of <a "
@@ -270,11 +270,11 @@ msgid ""
270
  "templates here »</a>"
271
  msgstr ""
272
 
273
- #: inc/classes/class-astra-sites-page.php:323
274
  msgid "Required XMLReader PHP extension is missing on your server!"
275
  msgstr ""
276
 
277
- #: inc/classes/class-astra-sites-page.php:325
278
  #. translators: %s is the white label name.
279
  msgid ""
280
  "%s import requires XMLReader extension to be installed. Please contact your "
@@ -282,176 +282,176 @@ msgid ""
282
  "extension."
283
  msgstr ""
284
 
285
- #: inc/classes/class-astra-sites-page.php:387
286
  msgid "Settings saved successfully."
287
  msgstr ""
288
 
289
- #: inc/classes/class-astra-sites-page.php:426
290
  msgid "Importing Starter Template..."
291
  msgstr ""
292
 
293
- #: inc/classes/class-astra-sites-page.php:431
294
  msgid "The demo you are importing seems invalid. The site is not found."
295
  msgstr ""
296
 
297
- #: inc/classes/class-astra-sites-page.php:433
298
  msgid "The demo you are importing is a premium demo."
299
  msgstr ""
300
 
301
- #: inc/classes/class-astra-sites-page.php:433
302
  #: inc/classes/class-astra-sites.php:1301
303
  #: inc/classes/class-astra-sites.php:1551 inc/includes/templates.php:302
304
  msgid "Get Access!"
305
  msgstr ""
306
 
307
- #: inc/classes/class-astra-sites-page.php:435
308
  msgid ""
309
  "The import process can take a few minutes depending on the size of the site "
310
  "and speed of the connection."
311
  msgstr ""
312
 
313
- #: inc/classes/class-astra-sites-page.php:466
314
  msgid "Site Imported Successfully!"
315
  msgstr ""
316
 
317
- #: inc/classes/class-astra-sites-page.php:467
318
  msgid "Visit Site"
319
  msgstr ""
320
 
321
- #: inc/classes/class-astra-sites-page.php:516
322
  msgid "Getting Started"
323
  msgstr ""
324
 
325
- #: inc/classes/class-astra-sites-page.php:522
326
  msgid "Select Page Builder"
327
  msgstr ""
328
 
329
- #: inc/classes/class-astra-sites-page.php:523
330
  msgid ""
331
  "We offer starter templates that can be imported in one click. These sites "
332
  "are available in the following page builders. Please choose your preferred "
333
  "page builder from the list below."
334
  msgstr ""
335
 
336
- #: inc/classes/class-astra-sites-page.php:583
337
  msgid "My Favorite"
338
  msgstr ""
339
 
340
- #: inc/classes/class-astra-sites-page.php:588 inc/includes/templates.php:130
341
  msgid "Sync Library"
342
  msgstr ""
343
 
344
- #: inc/classes/class-astra-sites-page.php:677
345
- #: inc/classes/class-astra-sites-page.php:679
346
- #: inc/classes/class-astra-sites-page.php:691
347
- #: inc/classes/class-astra-sites.php:1125 inc/includes/templates.php:28
348
  #: inc/includes/templates.php:35
349
  msgid "All"
350
  msgstr ""
351
 
352
- #: inc/classes/class-astra-sites-page.php:696 inc/includes/templates.php:29
353
  msgid "Free"
354
  msgstr ""
355
 
356
- #: inc/classes/class-astra-sites-page.php:701 inc/includes/admin-page.php:244
357
  #: inc/includes/admin-page.php:333 inc/includes/admin-page.php:394
358
  #: inc/includes/templates.php:30 inc/includes/templates.php:181
359
  #: inc/includes/templates.php:308 inc/includes/templates.php:394
360
  msgid "Premium"
361
  msgstr ""
362
 
363
- #: inc/classes/class-astra-sites-page.php:709 inc/includes/templates.php:44
364
  msgid "Search..."
365
  msgstr ""
366
 
367
- #: inc/classes/class-astra-sites-page.php:783
368
  msgid "Gutenberg"
369
  msgstr ""
370
 
371
- #: inc/classes/class-astra-sites-page.php:785
372
  msgid "The default WordPress editor"
373
  msgstr ""
374
 
375
- #: inc/classes/class-astra-sites-page.php:789
376
  msgid "Elementor"
377
  msgstr ""
378
 
379
- #: inc/classes/class-astra-sites-page.php:794
380
  msgid "Beaver Builder"
381
  msgstr ""
382
 
383
- #: inc/classes/class-astra-sites-page.php:799
384
  msgid "Brizy"
385
  msgstr ""
386
 
387
- #: inc/classes/class-astra-sites-page.php:897
388
  #. translators: 1: The number of years in an interval of time.
389
  msgid "%s year"
390
  msgid_plural "%s years"
391
  msgstr[0] ""
392
  msgstr[1] ""
393
 
394
- #: inc/classes/class-astra-sites-page.php:899
395
  #. translators: 1: The number of months in an interval of time.
396
  msgid "%s month"
397
  msgid_plural "%s months"
398
  msgstr[0] ""
399
  msgstr[1] ""
400
 
401
- #: inc/classes/class-astra-sites-page.php:901
402
  #. translators: 1: The number of weeks in an interval of time.
403
  msgid "%s week"
404
  msgid_plural "%s weeks"
405
  msgstr[0] ""
406
  msgstr[1] ""
407
 
408
- #: inc/classes/class-astra-sites-page.php:903
409
  #. translators: 1: The number of days in an interval of time.
410
  msgid "%s day"
411
  msgid_plural "%s days"
412
  msgstr[0] ""
413
  msgstr[1] ""
414
 
415
- #: inc/classes/class-astra-sites-page.php:905
416
  #. translators: 1: The number of hours in an interval of time.
417
  msgid "%s hour"
418
  msgid_plural "%s hours"
419
  msgstr[0] ""
420
  msgstr[1] ""
421
 
422
- #: inc/classes/class-astra-sites-page.php:907
423
  #. translators: 1: The number of minutes in an interval of time.
424
  msgid "%s minute"
425
  msgid_plural "%s minutes"
426
  msgstr[0] ""
427
  msgstr[1] ""
428
 
429
- #: inc/classes/class-astra-sites-page.php:909
430
  #. translators: 1: The number of seconds in an interval of time.
431
  msgid "%s second"
432
  msgid_plural "%s seconds"
433
  msgstr[0] ""
434
  msgstr[1] ""
435
 
436
- #: inc/classes/class-astra-sites-page.php:913
437
  msgid "now"
438
  msgstr ""
439
 
440
- #: inc/classes/class-astra-sites-page.php:967
441
  msgid ""
442
  "ERROR! Cron schedules are disabled by setting constant DISABLE_WP_CRON to "
443
  "true.<br/>To start the import process please enable the cron by setting the "
444
  "constant to false. E.g. define( 'DISABLE_WP_CRON', false );"
445
  msgstr ""
446
 
447
- #: inc/classes/class-astra-sites-page.php:971
448
  msgid ""
449
  "ERROR! Cron schedules are disabled by setting constant ALTERNATE_WP_CRON to "
450
  "true.<br/>To start the import process please enable the cron by setting the "
451
  "constant to false. E.g. define( 'ALTERNATE_WP_CRON', false );"
452
  msgstr ""
453
 
454
- #: inc/classes/class-astra-sites-page.php:1007
455
  #. translators: 1: The HTTP response code.
456
  msgid "Unexpected HTTP response code: %s"
457
  msgstr ""
@@ -648,163 +648,171 @@ msgstr ""
648
  msgid "Client IP: %1$s </br> Error code: %2$s"
649
  msgstr ""
650
 
651
- #: inc/classes/class-astra-sites.php:939
 
 
 
 
 
 
 
 
652
  msgid "Theme Activated"
653
  msgstr ""
654
 
655
- #: inc/classes/class-astra-sites.php:985
656
  msgid "User does not have permission!"
657
  msgstr ""
658
 
659
- #: inc/classes/class-astra-sites.php:1062
660
  msgid "See Library"
661
  msgstr ""
662
 
663
- #: inc/classes/class-astra-sites.php:1126
664
  msgid "Animals"
665
  msgstr ""
666
 
667
- #: inc/classes/class-astra-sites.php:1127
668
  msgid "Architecture/Buildings"
669
  msgstr ""
670
 
671
- #: inc/classes/class-astra-sites.php:1128
672
  msgid "Backgrounds/Textures"
673
  msgstr ""
674
 
675
- #: inc/classes/class-astra-sites.php:1129
676
  msgid "Beauty/Fashion"
677
  msgstr ""
678
 
679
- #: inc/classes/class-astra-sites.php:1130
680
  msgid "Business/Finance"
681
  msgstr ""
682
 
683
- #: inc/classes/class-astra-sites.php:1131
684
  msgid "Computer/Communication"
685
  msgstr ""
686
 
687
- #: inc/classes/class-astra-sites.php:1132
688
  msgid "Education"
689
  msgstr ""
690
 
691
- #: inc/classes/class-astra-sites.php:1133
692
  msgid "Emotions"
693
  msgstr ""
694
 
695
- #: inc/classes/class-astra-sites.php:1134
696
  msgid "Food/Drink"
697
  msgstr ""
698
 
699
- #: inc/classes/class-astra-sites.php:1135
700
  msgid "Health/Medical"
701
  msgstr ""
702
 
703
- #: inc/classes/class-astra-sites.php:1136
704
  msgid "Industry/Craft"
705
  msgstr ""
706
 
707
- #: inc/classes/class-astra-sites.php:1137
708
  msgid "Music"
709
  msgstr ""
710
 
711
- #: inc/classes/class-astra-sites.php:1138
712
  msgid "Nature/Landscapes"
713
  msgstr ""
714
 
715
- #: inc/classes/class-astra-sites.php:1139
716
  msgid "People"
717
  msgstr ""
718
 
719
- #: inc/classes/class-astra-sites.php:1140
720
  msgid "Places/Monuments"
721
  msgstr ""
722
 
723
- #: inc/classes/class-astra-sites.php:1141
724
  msgid "Religion"
725
  msgstr ""
726
 
727
- #: inc/classes/class-astra-sites.php:1142
728
  msgid "Science/Technology"
729
  msgstr ""
730
 
731
- #: inc/classes/class-astra-sites.php:1143
732
  msgid "Sports"
733
  msgstr ""
734
 
735
- #: inc/classes/class-astra-sites.php:1144
736
  msgid "Transportation/Traffic"
737
  msgstr ""
738
 
739
- #: inc/classes/class-astra-sites.php:1145
740
  msgid "Travel/Vacation"
741
  msgstr ""
742
 
743
- #: inc/classes/class-astra-sites.php:1148
744
  msgid "Popular"
745
  msgstr ""
746
 
747
- #: inc/classes/class-astra-sites.php:1149
748
  msgid "Latest"
749
  msgstr ""
750
 
751
- #: inc/classes/class-astra-sites.php:1150
752
  msgid "Upcoming"
753
  msgstr ""
754
 
755
- #: inc/classes/class-astra-sites.php:1151
756
  msgid "Editor's Choice"
757
  msgstr ""
758
 
759
- #: inc/classes/class-astra-sites.php:1154
760
  msgid "Any Orientation"
761
  msgstr ""
762
 
763
- #: inc/classes/class-astra-sites.php:1155
764
  msgid "Vertical"
765
  msgstr ""
766
 
767
- #: inc/classes/class-astra-sites.php:1156
768
  msgid "Horizontal"
769
  msgstr ""
770
 
771
- #: inc/classes/class-astra-sites.php:1158
772
  msgid "Free Images from Pixabay"
773
  msgstr ""
774
 
775
- #: inc/classes/class-astra-sites.php:1159
776
  msgid "Pixabay Search - Ex: flowers"
777
  msgstr ""
778
 
779
- #: inc/classes/class-astra-sites.php:1160
780
  msgid "Downloading..."
781
  msgstr ""
782
 
783
- #: inc/classes/class-astra-sites.php:1161
784
  msgid "Validating..."
785
  msgstr ""
786
 
787
- #: inc/classes/class-astra-sites.php:1162
788
  msgid "Please enter an API key."
789
  msgstr ""
790
 
791
- #: inc/classes/class-astra-sites.php:1163
792
  msgid "An error occured with code "
793
  msgstr ""
794
 
795
- #: inc/classes/class-astra-sites.php:1215
796
  msgid "Installed! Activating.."
797
  msgstr ""
798
 
799
- #: inc/classes/class-astra-sites.php:1216
800
  msgid "Activating..."
801
  msgstr ""
802
 
803
- #: inc/classes/class-astra-sites.php:1217
804
  msgid "Activated!"
805
  msgstr ""
806
 
807
- #: inc/classes/class-astra-sites.php:1218
808
  msgid "Installing..."
809
  msgstr ""
810
 
@@ -1064,21 +1072,21 @@ msgstr ""
1064
  msgid "Read More →"
1065
  msgstr ""
1066
 
1067
- #: inc/classes/class-astra-sites.php:1682
1068
  msgid "Error: You don't have the required permissions to install plugins."
1069
  msgstr ""
1070
 
1071
- #: inc/classes/class-astra-sites.php:1718
1072
  msgid "Plugin Activated"
1073
  msgstr ""
1074
 
1075
- #: inc/classes/class-astra-sites.php:1842
1076
  msgid ""
1077
  "Insufficient Permission. Please contact your Super Admin to allow the "
1078
  "install required plugin permissions."
1079
  msgstr ""
1080
 
1081
- #: inc/classes/class-astra-sites.php:2034
1082
  msgid "Template library refreshed!"
1083
  msgstr ""
1084
 
@@ -1793,13 +1801,13 @@ msgstr ""
1793
  msgid "https://www.brainstormforce.com"
1794
  msgstr ""
1795
 
1796
- #: inc/classes/class-astra-sites-importer-log.php:287
1797
  #. translators: %1$s Memory Limit, %2$s Recommended memory limit.
1798
  msgctxt "Recommended Memory Limit"
1799
  msgid "Current memory limit %1$s. We recommend setting memory to at least %2$s."
1800
  msgstr ""
1801
 
1802
- #: inc/classes/class-astra-sites-importer-log.php:368
1803
  msgctxt "PHP Version"
1804
  msgid "We recommend to use php 5.4 or higher"
1805
  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.6.11\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/astra-sites\n"
7
+ "POT-Creation-Date: 2021-06-03 12:00: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"
125
  msgstr ""
126
 
127
  #: inc/classes/batch-import/class-astra-sites-batch-site-import.php:260
128
+ #: inc/classes/class-astra-sites-page.php:438
129
  msgid "Preparing Site Import"
130
  msgstr ""
131
 
134
  msgstr ""
135
 
136
  #: inc/classes/batch-import/class-astra-sites-batch-site-import.php:320
137
+ #: inc/classes/class-astra-sites-page.php:441
138
  msgid "Installing Required Plugins"
139
  msgstr ""
140
 
141
  #: inc/classes/batch-import/class-astra-sites-batch-site-import.php:337
142
+ #: inc/classes/class-astra-sites-page.php:444
143
  msgid "Importing Contact Forms"
144
  msgstr ""
145
 
146
  #: inc/classes/batch-import/class-astra-sites-batch-site-import.php:350
147
+ #: inc/classes/class-astra-sites-page.php:447
148
  msgid "Setting up the Theme"
149
  msgstr ""
150
 
151
  #: inc/classes/batch-import/class-astra-sites-batch-site-import.php:360
152
+ #: inc/classes/class-astra-sites-page.php:450
153
  msgid "Importing Media, Posts, and Pages"
154
  msgstr ""
155
 
156
  #: inc/classes/batch-import/class-astra-sites-batch-site-import.php:371
157
+ #: inc/classes/class-astra-sites-page.php:453
158
  msgid "Importing Site Options"
159
  msgstr ""
160
 
161
  #: inc/classes/batch-import/class-astra-sites-batch-site-import.php:380
162
+ #: inc/classes/class-astra-sites-page.php:456
163
  msgid "Importing Sidebar and Widgets"
164
  msgstr ""
165
 
166
  #: inc/classes/batch-import/class-astra-sites-batch-site-import.php:400
167
+ #: inc/classes/class-astra-sites-page.php:459
168
  msgid "Import Complete"
169
  msgstr ""
170
 
195
  "wp-config.php file."
196
  msgstr ""
197
 
198
+ #: inc/classes/class-astra-sites-importer-log.php:269
199
  msgid "Enabled"
200
  msgstr ""
201
 
202
+ #: inc/classes/class-astra-sites-importer-log.php:272
203
  msgid "Disabled"
204
  msgstr ""
205
 
206
+ #: inc/classes/class-astra-sites-importer-log.php:357
207
+ #: inc/classes/class-astra-sites-importer-log.php:416
208
  msgid "Yes"
209
  msgstr ""
210
 
211
+ #: inc/classes/class-astra-sites-importer-log.php:360
212
+ #: inc/classes/class-astra-sites-importer-log.php:419
213
  msgid "No"
214
  msgstr ""
215
 
216
+ #: inc/classes/class-astra-sites-importer-log.php:434
217
  msgid "You currently have no scheduled cron events."
218
  msgstr ""
219
 
230
  #: inc/classes/class-astra-sites-importer.php:823
231
  #: inc/classes/class-astra-sites-importer.php:861
232
  #: inc/classes/class-astra-sites.php:329 inc/classes/class-astra-sites.php:544
233
+ #: inc/classes/class-astra-sites.php:648 inc/classes/class-astra-sites.php:720
234
+ #: inc/classes/class-astra-sites.php:911 inc/classes/class-astra-sites.php:930
235
  msgid "You are not allowed to perform this action"
236
  msgstr ""
237
 
262
  msgid "Widget data is empty!"
263
  msgstr ""
264
 
265
+ #: inc/classes/class-astra-sites-page.php:135
266
  #. translators: %1$s is the admin page URL, %2$s is product name.
267
  msgid ""
268
  "Thank you for choosing %1$s! Check the library of <a "
270
  "templates here »</a>"
271
  msgstr ""
272
 
273
+ #: inc/classes/class-astra-sites-page.php:322
274
  msgid "Required XMLReader PHP extension is missing on your server!"
275
  msgstr ""
276
 
277
+ #: inc/classes/class-astra-sites-page.php:324
278
  #. translators: %s is the white label name.
279
  msgid ""
280
  "%s import requires XMLReader extension to be installed. Please contact your "
282
  "extension."
283
  msgstr ""
284
 
285
+ #: inc/classes/class-astra-sites-page.php:386
286
  msgid "Settings saved successfully."
287
  msgstr ""
288
 
289
+ #: inc/classes/class-astra-sites-page.php:425
290
  msgid "Importing Starter Template..."
291
  msgstr ""
292
 
293
+ #: inc/classes/class-astra-sites-page.php:430
294
  msgid "The demo you are importing seems invalid. The site is not found."
295
  msgstr ""
296
 
297
+ #: inc/classes/class-astra-sites-page.php:432
298
  msgid "The demo you are importing is a premium demo."
299
  msgstr ""
300
 
301
+ #: inc/classes/class-astra-sites-page.php:432
302
  #: inc/classes/class-astra-sites.php:1301
303
  #: inc/classes/class-astra-sites.php:1551 inc/includes/templates.php:302
304
  msgid "Get Access!"
305
  msgstr ""
306
 
307
+ #: inc/classes/class-astra-sites-page.php:434
308
  msgid ""
309
  "The import process can take a few minutes depending on the size of the site "
310
  "and speed of the connection."
311
  msgstr ""
312
 
313
+ #: inc/classes/class-astra-sites-page.php:465
314
  msgid "Site Imported Successfully!"
315
  msgstr ""
316
 
317
+ #: inc/classes/class-astra-sites-page.php:466
318
  msgid "Visit Site"
319
  msgstr ""
320
 
321
+ #: inc/classes/class-astra-sites-page.php:515
322
  msgid "Getting Started"
323
  msgstr ""
324
 
325
+ #: inc/classes/class-astra-sites-page.php:521
326
  msgid "Select Page Builder"
327
  msgstr ""
328
 
329
+ #: inc/classes/class-astra-sites-page.php:522
330
  msgid ""
331
  "We offer starter templates that can be imported in one click. These sites "
332
  "are available in the following page builders. Please choose your preferred "
333
  "page builder from the list below."
334
  msgstr ""
335
 
336
+ #: inc/classes/class-astra-sites-page.php:582
337
  msgid "My Favorite"
338
  msgstr ""
339
 
340
+ #: inc/classes/class-astra-sites-page.php:587 inc/includes/templates.php:130
341
  msgid "Sync Library"
342
  msgstr ""
343
 
344
+ #: inc/classes/class-astra-sites-page.php:676
345
+ #: inc/classes/class-astra-sites-page.php:678
346
+ #: inc/classes/class-astra-sites-page.php:690
347
+ #: inc/classes/class-astra-sites.php:1124 inc/includes/templates.php:28
348
  #: inc/includes/templates.php:35
349
  msgid "All"
350
  msgstr ""
351
 
352
+ #: inc/classes/class-astra-sites-page.php:695 inc/includes/templates.php:29
353
  msgid "Free"
354
  msgstr ""
355
 
356
+ #: inc/classes/class-astra-sites-page.php:700 inc/includes/admin-page.php:244
357
  #: inc/includes/admin-page.php:333 inc/includes/admin-page.php:394
358
  #: inc/includes/templates.php:30 inc/includes/templates.php:181
359
  #: inc/includes/templates.php:308 inc/includes/templates.php:394
360
  msgid "Premium"
361
  msgstr ""
362
 
363
+ #: inc/classes/class-astra-sites-page.php:708 inc/includes/templates.php:44
364
  msgid "Search..."
365
  msgstr ""
366
 
367
+ #: inc/classes/class-astra-sites-page.php:782
368
  msgid "Gutenberg"
369
  msgstr ""
370
 
371
+ #: inc/classes/class-astra-sites-page.php:784
372
  msgid "The default WordPress editor"
373
  msgstr ""
374
 
375
+ #: inc/classes/class-astra-sites-page.php:788
376
  msgid "Elementor"
377
  msgstr ""
378
 
379
+ #: inc/classes/class-astra-sites-page.php:793
380
  msgid "Beaver Builder"
381
  msgstr ""
382
 
383
+ #: inc/classes/class-astra-sites-page.php:798
384
  msgid "Brizy"
385
  msgstr ""
386
 
387
+ #: inc/classes/class-astra-sites-page.php:896
388
  #. translators: 1: The number of years in an interval of time.
389
  msgid "%s year"
390
  msgid_plural "%s years"
391
  msgstr[0] ""
392
  msgstr[1] ""
393
 
394
+ #: inc/classes/class-astra-sites-page.php:898
395
  #. translators: 1: The number of months in an interval of time.
396
  msgid "%s month"
397
  msgid_plural "%s months"
398
  msgstr[0] ""
399
  msgstr[1] ""
400
 
401
+ #: inc/classes/class-astra-sites-page.php:900
402
  #. translators: 1: The number of weeks in an interval of time.
403
  msgid "%s week"
404
  msgid_plural "%s weeks"
405
  msgstr[0] ""
406
  msgstr[1] ""
407
 
408
+ #: inc/classes/class-astra-sites-page.php:902
409
  #. translators: 1: The number of days in an interval of time.
410
  msgid "%s day"
411
  msgid_plural "%s days"
412
  msgstr[0] ""
413
  msgstr[1] ""
414
 
415
+ #: inc/classes/class-astra-sites-page.php:904
416
  #. translators: 1: The number of hours in an interval of time.
417
  msgid "%s hour"
418
  msgid_plural "%s hours"
419
  msgstr[0] ""
420
  msgstr[1] ""
421
 
422
+ #: inc/classes/class-astra-sites-page.php:906
423
  #. translators: 1: The number of minutes in an interval of time.
424
  msgid "%s minute"
425
  msgid_plural "%s minutes"
426
  msgstr[0] ""
427
  msgstr[1] ""
428
 
429
+ #: inc/classes/class-astra-sites-page.php:908
430
  #. translators: 1: The number of seconds in an interval of time.
431
  msgid "%s second"
432
  msgid_plural "%s seconds"
433
  msgstr[0] ""
434
  msgstr[1] ""
435
 
436
+ #: inc/classes/class-astra-sites-page.php:912
437
  msgid "now"
438
  msgstr ""
439
 
440
+ #: inc/classes/class-astra-sites-page.php:966
441
  msgid ""
442
  "ERROR! Cron schedules are disabled by setting constant DISABLE_WP_CRON to "
443
  "true.<br/>To start the import process please enable the cron by setting the "
444
  "constant to false. E.g. define( 'DISABLE_WP_CRON', false );"
445
  msgstr ""
446
 
447
+ #: inc/classes/class-astra-sites-page.php:970
448
  msgid ""
449
  "ERROR! Cron schedules are disabled by setting constant ALTERNATE_WP_CRON to "
450
  "true.<br/>To start the import process please enable the cron by setting the "
451
  "constant to false. E.g. define( 'ALTERNATE_WP_CRON', false );"
452
  msgstr ""
453
 
454
+ #: inc/classes/class-astra-sites-page.php:1006
455
  #. translators: 1: The HTTP response code.
456
  msgid "Unexpected HTTP response code: %s"
457
  msgstr ""
648
  msgid "Client IP: %1$s </br> Error code: %2$s"
649
  msgstr ""
650
 
651
+ #: inc/classes/class-astra-sites.php:728
652
+ msgid "Need to send URL of the image to be downloaded"
653
+ msgstr ""
654
+
655
+ #: inc/classes/class-astra-sites.php:747
656
+ msgid "Could not download the image."
657
+ msgstr ""
658
+
659
+ #: inc/classes/class-astra-sites.php:938
660
  msgid "Theme Activated"
661
  msgstr ""
662
 
663
+ #: inc/classes/class-astra-sites.php:984
664
  msgid "User does not have permission!"
665
  msgstr ""
666
 
667
+ #: inc/classes/class-astra-sites.php:1061
668
  msgid "See Library"
669
  msgstr ""
670
 
671
+ #: inc/classes/class-astra-sites.php:1125
672
  msgid "Animals"
673
  msgstr ""
674
 
675
+ #: inc/classes/class-astra-sites.php:1126
676
  msgid "Architecture/Buildings"
677
  msgstr ""
678
 
679
+ #: inc/classes/class-astra-sites.php:1127
680
  msgid "Backgrounds/Textures"
681
  msgstr ""
682
 
683
+ #: inc/classes/class-astra-sites.php:1128
684
  msgid "Beauty/Fashion"
685
  msgstr ""
686
 
687
+ #: inc/classes/class-astra-sites.php:1129
688
  msgid "Business/Finance"
689
  msgstr ""
690
 
691
+ #: inc/classes/class-astra-sites.php:1130
692
  msgid "Computer/Communication"
693
  msgstr ""
694
 
695
+ #: inc/classes/class-astra-sites.php:1131
696
  msgid "Education"
697
  msgstr ""
698
 
699
+ #: inc/classes/class-astra-sites.php:1132
700
  msgid "Emotions"
701
  msgstr ""
702
 
703
+ #: inc/classes/class-astra-sites.php:1133
704
  msgid "Food/Drink"
705
  msgstr ""
706
 
707
+ #: inc/classes/class-astra-sites.php:1134
708
  msgid "Health/Medical"
709
  msgstr ""
710
 
711
+ #: inc/classes/class-astra-sites.php:1135
712
  msgid "Industry/Craft"
713
  msgstr ""
714
 
715
+ #: inc/classes/class-astra-sites.php:1136
716
  msgid "Music"
717
  msgstr ""
718
 
719
+ #: inc/classes/class-astra-sites.php:1137
720
  msgid "Nature/Landscapes"
721
  msgstr ""
722
 
723
+ #: inc/classes/class-astra-sites.php:1138
724
  msgid "People"
725
  msgstr ""
726
 
727
+ #: inc/classes/class-astra-sites.php:1139
728
  msgid "Places/Monuments"
729
  msgstr ""
730
 
731
+ #: inc/classes/class-astra-sites.php:1140
732
  msgid "Religion"
733
  msgstr ""
734
 
735
+ #: inc/classes/class-astra-sites.php:1141
736
  msgid "Science/Technology"
737
  msgstr ""
738
 
739
+ #: inc/classes/class-astra-sites.php:1142
740
  msgid "Sports"
741
  msgstr ""
742
 
743
+ #: inc/classes/class-astra-sites.php:1143
744
  msgid "Transportation/Traffic"
745
  msgstr ""
746
 
747
+ #: inc/classes/class-astra-sites.php:1144
748
  msgid "Travel/Vacation"
749
  msgstr ""
750
 
751
+ #: inc/classes/class-astra-sites.php:1147
752
  msgid "Popular"
753
  msgstr ""
754
 
755
+ #: inc/classes/class-astra-sites.php:1148
756
  msgid "Latest"
757
  msgstr ""
758
 
759
+ #: inc/classes/class-astra-sites.php:1149
760
  msgid "Upcoming"
761
  msgstr ""
762
 
763
+ #: inc/classes/class-astra-sites.php:1150
764
  msgid "Editor's Choice"
765
  msgstr ""
766
 
767
+ #: inc/classes/class-astra-sites.php:1153
768
  msgid "Any Orientation"
769
  msgstr ""
770
 
771
+ #: inc/classes/class-astra-sites.php:1154
772
  msgid "Vertical"
773
  msgstr ""
774
 
775
+ #: inc/classes/class-astra-sites.php:1155
776
  msgid "Horizontal"
777
  msgstr ""
778
 
779
+ #: inc/classes/class-astra-sites.php:1157
780
  msgid "Free Images from Pixabay"
781
  msgstr ""
782
 
783
+ #: inc/classes/class-astra-sites.php:1158
784
  msgid "Pixabay Search - Ex: flowers"
785
  msgstr ""
786
 
787
+ #: inc/classes/class-astra-sites.php:1159
788
  msgid "Downloading..."
789
  msgstr ""
790
 
791
+ #: inc/classes/class-astra-sites.php:1160
792
  msgid "Validating..."
793
  msgstr ""
794
 
795
+ #: inc/classes/class-astra-sites.php:1161
796
  msgid "Please enter an API key."
797
  msgstr ""
798
 
799
+ #: inc/classes/class-astra-sites.php:1162
800
  msgid "An error occured with code "
801
  msgstr ""
802
 
803
+ #: inc/classes/class-astra-sites.php:1214
804
  msgid "Installed! Activating.."
805
  msgstr ""
806
 
807
+ #: inc/classes/class-astra-sites.php:1215
808
  msgid "Activating..."
809
  msgstr ""
810
 
811
+ #: inc/classes/class-astra-sites.php:1216
812
  msgid "Activated!"
813
  msgstr ""
814
 
815
+ #: inc/classes/class-astra-sites.php:1217
816
  msgid "Installing..."
817
  msgstr ""
818
 
1072
  msgid "Read More →"
1073
  msgstr ""
1074
 
1075
+ #: inc/classes/class-astra-sites.php:1681
1076
  msgid "Error: You don't have the required permissions to install plugins."
1077
  msgstr ""
1078
 
1079
+ #: inc/classes/class-astra-sites.php:1717
1080
  msgid "Plugin Activated"
1081
  msgstr ""
1082
 
1083
+ #: inc/classes/class-astra-sites.php:1843
1084
  msgid ""
1085
  "Insufficient Permission. Please contact your Super Admin to allow the "
1086
  "install required plugin permissions."
1087
  msgstr ""
1088
 
1089
+ #: inc/classes/class-astra-sites.php:2035
1090
  msgid "Template library refreshed!"
1091
  msgstr ""
1092
 
1801
  msgid "https://www.brainstormforce.com"
1802
  msgstr ""
1803
 
1804
+ #: inc/classes/class-astra-sites-importer-log.php:290
1805
  #. translators: %1$s Memory Limit, %2$s Recommended memory limit.
1806
  msgctxt "Recommended Memory Limit"
1807
  msgid "Current memory limit %1$s. We recommend setting memory to at least %2$s."
1808
  msgstr ""
1809
 
1810
+ #: inc/classes/class-astra-sites-importer-log.php:371
1811
  msgctxt "PHP Version"
1812
  msgid "We recommend to use php 5.4 or higher"
1813
  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.7
8
- Stable tag: 2.6.10
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -149,6 +149,12 @@ We are open to suggestions and would love to work on topics that our users are l
149
 
150
  == Changelog ==
151
 
 
 
 
 
 
 
152
  v2.6.10 - 24-May-2021
153
  - Fix: Starter Templates popup opens by default on every page load on Gutenberg pages.
154
 
5
  Requires at least: 4.4
6
  Requires PHP: 5.3
7
  Tested up to: 5.7
8
+ Stable tag: 2.6.11
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
149
 
150
  == Changelog ==
151
 
152
+ v2.6.11 - 3-June-2021
153
+ - Improvement: Gutenberg Template library auto-syncs at regular intervals.
154
+ - Improvement: Updated image download functionality.
155
+ - Improvement: Added common functionality for extracting URLs from content.
156
+ - Improvement: Added filter for debug logs generation.
157
+
158
  v2.6.10 - 24-May-2021
159
  - Fix: Starter Templates popup opens by default on every page load on Gutenberg pages.
160