Version Description
Download this release
Release Info
Developer | Nikschavan |
Plugin | Astra Starter Sites |
Version | 1.0.7 |
Comparing to | |
See all releases |
Code changes from version 1.0.6 to 1.0.7
- astra-sites.php +2 -2
- importers/class-astra-sites-helper.php +42 -0
- languages/astra-sites.pot +23 -19
- readme.txt +5 -2
astra-sites.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Astra Free Sites
|
4 |
* Plugin URI: http://www.wpastra.com/pro/
|
5 |
* Description: Import free sites build with Astra theme.
|
6 |
-
* Version: 1.0.
|
7 |
* Author: Brainstorm Force
|
8 |
* Author URI: http://www.brainstormforce.com
|
9 |
* Text Domain: astra-sites
|
@@ -15,7 +15,7 @@
|
|
15 |
* Set constants.
|
16 |
*/
|
17 |
if ( ! defined( 'ASTRA_SITES_VER' ) ) {
|
18 |
-
define( 'ASTRA_SITES_VER', '1.0.
|
19 |
}
|
20 |
|
21 |
if ( ! defined( 'ASTRA_SITES_FILE' ) ) {
|
3 |
* Plugin Name: Astra Free Sites
|
4 |
* Plugin URI: http://www.wpastra.com/pro/
|
5 |
* Description: Import free sites build with Astra theme.
|
6 |
+
* Version: 1.0.7
|
7 |
* Author: Brainstorm Force
|
8 |
* Author URI: http://www.brainstormforce.com
|
9 |
* Text Domain: astra-sites
|
15 |
* Set constants.
|
16 |
*/
|
17 |
if ( ! defined( 'ASTRA_SITES_VER' ) ) {
|
18 |
+
define( 'ASTRA_SITES_VER', '1.0.7' );
|
19 |
}
|
20 |
|
21 |
if ( ! defined( 'ASTRA_SITES_FILE' ) ) {
|
importers/class-astra-sites-helper.php
CHANGED
@@ -43,6 +43,48 @@ if ( ! class_exists( 'Astra_Sites_Helper' ) ) :
|
|
43 |
* @since 1.0.0
|
44 |
*/
|
45 |
public function __construct() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
}
|
47 |
|
48 |
/**
|
43 |
* @since 1.0.0
|
44 |
*/
|
45 |
public function __construct() {
|
46 |
+
add_filter( 'wie_import_data', array( $this, 'custom_menu_widget' ) );
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Custom Menu Widget
|
51 |
+
*
|
52 |
+
* In widget export we set the nav menu slug instead of ID.
|
53 |
+
* So, In import process we check get menu id by slug and set
|
54 |
+
* it in import widget process.
|
55 |
+
*
|
56 |
+
* @since 1.0.7
|
57 |
+
*
|
58 |
+
* @param object $all_sidebars Widget data.
|
59 |
+
* @return object Set custom menu id by slug.
|
60 |
+
*/
|
61 |
+
function custom_menu_widget( $all_sidebars ) {
|
62 |
+
|
63 |
+
// Get current menu ID & Slugs.
|
64 |
+
$menu_locations = array();
|
65 |
+
$nav_menus = (object) wp_get_nav_menus();
|
66 |
+
if ( isset( $nav_menus ) ) {
|
67 |
+
foreach ( $nav_menus as $menu_key => $menu ) {
|
68 |
+
if ( is_object( $menu ) ) {
|
69 |
+
$menu_locations[ $menu->term_id ] = $menu->slug;
|
70 |
+
}
|
71 |
+
}
|
72 |
+
}
|
73 |
+
|
74 |
+
// Import widget data.
|
75 |
+
$all_sidebars = (object) $all_sidebars;
|
76 |
+
foreach ( $all_sidebars as $widgets_key => $widgets ) {
|
77 |
+
foreach ( $widgets as $widget_key => $widget ) {
|
78 |
+
|
79 |
+
// Found slug in current menu list.
|
80 |
+
$menu_id = array_search( $widget->nav_menu, $menu_locations );
|
81 |
+
if ( ! empty( $menu_id ) ) {
|
82 |
+
$all_sidebars->$widgets_key->$widget_key->nav_menu = $menu_id;
|
83 |
+
}
|
84 |
+
}
|
85 |
+
}
|
86 |
+
|
87 |
+
return $all_sidebars;
|
88 |
}
|
89 |
|
90 |
/**
|
languages/astra-sites.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the Astra Free Sites package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Astra Free Sites 1.0.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/astra-sites\n"
|
7 |
-
"POT-Creation-Date: 2017-08-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -24,10 +24,14 @@ msgstr ""
|
|
24 |
"X-Textdomain-Support: yes\n"
|
25 |
"X-Generator: grunt-wp-i18n1.0.0\n"
|
26 |
|
27 |
-
#: admin/class-astra-sites-
|
28 |
msgid "Astra Sites"
|
29 |
msgstr ""
|
30 |
|
|
|
|
|
|
|
|
|
31 |
#: admin/view-astra-sites.php:28
|
32 |
msgid "All"
|
33 |
msgstr ""
|
@@ -64,7 +68,7 @@ msgstr ""
|
|
64 |
msgid "Install Plugins"
|
65 |
msgstr ""
|
66 |
|
67 |
-
#: admin/view-astra-sites.php:138 classes/class-astra-sites.php:
|
68 |
msgid "Read more"
|
69 |
msgstr ""
|
70 |
|
@@ -104,58 +108,58 @@ msgid ""
|
|
104 |
"for you.</p>"
|
105 |
msgstr ""
|
106 |
|
107 |
-
#: classes/class-astra-sites.php:
|
108 |
#. translators: 1: theme.php file
|
109 |
msgid ""
|
110 |
"Astra Theme needs to be active for you to use currently installed \"Astra "
|
111 |
"Sites\" plugin. <a href=\"%1$s\">Install & Activate Now</a>"
|
112 |
msgstr ""
|
113 |
|
114 |
-
#: classes/class-astra-sites.php:
|
115 |
msgid "See Library"
|
116 |
msgstr ""
|
117 |
|
118 |
-
#: classes/class-astra-sites.php:
|
119 |
msgid "Purchase"
|
120 |
msgstr ""
|
121 |
|
122 |
-
#: classes/class-astra-sites.php:
|
123 |
msgid "Error!"
|
124 |
msgstr ""
|
125 |
|
126 |
-
#: classes/class-astra-sites.php:
|
127 |
msgid "Error! Read Possibilities."
|
128 |
msgstr ""
|
129 |
|
130 |
-
#: classes/class-astra-sites.php:
|
131 |
msgid "Done! View Site"
|
132 |
msgstr ""
|
133 |
|
134 |
-
#: classes/class-astra-sites.php:
|
135 |
msgid "Activating"
|
136 |
msgstr ""
|
137 |
|
138 |
-
#: classes/class-astra-sites.php:
|
139 |
msgid "Active"
|
140 |
msgstr ""
|
141 |
|
142 |
-
#: classes/class-astra-sites.php:
|
143 |
msgid "Import This Site"
|
144 |
msgstr ""
|
145 |
|
146 |
-
#: classes/class-astra-sites.php:
|
147 |
msgid "Hide"
|
148 |
msgstr ""
|
149 |
|
150 |
-
#: classes/class-astra-sites.php:
|
151 |
msgid "There was a problem receiving a response from server."
|
152 |
msgstr ""
|
153 |
|
154 |
-
#: classes/class-astra-sites.php:
|
155 |
msgid "No Demos found, Try a different search."
|
156 |
msgstr ""
|
157 |
|
158 |
-
#: classes/class-astra-sites.php:
|
159 |
msgid ""
|
160 |
"Executing Demo Import will make your site similar as ours. Please bear in "
|
161 |
"mind -\n"
|
@@ -169,11 +173,11 @@ msgid ""
|
|
169 |
"placeholders."
|
170 |
msgstr ""
|
171 |
|
172 |
-
#: classes/class-astra-sites.php:
|
173 |
msgid "No plugin specified"
|
174 |
msgstr ""
|
175 |
|
176 |
-
#: classes/class-astra-sites.php:
|
177 |
msgid "Plugin Successfully Activated"
|
178 |
msgstr ""
|
179 |
|
2 |
# This file is distributed under the same license as the Astra Free Sites package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Astra Free Sites 1.0.7\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/astra-sites\n"
|
7 |
+
"POT-Creation-Date: 2017-08-31 13:54:23+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 |
+
#: admin/class-astra-sites-page.php:85
|
28 |
msgid "Astra Sites"
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: admin/class-astra-sites-page.php:158
|
32 |
+
msgid "Settings saved successfully."
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
#: admin/view-astra-sites.php:28
|
36 |
msgid "All"
|
37 |
msgstr ""
|
68 |
msgid "Install Plugins"
|
69 |
msgstr ""
|
70 |
|
71 |
+
#: admin/view-astra-sites.php:138 classes/class-astra-sites.php:225
|
72 |
msgid "Read more"
|
73 |
msgstr ""
|
74 |
|
108 |
"for you.</p>"
|
109 |
msgstr ""
|
110 |
|
111 |
+
#: classes/class-astra-sites.php:94
|
112 |
#. translators: 1: theme.php file
|
113 |
msgid ""
|
114 |
"Astra Theme needs to be active for you to use currently installed \"Astra "
|
115 |
"Sites\" plugin. <a href=\"%1$s\">Install & Activate Now</a>"
|
116 |
msgstr ""
|
117 |
|
118 |
+
#: classes/class-astra-sites.php:115
|
119 |
msgid "See Library"
|
120 |
msgstr ""
|
121 |
|
122 |
+
#: classes/class-astra-sites.php:213
|
123 |
msgid "Purchase"
|
124 |
msgstr ""
|
125 |
|
126 |
+
#: classes/class-astra-sites.php:218
|
127 |
msgid "Error!"
|
128 |
msgstr ""
|
129 |
|
130 |
+
#: classes/class-astra-sites.php:219
|
131 |
msgid "Error! Read Possibilities."
|
132 |
msgstr ""
|
133 |
|
134 |
+
#: classes/class-astra-sites.php:221
|
135 |
msgid "Done! View Site"
|
136 |
msgstr ""
|
137 |
|
138 |
+
#: classes/class-astra-sites.php:222
|
139 |
msgid "Activating"
|
140 |
msgstr ""
|
141 |
|
142 |
+
#: classes/class-astra-sites.php:223
|
143 |
msgid "Active"
|
144 |
msgstr ""
|
145 |
|
146 |
+
#: classes/class-astra-sites.php:224
|
147 |
msgid "Import This Site"
|
148 |
msgstr ""
|
149 |
|
150 |
+
#: classes/class-astra-sites.php:226
|
151 |
msgid "Hide"
|
152 |
msgstr ""
|
153 |
|
154 |
+
#: classes/class-astra-sites.php:227
|
155 |
msgid "There was a problem receiving a response from server."
|
156 |
msgstr ""
|
157 |
|
158 |
+
#: classes/class-astra-sites.php:228
|
159 |
msgid "No Demos found, Try a different search."
|
160 |
msgstr ""
|
161 |
|
162 |
+
#: classes/class-astra-sites.php:229
|
163 |
msgid ""
|
164 |
"Executing Demo Import will make your site similar as ours. Please bear in "
|
165 |
"mind -\n"
|
173 |
"placeholders."
|
174 |
msgstr ""
|
175 |
|
176 |
+
#: classes/class-astra-sites.php:265
|
177 |
msgid "No plugin specified"
|
178 |
msgstr ""
|
179 |
|
180 |
+
#: classes/class-astra-sites.php:290
|
181 |
msgid "Plugin Successfully Activated"
|
182 |
msgstr ""
|
183 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://wpastra.com/pro/
|
|
4 |
Tags: demo, theme demos, one click import
|
5 |
Requires at least: 4.4
|
6 |
Tested up to: 4.8.1
|
7 |
-
Stable tag: 1.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -46,8 +46,11 @@ https://sites.wpastra.com/law-free/
|
|
46 |
|
47 |
== Changelog ==
|
48 |
|
|
|
|
|
|
|
49 |
v1.0.6 - 30-Aug-2017
|
50 |
-
* New:
|
51 |
* Fix: Validate site options before storing in database.
|
52 |
|
53 |
v1.0.5 - 29-Aug-2017
|
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.7
|
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.7 - 1-Sept-2017
|
50 |
+
* Fix: Custom Menu widget not setting imported widget.
|
51 |
+
|
52 |
v1.0.6 - 30-Aug-2017
|
53 |
+
* New: Addd custom menu for Astra Sites.
|
54 |
* Fix: Validate site options before storing in database.
|
55 |
|
56 |
v1.0.5 - 29-Aug-2017
|