Version Description
- Improvement: Compatibility with latest WordPress PHP_CodeSniffer rules.
- Fix: Setting page and after import link White Label compatible.
- Fix: Theme name on Options page is now White Label compatible.
Download this release
Release Info
Developer | brainstormworg |
Plugin | Import / Export Customizer Settings |
Version | 1.0.3 |
Comparing to | |
See all releases |
Code changes from version 1.0.2 to 1.0.3
- astra-import-export.php +14 -3
- inc/classes/class-astra-import-export-loader.php +13 -5
- languages/astra-import-export.pot +84 -0
- readme.txt +7 -2
astra-import-export.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Import / Export Customizer Settings
|
4 |
* Plugin URI: https://wpastra.com/
|
5 |
* Description: This plugin is an add-on for the Astra WordPress Theme. It will help in Import Export Customizer settings.
|
6 |
-
* Version: 1.0.
|
7 |
* Author: Brainstorm Force
|
8 |
* Author URI: http://www.brainstormforce.com
|
9 |
* Text Domain: astra-import-export
|
@@ -11,10 +11,14 @@
|
|
11 |
* @package Import / Export Customizer Settings
|
12 |
*/
|
13 |
|
|
|
|
|
|
|
|
|
14 |
/**
|
15 |
* Set constants.
|
16 |
*/
|
17 |
-
define( 'ASTRA_IMPORT_EXPORT_VER', '1.0.
|
18 |
define( 'ASTRA_IMPORT_EXPORT_FILE', __FILE__ );
|
19 |
define( 'ASTRA_IMPORT_EXPORT_BASE', plugin_basename( ASTRA_IMPORT_EXPORT_FILE ) );
|
20 |
define( 'ASTRA_IMPORT_EXPORT_DIR', plugin_dir_path( ASTRA_IMPORT_EXPORT_FILE ) );
|
@@ -39,7 +43,14 @@ add_action( 'plugins_loaded', 'astra_import_export_setup' );
|
|
39 |
* @return Array
|
40 |
*/
|
41 |
function aix_plugin_action_links( $links ) {
|
42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
return $links;
|
45 |
}
|
3 |
* Plugin Name: Import / Export Customizer Settings
|
4 |
* Plugin URI: https://wpastra.com/
|
5 |
* Description: This plugin is an add-on for the Astra WordPress Theme. It will help in Import Export Customizer settings.
|
6 |
+
* Version: 1.0.3
|
7 |
* Author: Brainstorm Force
|
8 |
* Author URI: http://www.brainstormforce.com
|
9 |
* Text Domain: astra-import-export
|
11 |
* @package Import / Export Customizer Settings
|
12 |
*/
|
13 |
|
14 |
+
if ( 'astra' !== get_template() ) {
|
15 |
+
return;
|
16 |
+
}
|
17 |
+
|
18 |
/**
|
19 |
* Set constants.
|
20 |
*/
|
21 |
+
define( 'ASTRA_IMPORT_EXPORT_VER', '1.0.3' );
|
22 |
define( 'ASTRA_IMPORT_EXPORT_FILE', __FILE__ );
|
23 |
define( 'ASTRA_IMPORT_EXPORT_BASE', plugin_basename( ASTRA_IMPORT_EXPORT_FILE ) );
|
24 |
define( 'ASTRA_IMPORT_EXPORT_DIR', plugin_dir_path( ASTRA_IMPORT_EXPORT_FILE ) );
|
43 |
* @return Array
|
44 |
*/
|
45 |
function aix_plugin_action_links( $links ) {
|
46 |
+
|
47 |
+
$page_slug = 'astra';
|
48 |
+
|
49 |
+
if ( is_callable( 'Astra_Admin_Settings::get_theme_page_slug' ) ) {
|
50 |
+
$page_slug = Astra_Admin_Settings::get_theme_page_slug();
|
51 |
+
}
|
52 |
+
|
53 |
+
$links[] = '<a href="' . esc_url( get_admin_url( null, 'themes.php?page=' . $page_slug ) ) . '">' . __( 'Settings', 'astra-import-export' ) . '</a>';
|
54 |
|
55 |
return $links;
|
56 |
}
|
inc/classes/class-astra-import-export-loader.php
CHANGED
@@ -47,22 +47,23 @@ if ( ! class_exists( 'Astra_Import_Export_Loader' ) ) {
|
|
47 |
* Function enqueue_scripts() to enqueue files.
|
48 |
*/
|
49 |
public function enqueue_scripts() {
|
50 |
-
|
51 |
wp_register_style( 'astra-import-export-css', ASTRA_IMPORT_EXPORT_URI . 'inc/assets/css/style.css', array(), ASTRA_IMPORT_EXPORT_VER );
|
52 |
-
|
53 |
}
|
54 |
|
55 |
/**
|
56 |
* Add postMessage support for site title and description for the Theme Customizer.
|
57 |
*/
|
58 |
public function astra_import_export_section() {
|
|
|
|
|
59 |
// Enqueue.
|
60 |
wp_enqueue_style( 'astra-import-export-css' );
|
61 |
?>
|
62 |
<div class="postbox" id="astra-ie">
|
63 |
<h2 class="hndle ast-normal-cusror"><span class="dashicons dashicons-download"></span><?php esc_html_e( 'Export Settings', 'astra-import-export' ); ?></h2>
|
64 |
<div class="inside">
|
65 |
-
<p><?php esc_html_e( 'Export your current
|
|
|
66 |
<form method="post">
|
67 |
<p><input type="hidden" name="astra_ie_action" value="export_settings" /></p>
|
68 |
<p style="margin-bottom:0">
|
@@ -76,7 +77,8 @@ if ( ! class_exists( 'Astra_Import_Export_Loader' ) ) {
|
|
76 |
<div class="postbox" id="astra-ie">
|
77 |
<h2 class="hndle ast-normal-cusror"><span class="dashicons dashicons-upload"></span><?php esc_html_e( 'Import Settings', 'astra-import-export' ); ?></h2>
|
78 |
<div class="inside">
|
79 |
-
<p><?php esc_html_e( 'Import your
|
|
|
80 |
<form method="post" enctype="multipart/form-data">
|
81 |
<p>
|
82 |
<input type="file" name="import_file"/>
|
@@ -165,6 +167,12 @@ if ( ! class_exists( 'Astra_Import_Export_Loader' ) ) {
|
|
165 |
Astra_Admin_Helper::update_admin_settings_option( '_astra_ext_enabled_extensions', $settings['astra-addons'] );
|
166 |
}
|
167 |
|
|
|
|
|
|
|
|
|
|
|
|
|
168 |
// Delete existing dynamic CSS cache.
|
169 |
delete_option( 'astra-settings' );
|
170 |
|
@@ -174,7 +182,7 @@ if ( ! class_exists( 'Astra_Import_Export_Loader' ) ) {
|
|
174 |
wp_nonce_url(
|
175 |
add_query_arg(
|
176 |
array(
|
177 |
-
'page' =>
|
178 |
'status' => 'imported',
|
179 |
),
|
180 |
admin_url( 'themes.php' )
|
47 |
* Function enqueue_scripts() to enqueue files.
|
48 |
*/
|
49 |
public function enqueue_scripts() {
|
|
|
50 |
wp_register_style( 'astra-import-export-css', ASTRA_IMPORT_EXPORT_URI . 'inc/assets/css/style.css', array(), ASTRA_IMPORT_EXPORT_VER );
|
|
|
51 |
}
|
52 |
|
53 |
/**
|
54 |
* Add postMessage support for site title and description for the Theme Customizer.
|
55 |
*/
|
56 |
public function astra_import_export_section() {
|
57 |
+
|
58 |
+
$theme_name = apply_filters( 'astra_page_title', __( 'Astra', 'astra-import-export' ) );
|
59 |
// Enqueue.
|
60 |
wp_enqueue_style( 'astra-import-export-css' );
|
61 |
?>
|
62 |
<div class="postbox" id="astra-ie">
|
63 |
<h2 class="hndle ast-normal-cusror"><span class="dashicons dashicons-download"></span><?php esc_html_e( 'Export Settings', 'astra-import-export' ); ?></h2>
|
64 |
<div class="inside">
|
65 |
+
<p><?php esc_html_e( 'Export your current ' . esc_html( $theme_name ) . ' Customizer settings.', 'astra-import-export' ); // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText ?></p>
|
66 |
+
|
67 |
<form method="post">
|
68 |
<p><input type="hidden" name="astra_ie_action" value="export_settings" /></p>
|
69 |
<p style="margin-bottom:0">
|
77 |
<div class="postbox" id="astra-ie">
|
78 |
<h2 class="hndle ast-normal-cusror"><span class="dashicons dashicons-upload"></span><?php esc_html_e( 'Import Settings', 'astra-import-export' ); ?></h2>
|
79 |
<div class="inside">
|
80 |
+
<p><?php esc_html_e( 'Import your ' . esc_html( $theme_name ) . ' Customizer settings.', 'astra-import-export' ); // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText ?>
|
81 |
+
|
82 |
<form method="post" enctype="multipart/form-data">
|
83 |
<p>
|
84 |
<input type="file" name="import_file"/>
|
167 |
Astra_Admin_Helper::update_admin_settings_option( '_astra_ext_enabled_extensions', $settings['astra-addons'] );
|
168 |
}
|
169 |
|
170 |
+
$page_slug = 'astra';
|
171 |
+
|
172 |
+
if ( is_callable( 'Astra_Admin_Settings::get_theme_page_slug' ) ) {
|
173 |
+
$page_slug = Astra_Admin_Settings::get_theme_page_slug();
|
174 |
+
}
|
175 |
+
|
176 |
// Delete existing dynamic CSS cache.
|
177 |
delete_option( 'astra-settings' );
|
178 |
|
182 |
wp_nonce_url(
|
183 |
add_query_arg(
|
184 |
array(
|
185 |
+
'page' => $page_slug,
|
186 |
'status' => 'imported',
|
187 |
),
|
188 |
admin_url( 'themes.php' )
|
languages/astra-import-export.pot
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2020 Brainstorm Force
|
2 |
+
# This file is distributed under the same license as the Import / Export Customizer Settings package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Import / Export Customizer Settings 1.0.3\n"
|
6 |
+
"Report-Msgid-Bugs-To: "
|
7 |
+
"https://wordpress.org/support/plugin/astra-import-export\n"
|
8 |
+
"POT-Creation-Date: 2020-05-18 07:08:21+00:00\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=utf-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"PO-Revision-Date: 2020-MO-DA HO:MI+ZONE\n"
|
13 |
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14 |
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
15 |
+
"Language: en\n"
|
16 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
17 |
+
"X-Poedit-Country: United States\n"
|
18 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
19 |
+
"X-Poedit-KeywordsList: "
|
20 |
+
"__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_"
|
21 |
+
"attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n"
|
22 |
+
"X-Poedit-Basepath: ../\n"
|
23 |
+
"X-Poedit-SearchPath-0: .\n"
|
24 |
+
"X-Poedit-Bookmarks: \n"
|
25 |
+
"X-Textdomain-Support: yes\n"
|
26 |
+
"X-Generator: grunt-wp-i18n 1.0.3\n"
|
27 |
+
|
28 |
+
#: astra-import-export.php:53
|
29 |
+
msgid "Settings"
|
30 |
+
msgstr ""
|
31 |
+
|
32 |
+
#: inc/classes/class-astra-import-export-loader.php:58
|
33 |
+
msgid "Astra"
|
34 |
+
msgstr ""
|
35 |
+
|
36 |
+
#: inc/classes/class-astra-import-export-loader.php:63
|
37 |
+
msgid "Export Settings"
|
38 |
+
msgstr ""
|
39 |
+
|
40 |
+
#: inc/classes/class-astra-import-export-loader.php:71
|
41 |
+
msgid "Export"
|
42 |
+
msgstr ""
|
43 |
+
|
44 |
+
#: inc/classes/class-astra-import-export-loader.php:78
|
45 |
+
msgid "Import Settings"
|
46 |
+
msgstr ""
|
47 |
+
|
48 |
+
#: inc/classes/class-astra-import-export-loader.php:89
|
49 |
+
msgid "Import"
|
50 |
+
msgstr ""
|
51 |
+
|
52 |
+
#: inc/classes/class-astra-import-export-loader.php:114
|
53 |
+
msgid "Import successful."
|
54 |
+
msgstr ""
|
55 |
+
|
56 |
+
#: inc/classes/class-astra-import-export-loader.php:147
|
57 |
+
msgid "Please upload a valid .json file"
|
58 |
+
msgstr ""
|
59 |
+
|
60 |
+
#: inc/classes/class-astra-import-export-loader.php:153
|
61 |
+
msgid "Please upload a file to import"
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#. Plugin Name of the plugin/theme
|
65 |
+
msgid "Import / Export Customizer Settings"
|
66 |
+
msgstr ""
|
67 |
+
|
68 |
+
#. Plugin URI of the plugin/theme
|
69 |
+
msgid "https://wpastra.com/"
|
70 |
+
msgstr ""
|
71 |
+
|
72 |
+
#. Description of the plugin/theme
|
73 |
+
msgid ""
|
74 |
+
"This plugin is an add-on for the Astra WordPress Theme. It will help in "
|
75 |
+
"Import Export Customizer settings."
|
76 |
+
msgstr ""
|
77 |
+
|
78 |
+
#. Author of the plugin/theme
|
79 |
+
msgid "Brainstorm Force"
|
80 |
+
msgstr ""
|
81 |
+
|
82 |
+
#. Author URI of the plugin/theme
|
83 |
+
msgid "http://www.brainstormforce.com"
|
84 |
+
msgstr ""
|
readme.txt
CHANGED
@@ -3,9 +3,9 @@ Contributors: brainstormforce
|
|
3 |
Donate link: https://www.brainstormforce.com/payment/
|
4 |
Requires at least: 4.4
|
5 |
Tags: astra addons export, import, settings, customizer settings, theme settings, theme options
|
6 |
-
Stable tag: 1.0.
|
7 |
Requires PHP: 5.4
|
8 |
-
Tested up to: 5.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -42,6 +42,11 @@ Yes! Astra Pro settings that are available with customizer can be imported/expor
|
|
42 |
|
43 |
== Changelog ==
|
44 |
|
|
|
|
|
|
|
|
|
|
|
45 |
= 1.0.2 =
|
46 |
- Fix: Security Update.
|
47 |
|
3 |
Donate link: https://www.brainstormforce.com/payment/
|
4 |
Requires at least: 4.4
|
5 |
Tags: astra addons export, import, settings, customizer settings, theme settings, theme options
|
6 |
+
Stable tag: 1.0.3
|
7 |
Requires PHP: 5.4
|
8 |
+
Tested up to: 5.5
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
42 |
|
43 |
== Changelog ==
|
44 |
|
45 |
+
= 1.0.3 =
|
46 |
+
- Improvement: Compatibility with latest WordPress PHP_CodeSniffer rules.
|
47 |
+
- Fix: Setting page and after import link White Label compatible.
|
48 |
+
- Fix: Theme name on Options page is now White Label compatible.
|
49 |
+
|
50 |
= 1.0.2 =
|
51 |
- Fix: Security Update.
|
52 |
|