Astra Starter Sites - Version 1.0.12

Version Description

Download this release

Release Info

Developer Nikschavan
Plugin Icon Astra Starter Sites
Version 1.0.12
Comparing to
See all releases

Code changes from version 1.0.11 to 1.0.12

astra-sites.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Astra Sites - Lite
4
  * Plugin URI: http://www.wpastra.com/pro/
5
  * Description: Import free sites build with Astra theme.
6
- * Version: 1.0.11
7
  * Author: Brainstorm Force
8
  * Author URI: http://www.brainstormforce.com
9
  * Text Domain: astra-sites
@@ -14,8 +14,12 @@
14
  /**
15
  * Set constants.
16
  */
 
 
 
 
17
  if ( ! defined( 'ASTRA_SITES_VER' ) ) {
18
- define( 'ASTRA_SITES_VER', '1.0.11' );
19
  }
20
 
21
  if ( ! defined( 'ASTRA_SITES_FILE' ) ) {
3
  * Plugin Name: Astra Sites - Lite
4
  * Plugin URI: http://www.wpastra.com/pro/
5
  * Description: Import free sites build with Astra theme.
6
+ * Version: 1.0.12
7
  * Author: Brainstorm Force
8
  * Author URI: http://www.brainstormforce.com
9
  * Text Domain: astra-sites
14
  /**
15
  * Set constants.
16
  */
17
+ if ( ! defined( 'ASTRA_SITES_NAME' ) ) {
18
+ define( 'ASTRA_SITES_NAME', __( 'Astra Sites', 'astra-sites' ) );
19
+ }
20
+
21
  if ( ! defined( 'ASTRA_SITES_VER' ) ) {
22
+ define( 'ASTRA_SITES_VER', '1.0.12' );
23
  }
24
 
25
  if ( ! defined( 'ASTRA_SITES_FILE' ) ) {
inc/admin/class-astra-sites-page.php CHANGED
@@ -31,7 +31,7 @@ if ( ! class_exists( 'Astra_Sites_Page' ) ) {
31
  * @since 1.0.6
32
  * @var array $menu_page_title
33
  */
34
- static public $menu_page_title = 'Astra Sites - Lite';
35
 
36
  /**
37
  * Plugin slug
31
  * @since 1.0.6
32
  * @var array $menu_page_title
33
  */
34
+ static public $menu_page_title = ASTRA_SITES_NAME;
35
 
36
  /**
37
  * Plugin slug
inc/admin/view-astra-sites.php CHANGED
@@ -18,18 +18,26 @@ defined( 'ABSPATH' ) or exit;
18
 
19
  <div class="wp-filter hide-if-no-js">
20
 
21
- <div class="left-section">
22
 
23
  <div class="filter-count">
24
  <span class="count"></span>
25
  </div>
26
 
27
  <ul class="filter-links astra-page-builder">
28
- <?php foreach ( Astra_Sites::get_page_builders() as $key => $category ) { ?>
 
 
 
 
 
 
 
29
  <li>
30
  <a href="#"
31
  data-sort="<?php echo esc_attr( $category['slug'] ); ?>"
32
- data-id="<?php echo esc_attr( $category['id'] ); ?>">
 
33
  <?php echo esc_attr( $category['name'] ); ?>
34
  </a>
35
  </li>
@@ -37,7 +45,7 @@ defined( 'ABSPATH' ) or exit;
37
  </ul>
38
  </div>
39
 
40
- <div class="right-section">
41
  <ul class="filter-links astra-category">
42
 
43
  <li><a href="#" data-sort="all" class="current" data-id="all"><?php esc_html_e( 'All', 'astra-sites' ); ?></a></li>
18
 
19
  <div class="wp-filter hide-if-no-js">
20
 
21
+ <div class="section-left">
22
 
23
  <div class="filter-count">
24
  <span class="count"></span>
25
  </div>
26
 
27
  <ul class="filter-links astra-page-builder">
28
+ <?php
29
+ foreach ( Astra_Sites::get_page_builders() as $key => $category ) {
30
+ $current = '';
31
+
32
+ if ( 0 === $key ) {
33
+ $current = 'current';
34
+ }
35
+ ?>
36
  <li>
37
  <a href="#"
38
  data-sort="<?php echo esc_attr( $category['slug'] ); ?>"
39
+ data-id="<?php echo esc_attr( $category['id'] ); ?>"
40
+ class="<?php echo esc_attr( $current ); ?>">
41
  <?php echo esc_attr( $category['name'] ); ?>
42
  </a>
43
  </li>
45
  </ul>
46
  </div>
47
 
48
+ <div class="section-right">
49
  <ul class="filter-links astra-category">
50
 
51
  <li><a href="#" data-sort="all" class="current" data-id="all"><?php esc_html_e( 'All', 'astra-sites' ); ?></a></li>
inc/assets/css/admin.css CHANGED
@@ -203,10 +203,10 @@
203
  font-size: 13px;
204
  padding: 5px 10px;
205
  }
206
- .left-section {
207
  display: inline-block;
208
  }
209
- .right-section {
210
  float: right;
211
  }
212
  .filter-count {
203
  font-size: 13px;
204
  padding: 5px 10px;
205
  }
206
+ .section-left {
207
  display: inline-block;
208
  }
209
+ .section-right {
210
  float: right;
211
  }
212
  .filter-count {
inc/assets/js/admin.js CHANGED
@@ -643,7 +643,7 @@ var AstraSitesAjaxQueue = (function() {
643
  *
644
  * On click on image, more link & preview button.
645
  */
646
- _preview: function() {
647
 
648
  event.preventDefault();
649
 
@@ -767,6 +767,11 @@ var AstraSitesAjaxQueue = (function() {
767
 
768
  _initial_load_demos: function() {
769
 
 
 
 
 
 
770
  jQuery('body').addClass('loading-content');
771
 
772
  jQuery.ajax({
@@ -774,8 +779,10 @@ var AstraSitesAjaxQueue = (function() {
774
  type: 'POST',
775
  dataType: 'json',
776
  data: {
777
- action : 'astra-list-sites',
778
- paged : '1',
 
 
779
  },
780
  })
781
  .done(function (demos) {
643
  *
644
  * On click on image, more link & preview button.
645
  */
646
+ _preview: function( event ) {
647
 
648
  event.preventDefault();
649
 
767
 
768
  _initial_load_demos: function() {
769
 
770
+ var astra_page_builder = jQuery('.filter-links.astra-page-builder'),
771
+ astra_category = jQuery('.filter-links.astra-category'),
772
+ page_builder_id = astra_page_builder.find('.current').data('id'),
773
+ category_id = astra_category.find('.current').data('id');
774
+
775
  jQuery('body').addClass('loading-content');
776
 
777
  jQuery.ajax({
779
  type: 'POST',
780
  dataType: 'json',
781
  data: {
782
+ action : 'astra-list-sites',
783
+ paged : '1',
784
+ page_builder_id : page_builder_id,
785
+ category_id : category_id,
786
  },
787
  })
788
  .done(function (demos) {
inc/classes/class-astra-sites-white-label.php ADDED
@@ -0,0 +1,208 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Astra Sites White Label
4
+ *
5
+ * @package Astra Sites
6
+ * @since 1.0.12
7
+ */
8
+
9
+ if ( ! class_exists( 'Astra_Sites_White_Label' ) ) :
10
+
11
+ /**
12
+ * Astra_Sites_White_Label
13
+ *
14
+ * @since 1.0.12
15
+ */
16
+ class Astra_Sites_White_Label {
17
+
18
+ /**
19
+ * Instance
20
+ *
21
+ * @since 1.0.12
22
+ *
23
+ * @var object Class Object.
24
+ * @access private
25
+ */
26
+ private static $instance;
27
+
28
+ /**
29
+ * Member Variable
30
+ *
31
+ * @since 1.0.12
32
+ *
33
+ * @var array branding
34
+ * @access private
35
+ */
36
+ private static $branding;
37
+
38
+ /**
39
+ * Initiator
40
+ *
41
+ * @since 1.0.12
42
+ *
43
+ * @return object initialized object of class.
44
+ */
45
+ public static function set_instance() {
46
+ if ( ! isset( self::$instance ) ) {
47
+ self::$instance = new self;
48
+ }
49
+ return self::$instance;
50
+ }
51
+
52
+ /**
53
+ * Constructor
54
+ *
55
+ * @since 1.0.12
56
+ */
57
+ public function __construct() {
58
+
59
+ add_filter( 'all_plugins' , array( $this, 'plugins_page' ) );
60
+ add_filter( 'astra_addon_branding_options' , __CLASS__ . '::settings' );
61
+ add_action( 'astra_pro_white_label_add_form' , __CLASS__ . '::add_white_lavel_form' );
62
+ add_filter( 'astra_sites_menu_page_title' , array( $this, 'page_title' ) );
63
+
64
+ // Display the link with the plugin meta.
65
+ if ( is_admin() ) {
66
+ add_filter( 'plugin_row_meta', array( $this, 'plugin_links' ), 10, 4 );
67
+ }
68
+ }
69
+
70
+ /**
71
+ * White labels the plugins page.
72
+ *
73
+ * @since 1.0.12
74
+ *
75
+ * @param array $plugins Plugins Array.
76
+ * @return array
77
+ */
78
+ function plugins_page( $plugins ) {
79
+
80
+ if ( ! is_callable( 'Astra_Ext_White_Label_Markup::get_white_label' ) ) {
81
+ return $plugins;
82
+ }
83
+
84
+ if ( ! isset( $plugins[ ASTRA_SITES_BASE ] ) ) {
85
+ return $plugins;
86
+ }
87
+
88
+ // Set White Labels.
89
+ $name = Astra_Ext_White_Label_Markup::get_white_label( 'astra-sites', 'name' );
90
+ $description = Astra_Ext_White_Label_Markup::get_white_label( 'astra-sites', 'description' );
91
+ $author = Astra_Ext_White_Label_Markup::get_white_label( 'astra-agency', 'author' );
92
+ $author_uri = Astra_Ext_White_Label_Markup::get_white_label( 'astra-agency', 'author_url' );
93
+
94
+ if ( ! empty( $name ) ) {
95
+ $plugins[ ASTRA_SITES_BASE ]['Name'] = $name;
96
+
97
+ // Remove Plugin URI if Agency White Label name is set.
98
+ $plugins[ ASTRA_SITES_BASE ]['PluginURI'] = '';
99
+ }
100
+
101
+ if ( ! empty( $description ) ) {
102
+ $plugins[ ASTRA_SITES_BASE ]['Description'] = $description;
103
+ }
104
+
105
+ if ( ! empty( $author ) ) {
106
+ $plugins[ ASTRA_SITES_BASE ]['Author'] = $author;
107
+ }
108
+
109
+ if ( ! empty( $author_uri ) ) {
110
+ $plugins[ ASTRA_SITES_BASE ]['AuthorURI'] = $author_uri;
111
+ }
112
+
113
+ return $plugins;
114
+ }
115
+
116
+ /**
117
+ * Remove a "view details" link from the plugin list table
118
+ *
119
+ * @since 1.0.12
120
+ *
121
+ * @param array $plugin_meta List of links.
122
+ * @param string $plugin_file Relative path to the main plugin file from the plugins directory.
123
+ * @param array $plugin_data Data from the plugin headers.
124
+ * @return array
125
+ */
126
+ public function plugin_links( $plugin_meta, $plugin_file, $plugin_data ) {
127
+
128
+ if ( ! is_callable( 'Astra_Ext_White_Label_Markup::get_white_label' ) ) {
129
+ return $plugin_meta;
130
+ }
131
+
132
+ // Set White Labels.
133
+ if ( ASTRA_SITES_BASE == $plugin_file ) {
134
+
135
+ $name = Astra_Ext_White_Label_Markup::get_white_label( 'astra-sites', 'name' );
136
+ $description = Astra_Ext_White_Label_Markup::get_white_label( 'astra-sites', 'description' );
137
+
138
+ // Remove Plugin URI if Agency White Label name is set.
139
+ if ( ! empty( $name ) ) {
140
+ unset( $plugin_meta[2] );
141
+ }
142
+ }
143
+
144
+ return $plugin_meta;
145
+ }
146
+
147
+ /**
148
+ * Add White Label setting's
149
+ *
150
+ * @since 1.0.12
151
+ *
152
+ * @param array $settings White label setting.
153
+ * @return array
154
+ */
155
+ public static function settings( $settings = array() ) {
156
+
157
+ $settings['astra-sites'] = array(
158
+ 'name' => '',
159
+ 'description' => '',
160
+ );
161
+
162
+ return $settings;
163
+ }
164
+
165
+ /**
166
+ * Add White Label form
167
+ *
168
+ * @since 1.0.12
169
+ *
170
+ * @param array $settings White label setting.
171
+ * @return void
172
+ */
173
+ public static function add_white_lavel_form( $settings = array() ) {
174
+
175
+ /* translators: %1$s product name */
176
+ $plugin_name = sprintf( __( '%1$s Branding', 'astra-sites' ), ASTRA_SITES_NAME );
177
+
178
+ require_once ASTRA_SITES_DIR . 'inc/includes/white-label.php';
179
+ }
180
+
181
+ /**
182
+ * Page Title
183
+ *
184
+ * @since 1.0.12
185
+ *
186
+ * @param string $title Page Title.
187
+ * @return string Filtered Page Title.
188
+ */
189
+ function page_title( $title ) {
190
+ $get_white_labels = 'Astra_Ext_White_Label_Markup::get_white_labels';
191
+ if ( is_callable( $get_white_labels ) ) {
192
+ $astra_sites_name = Astra_Ext_White_Label_Markup::get_white_label( 'astra-sites', 'name' );
193
+ if ( ! empty( $astra_sites_name ) ) {
194
+ $title = Astra_Ext_White_Label_Markup::get_white_label( 'astra-sites', 'name' );
195
+ }
196
+ }
197
+
198
+ return $title;
199
+ }
200
+
201
+ }
202
+
203
+ /**
204
+ * Kicking this off by calling 'set_instance()' method
205
+ */
206
+ Astra_Sites_White_Label::set_instance();
207
+
208
+ endif;
inc/classes/class-astra-sites.php CHANGED
@@ -80,7 +80,7 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
80
  'type' => 'error',
81
  'show_if' => ( ! defined( 'ASTRA_THEME_SETTINGS' ) ) ? true : false,
82
  /* translators: 1: theme.php file*/
83
- 'message' => sprintf( __( 'Astra Theme needs to be active for you to use currently installed "Astra Sites" plugin. <a href="%1$s">Install & Activate Now</a>', 'astra-sites' ), esc_url( admin_url( 'themes.php?theme=astra' ) ) ),
84
  'dismissible' => true,
85
  'dismissible-time' => MINUTE_IN_SECONDS,
86
  )
@@ -288,6 +288,8 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
288
  require_once ASTRA_SITES_DIR . 'inc/importers/class-astra-customizer-import.php';
289
  require_once ASTRA_SITES_DIR . 'inc/importers/wxr-importer/class-astra-wxr-importer.php';
290
  require_once ASTRA_SITES_DIR . 'inc/importers/class-astra-site-options-import.php';
 
 
291
  }
292
 
293
  /**
@@ -422,17 +424,19 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
422
  public static function pro_plugin_exist( $lite_version = '' ) {
423
 
424
  // Lite init => Pro init.
425
- $plugins = array(
426
- 'beaver-builder-lite-version/fl-builder.php' => array(
427
- 'slug' => 'bb-plugin',
428
- 'init' => 'bb-plugin/fl-builder.php',
429
- 'name' => 'Beaver Builder Plugin (Agency Version)',
430
- ),
431
- 'ultimate-addons-for-beaver-builder-lite/bb-ultimate-addon.php' => array(
432
- 'slug' => 'bb-ultimate-addon',
433
- 'init' => 'bb-ultimate-addon/bb-ultimate-addon.php',
434
- 'name' => 'Ultimate Addon for Beaver Builder',
435
- ),
 
 
436
  );
437
 
438
  if ( isset( $plugins[ $lite_version ] ) ) {
@@ -484,11 +488,11 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
484
  return;
485
  }
486
 
487
- $paged = isset( $_POST['paged'] ) ? esc_attr( $_POST['paged'] ) : '1';
488
- $args = new stdClass();
489
- $args->search = isset( $_POST['search'] ) ? esc_attr( $_POST['search'] ) : '';
490
- $args->page_builder_id = isset( $_POST['page_builder_id'] ) ? esc_attr( $_POST['page_builder_id'] ) : '';
491
- $args->category_id = isset( $_POST['category_id'] ) ? esc_attr( $_POST['category_id'] ) : '';
492
 
493
  return wp_send_json( self::get_astra_demos( $args, $paged ) );
494
  }
80
  'type' => 'error',
81
  'show_if' => ( ! defined( 'ASTRA_THEME_SETTINGS' ) ) ? true : false,
82
  /* translators: 1: theme.php file*/
83
+ 'message' => sprintf( __( 'Astra Theme needs to be active for you to use currently installed "%1$s" plugin. <a href="%2$s">Install & Activate Now</a>', 'astra-sites' ), ASTRA_SITES_NAME, esc_url( admin_url( 'themes.php?theme=astra' ) ) ),
84
  'dismissible' => true,
85
  'dismissible-time' => MINUTE_IN_SECONDS,
86
  )
288
  require_once ASTRA_SITES_DIR . 'inc/importers/class-astra-customizer-import.php';
289
  require_once ASTRA_SITES_DIR . 'inc/importers/wxr-importer/class-astra-wxr-importer.php';
290
  require_once ASTRA_SITES_DIR . 'inc/importers/class-astra-site-options-import.php';
291
+
292
+ require_once ASTRA_SITES_DIR . 'inc/classes/class-astra-sites-white-label.php';
293
  }
294
 
295
  /**
424
  public static function pro_plugin_exist( $lite_version = '' ) {
425
 
426
  // Lite init => Pro init.
427
+ $plugins = apply_filters(
428
+ 'astra_sites_pro_plugin_exist', array(
429
+ 'beaver-builder-lite-version/fl-builder.php' => array(
430
+ 'slug' => 'bb-plugin',
431
+ 'init' => 'bb-plugin/fl-builder.php',
432
+ 'name' => 'Beaver Builder Plugin (Agency Version)',
433
+ ),
434
+ 'ultimate-addons-for-beaver-builder-lite/bb-ultimate-addon.php' => array(
435
+ 'slug' => 'bb-ultimate-addon',
436
+ 'init' => 'bb-ultimate-addon/bb-ultimate-addon.php',
437
+ 'name' => 'Ultimate Addon for Beaver Builder',
438
+ ),
439
+ ), $lite_version
440
  );
441
 
442
  if ( isset( $plugins[ $lite_version ] ) ) {
488
  return;
489
  }
490
 
491
+ $paged = isset( $_POST['paged'] ) ? esc_attr( $_POST['paged'] ) : '1';
492
+ $args = new stdClass();
493
+ $args->search = isset( $_POST['search'] ) ? esc_attr( $_POST['search'] ) : '';
494
+ $args->page_builder_id = isset( $_POST['page_builder_id'] ) ? esc_attr( $_POST['page_builder_id'] ) : '';
495
+ $args->category_id = isset( $_POST['category_id'] ) ? esc_attr( $_POST['category_id'] ) : '';
496
 
497
  return wp_send_json( self::get_astra_demos( $args, $paged ) );
498
  }
inc/classes/compatibility/class-astra-sites-compatibility-astra-pro.php ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Astra Sites Compatibility for 'Astra Pro'
4
+ *
5
+ * @see https://wordpress.org/plugins/astra-pro/
6
+ *
7
+ * @package Astra Sites
8
+ * @since 1.0.0
9
+ */
10
+
11
+ if ( ! class_exists( 'Astra_Sites_Compatibility_Astra_Pro' ) ) :
12
+
13
+ /**
14
+ * Astra_Sites_Compatibility_Astra_Pro
15
+ *
16
+ * @since 1.0.0
17
+ */
18
+ class Astra_Sites_Compatibility_Astra_Pro {
19
+
20
+ /**
21
+ * Instance
22
+ *
23
+ * @access private
24
+ * @var object Class object.
25
+ * @since 1.0.0
26
+ */
27
+ private static $instance;
28
+
29
+ /**
30
+ * Initiator
31
+ *
32
+ * @since 1.0.0
33
+ * @return object initialized object of class.
34
+ */
35
+ public static function instance() {
36
+ if ( ! isset( self::$instance ) ) {
37
+ self::$instance = new self;
38
+ }
39
+ return self::$instance;
40
+ }
41
+
42
+ /**
43
+ * Constructor
44
+ *
45
+ * @since 1.0.0
46
+ */
47
+ public function __construct() {
48
+ add_action( 'astra_sites_after_plugin_activation', array( $this, 'astra_pro' ), 10, 2 );
49
+ }
50
+
51
+ /**
52
+ * Update Site Origin Active Widgets
53
+ *
54
+ * @since 1.0.0
55
+ *
56
+ * @param string $plugin_init Plugin init file.
57
+ * @param array $data Data.
58
+ * @return void
59
+ */
60
+ function astra_pro( $plugin_init = '', $data = array() ) {
61
+
62
+ if ( 'astra-addon/astra-addon.php' === $plugin_init ) {
63
+
64
+ $data = json_decode( json_encode( $data ), true );
65
+
66
+ if ( isset( $data['enabled_extensions'] ) ) {
67
+ $extensions = $data['enabled_extensions'];
68
+
69
+ if ( ! empty( $extensions ) ) {
70
+ if ( is_callable( 'Astra_Admin_Helper::update_admin_settings_option' ) ) {
71
+ Astra_Admin_Helper::update_admin_settings_option( '_astra_ext_enabled_extensions', $extensions );
72
+ }
73
+ }
74
+ }
75
+ }
76
+
77
+ }
78
+
79
+ }
80
+
81
+ /**
82
+ * Kicking this off by calling 'instance()' method
83
+ */
84
+ Astra_Sites_Compatibility_Astra_Pro::instance();
85
+
86
+ endif;
inc/classes/compatibility/class-astra-sites-compatibility-so-widgets.php ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Astra Sites Compatibility for 'SiteOrigin Widgets Bundle'
4
+ *
5
+ * @see https://wordpress.org/plugins/so-widgets-bundle/
6
+ *
7
+ * @package Astra Sites
8
+ * @since 1.0.0
9
+ */
10
+
11
+ if ( ! class_exists( 'Astra_Sites_Compatibility_SO_Widgets' ) ) :
12
+
13
+ /**
14
+ * Astra_Sites_Compatibility_SO_Widgets
15
+ *
16
+ * @since 1.0.0
17
+ */
18
+ class Astra_Sites_Compatibility_SO_Widgets {
19
+
20
+ /**
21
+ * Instance
22
+ *
23
+ * @access private
24
+ * @var object Class object.
25
+ * @since 1.0.0
26
+ */
27
+ private static $instance;
28
+
29
+ /**
30
+ * Initiator
31
+ *
32
+ * @since 1.0.0
33
+ * @return object initialized object of class.
34
+ */
35
+ public static function instance() {
36
+ if ( ! isset( self::$instance ) ) {
37
+ self::$instance = new self;
38
+ }
39
+ return self::$instance;
40
+ }
41
+
42
+ /**
43
+ * Constructor
44
+ *
45
+ * @since 1.0.0
46
+ */
47
+ public function __construct() {
48
+ add_action( 'astra_sites_after_plugin_activation', array( $this, 'site_origin' ), 10, 2 );
49
+ }
50
+
51
+ /**
52
+ * Update Site Origin Active Widgets
53
+ *
54
+ * @since 1.0.0
55
+ *
56
+ * @param string $plugin_init Plugin init file.
57
+ * @param array $data Data.
58
+ * @return void
59
+ */
60
+ function site_origin( $plugin_init = '', $data = array() ) {
61
+
62
+ if ( 'so-widgets-bundle/so-widgets-bundle.php' === $plugin_init ) {
63
+
64
+ $data = json_decode( json_encode( $data ), true );
65
+
66
+ if ( isset( $data['astra_site_options'] ) ) {
67
+
68
+ $widgets = ( isset( $data['astra_site_options']['siteorigin_widgets_active'] ) ) ? $data['astra_site_options']['siteorigin_widgets_active'] : '';
69
+
70
+ if ( ! empty( $widgets ) ) {
71
+ update_option( 'siteorigin_widgets_active', $widgets );
72
+ wp_cache_delete( 'active_widgets', 'siteorigin_widgets' );
73
+ }
74
+ }
75
+ }
76
+
77
+ }
78
+
79
+ }
80
+
81
+ /**
82
+ * Kicking this off by calling 'instance()' method
83
+ */
84
+ Astra_Sites_Compatibility_SO_Widgets::instance();
85
+
86
+ endif;
inc/includes/white-label.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * White Label Form
4
+ *
5
+ * @package Astra Sites
6
+ */
7
+
8
+ ?>
9
+ <li>
10
+ <div class="branding-form postbox">
11
+ <button type="button" class="handlediv button-link" aria-expanded="true">
12
+ <span class="screen-reader-text"><?php echo esc_html( $plugin_name ); ?></span>
13
+ <span class="toggle-indicator" aria-hidden="true"></span>
14
+ </button>
15
+
16
+ <h2 class="hndle ui-sortable-handle">
17
+ <span><?php echo esc_html( $plugin_name ); ?></span>
18
+ </h2>
19
+
20
+ <div class="inside">
21
+ <div class="form-wrap">
22
+ <div class="form-field">
23
+ <label><?php _e( 'Plugin Name:', 'astra-sites' ); ?>
24
+ <input type="text" name="ast_white_label[astra-sites][name]" class="placeholder placeholder-active" value="<?php echo esc_attr( $settings['astra-sites']['name'] ); ?>">
25
+ </label>
26
+ </div>
27
+ <div class="form-field">
28
+ <label><?php _e( 'Plugin Description:', 'astra-sites' ); ?>
29
+ <textarea name="ast_white_label[astra-sites][description]" class="placeholder placeholder-active" rows="2"><?php echo esc_attr( $settings['astra-sites']['description'] ); ?></textarea>
30
+ </label>
31
+ </div>
32
+ <div class="clear"></div>
33
+ </div>
34
+ </div>
35
+ </div>
36
+ </li>
languages/astra-sites.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the Astra Sites - Lite package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Astra Sites - Lite 1.0.11\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/astra-sites\n"
7
- "POT-Creation-Date: 2017-09-20 12:32:51+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -24,7 +24,7 @@ msgstr ""
24
  "X-Textdomain-Support: yes\n"
25
  "X-Generator: grunt-wp-i18n1.0.0\n"
26
 
27
- #: inc/admin/class-astra-sites-page.php:85
28
  msgid "Astra Sites"
29
  msgstr ""
30
 
@@ -32,75 +32,75 @@ msgstr ""
32
  msgid "Settings saved successfully."
33
  msgstr ""
34
 
35
- #: inc/admin/view-astra-sites.php:43
36
  msgid "All"
37
  msgstr ""
38
 
39
- #: inc/admin/view-astra-sites.php:57
40
  msgid "Search Sites"
41
  msgstr ""
42
 
43
- #: inc/admin/view-astra-sites.php:58
44
  msgid "Search Sites..."
45
  msgstr ""
46
 
47
- #: inc/admin/view-astra-sites.php:108
48
  msgid "Details &amp; Preview"
49
  msgstr ""
50
 
51
- #: inc/admin/view-astra-sites.php:114 inc/admin/view-astra-sites.php:183
52
  msgid "Preview"
53
  msgstr ""
54
 
55
- #: inc/admin/view-astra-sites.php:141
56
  msgid "Close"
57
  msgstr ""
58
 
59
- #: inc/admin/view-astra-sites.php:142
60
  msgid "Previous"
61
  msgstr ""
62
 
63
- #: inc/admin/view-astra-sites.php:143
64
  msgid "Next"
65
  msgstr ""
66
 
67
- #: inc/admin/view-astra-sites.php:144 inc/admin/view-astra-sites.php:172
68
  msgid "Install Plugins"
69
  msgstr ""
70
 
71
- #: inc/admin/view-astra-sites.php:160 inc/classes/class-astra-sites.php:260
72
  msgid "Read more"
73
  msgstr ""
74
 
75
- #: inc/admin/view-astra-sites.php:163
76
  msgid "Required Plugins"
77
  msgstr ""
78
 
79
- #: inc/admin/view-astra-sites.php:178
80
  msgid "Collapse"
81
  msgstr ""
82
 
83
- #: inc/admin/view-astra-sites.php:193
84
  #. translators: %1$s & %2$s are a Demo API URL
85
  msgid ""
86
  "<p> It seems the demo data server, <i><a href=\"%1$s\">%2$s</a></i> is "
87
  "unreachable from your site.</p>"
88
  msgstr ""
89
 
90
- #: inc/admin/view-astra-sites.php:195
91
  msgid ""
92
  "<p class=\"left-margin\"> 1. Sometimes, simple page reload fixes any "
93
  "temporary issues. No kidding!</p>"
94
  msgstr ""
95
 
96
- #: inc/admin/view-astra-sites.php:197
97
  msgid ""
98
  "<p class=\"left-margin\"> 2. If that does not work, you will need to talk "
99
  "to your server administrator and check if demo server is being blocked by "
100
  "the firewall!</p>"
101
  msgstr ""
102
 
103
- #: inc/admin/view-astra-sites.php:200
104
  #. translators: %1$s is a support link
105
  msgid ""
106
  "<p>If that does not help, please open up a <a href=\"%1$s\" "
@@ -108,11 +108,16 @@ msgid ""
108
  "for you.</p>"
109
  msgstr ""
110
 
 
 
 
 
 
111
  #: inc/classes/class-astra-sites.php:83
112
  #. translators: 1: theme.php file
113
  msgid ""
114
- "Astra Theme needs to be active for you to use currently installed \"Astra "
115
- "Sites\" plugin. <a href=\"%1$s\">Install & Activate Now</a>"
116
  msgstr ""
117
 
118
  #: inc/classes/class-astra-sites.php:123
@@ -181,19 +186,19 @@ msgid ""
181
  "placeholders."
182
  msgstr ""
183
 
184
- #: inc/classes/class-astra-sites.php:304
185
  msgid "No plugin specified"
186
  msgstr ""
187
 
188
- #: inc/classes/class-astra-sites.php:333
189
  msgid "Plugin Successfully Activated"
190
  msgstr ""
191
 
192
- #: inc/classes/class-astra-sites.php:462
193
  msgid "You have not \"customize\" access to import the astra site."
194
  msgstr ""
195
 
196
- #: inc/classes/class-astra-sites.php:470
197
  msgid "Demo Imported Successfully."
198
  msgstr ""
199
 
@@ -380,6 +385,14 @@ msgstr ""
380
  msgid "Could not update comment #%d with mapped data"
381
  msgstr ""
382
 
 
 
 
 
 
 
 
 
383
  #. Plugin Name of the plugin/theme
384
  msgid "Astra Sites - Lite"
385
  msgstr ""
2
  # This file is distributed under the same license as the Astra Sites - Lite package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Astra Sites - Lite 1.0.12\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/astra-sites\n"
7
+ "POT-Creation-Date: 2017-09-29 05:24:35+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
24
  "X-Textdomain-Support: yes\n"
25
  "X-Generator: grunt-wp-i18n1.0.0\n"
26
 
27
+ #: astra-sites.php:18 inc/admin/class-astra-sites-page.php:85
28
  msgid "Astra Sites"
29
  msgstr ""
30
 
32
  msgid "Settings saved successfully."
33
  msgstr ""
34
 
35
+ #: inc/admin/view-astra-sites.php:51
36
  msgid "All"
37
  msgstr ""
38
 
39
+ #: inc/admin/view-astra-sites.php:65
40
  msgid "Search Sites"
41
  msgstr ""
42
 
43
+ #: inc/admin/view-astra-sites.php:66
44
  msgid "Search Sites..."
45
  msgstr ""
46
 
47
+ #: inc/admin/view-astra-sites.php:116
48
  msgid "Details &amp; Preview"
49
  msgstr ""
50
 
51
+ #: inc/admin/view-astra-sites.php:122 inc/admin/view-astra-sites.php:191
52
  msgid "Preview"
53
  msgstr ""
54
 
55
+ #: inc/admin/view-astra-sites.php:149
56
  msgid "Close"
57
  msgstr ""
58
 
59
+ #: inc/admin/view-astra-sites.php:150
60
  msgid "Previous"
61
  msgstr ""
62
 
63
+ #: inc/admin/view-astra-sites.php:151
64
  msgid "Next"
65
  msgstr ""
66
 
67
+ #: inc/admin/view-astra-sites.php:152 inc/admin/view-astra-sites.php:180
68
  msgid "Install Plugins"
69
  msgstr ""
70
 
71
+ #: inc/admin/view-astra-sites.php:168 inc/classes/class-astra-sites.php:260
72
  msgid "Read more"
73
  msgstr ""
74
 
75
+ #: inc/admin/view-astra-sites.php:171
76
  msgid "Required Plugins"
77
  msgstr ""
78
 
79
+ #: inc/admin/view-astra-sites.php:186
80
  msgid "Collapse"
81
  msgstr ""
82
 
83
+ #: inc/admin/view-astra-sites.php:201
84
  #. translators: %1$s & %2$s are a Demo API URL
85
  msgid ""
86
  "<p> It seems the demo data server, <i><a href=\"%1$s\">%2$s</a></i> is "
87
  "unreachable from your site.</p>"
88
  msgstr ""
89
 
90
+ #: inc/admin/view-astra-sites.php:203
91
  msgid ""
92
  "<p class=\"left-margin\"> 1. Sometimes, simple page reload fixes any "
93
  "temporary issues. No kidding!</p>"
94
  msgstr ""
95
 
96
+ #: inc/admin/view-astra-sites.php:205
97
  msgid ""
98
  "<p class=\"left-margin\"> 2. If that does not work, you will need to talk "
99
  "to your server administrator and check if demo server is being blocked by "
100
  "the firewall!</p>"
101
  msgstr ""
102
 
103
+ #: inc/admin/view-astra-sites.php:208
104
  #. translators: %1$s is a support link
105
  msgid ""
106
  "<p>If that does not help, please open up a <a href=\"%1$s\" "
108
  "for you.</p>"
109
  msgstr ""
110
 
111
+ #: inc/classes/class-astra-sites-white-label.php:176
112
+ #. translators: %1$s product name
113
+ msgid "%1$s Branding"
114
+ msgstr ""
115
+
116
  #: inc/classes/class-astra-sites.php:83
117
  #. translators: 1: theme.php file
118
  msgid ""
119
+ "Astra Theme needs to be active for you to use currently installed \"%1$s\" "
120
+ "plugin. <a href=\"%2$s\">Install & Activate Now</a>"
121
  msgstr ""
122
 
123
  #: inc/classes/class-astra-sites.php:123
186
  "placeholders."
187
  msgstr ""
188
 
189
+ #: inc/classes/class-astra-sites.php:306
190
  msgid "No plugin specified"
191
  msgstr ""
192
 
193
+ #: inc/classes/class-astra-sites.php:335
194
  msgid "Plugin Successfully Activated"
195
  msgstr ""
196
 
197
+ #: inc/classes/class-astra-sites.php:466
198
  msgid "You have not \"customize\" access to import the astra site."
199
  msgstr ""
200
 
201
+ #: inc/classes/class-astra-sites.php:474
202
  msgid "Demo Imported Successfully."
203
  msgstr ""
204
 
385
  msgid "Could not update comment #%d with mapped data"
386
  msgstr ""
387
 
388
+ #: inc/includes/white-label.php:23
389
+ msgid "Plugin Name:"
390
+ msgstr ""
391
+
392
+ #: inc/includes/white-label.php:28
393
+ msgid "Plugin Description:"
394
+ msgstr ""
395
+
396
  #. Plugin Name of the plugin/theme
397
  msgid "Astra Sites - Lite"
398
  msgstr ""
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://wpastra.com/pro/
4
  Tags: demo, theme demos, one click import
5
  Requires at least: 4.4
6
  Tested up to: 4.8.1
7
- Stable tag: 1.0.11
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -46,6 +46,11 @@ https://sites.wpastra.com/law-free/
46
 
47
  == Changelog ==
48
 
 
 
 
 
 
49
  v1.0.11 - 22-Sept-2017
50
  * New: Single click Install & activate required plugins.
51
  * New: Added filter `astra_sites_menu_item` for adding extra tabs in admin page.
4
  Tags: demo, theme demos, one click import
5
  Requires at least: 4.4
6
  Tested up to: 4.8.1
7
+ Stable tag: 1.0.12
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
46
 
47
  == Changelog ==
48
 
49
+ v1.0.12 - 29-Sept-2017
50
+ * New: Added White Label support from <a href="https://wpastra.com/pro/">Astra Pro</a>.
51
+ * Improvement: Don't display sites from both the page builders in the same view.
52
+ * Fix: Astra Sites admin area not working in the Firefox.
53
+
54
  v1.0.11 - 22-Sept-2017
55
  * New: Single click Install & activate required plugins.
56
  * New: Added filter `astra_sites_menu_item` for adding extra tabs in admin page.