Widget Importer & Exporter - Version 1.1.4

Version Description

Download this release

Release Info

Developer stevengliebe
Plugin Icon 128x128 Widget Importer & Exporter
Version 1.1.4
Comparing to
See all releases

Code changes from version 1.1.3 to 1.1.4

includes/import.php CHANGED
@@ -95,7 +95,7 @@ function wie_process_import_file( $file ) {
95
96
/**
97
* Import widget JSON data
98
- *
99
* @since 0.4
100
* @global array $wp_registered_sidebars
101
* @param object $data JSON widget data from .wie file
@@ -201,7 +201,7 @@ function wie_import_data( $data ) {
201
break;
202
203
}
204
-
205
}
206
207
}
95
96
/**
97
* Import widget JSON data
98
+ *
99
* @since 0.4
100
* @global array $wp_registered_sidebars
101
* @param object $data JSON widget data from .wie file
201
break;
202
203
}
204
+
205
}
206
207
}
includes/page.php CHANGED
@@ -77,7 +77,7 @@ function wie_import_export_page_content() {
77
</p>
78
79
<form method="post" enctype="multipart/form-data">
80
-
81
<?php wp_nonce_field( 'wie_import', 'wie_import_nonce' ); ?>
82
83
<input type="file" name="wie_import_file" id="wie-import-file" />
@@ -111,7 +111,7 @@ function wie_import_export_page_content() {
111
112
/**
113
* Have import results to show?
114
- *
115
* @since 0.3
116
* @global string $wie_import_results
117
* @return bool True if have import results to show
77
</p>
78
79
<form method="post" enctype="multipart/form-data">
80
+
81
<?php wp_nonce_field( 'wie_import', 'wie_import_nonce' ); ?>
82
83
<input type="file" name="wie_import_file" id="wie-import-file" />
111
112
/**
113
* Have import results to show?
114
+ *
115
* @since 0.3
116
* @global string $wie_import_results
117
* @return bool True if have import results to show
includes/widgets.php CHANGED
@@ -39,7 +39,7 @@ function wie_available_widgets() {
39
$available_widgets[$widget['id_base']]['name'] = $widget['name'];
40
41
}
42
-
43
}
44
45
return apply_filters( 'wie_available_widgets', $available_widgets );
39
$available_widgets[$widget['id_base']]['name'] = $widget['name'];
40
41
}
42
+
43
}
44
45
return apply_filters( 'wie_available_widgets', $available_widgets );
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
Contributors: stevengliebe, churchthemes
3
Tags: widgets, widget, importer, exporter, import, export, backup
4
Requires at least: 3.5
5
- Tested up to: 3.9
6
Stable tag: trunk
7
License: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
8
@@ -28,7 +28,7 @@ The following translations are included.
28
29
* English (default)
30
* Spanish (es_ES) by [Eduardo Larequi](http://www.labitacoradeltigre.com/)
31
- * Spanish (fr_FR) by [Jose Kost](http://josekost.fr/)
32
* Serbo-Croatian (sr_RS) by Borisa Djuraskovic of [Web Hosting Hub](http://www.webhostinghub.com)
33
34
= Developers =
2
Contributors: stevengliebe, churchthemes
3
Tags: widgets, widget, importer, exporter, import, export, backup
4
Requires at least: 3.5
5
+ Tested up to: 4.0
6
Stable tag: trunk
7
License: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
8
28
29
* English (default)
30
* Spanish (es_ES) by [Eduardo Larequi](http://www.labitacoradeltigre.com/)
31
+ * French (fr_FR) by [Jose Kost](http://josekost.fr/)
32
* Serbo-Croatian (sr_RS) by Borisa Djuraskovic of [Web Hosting Hub](http://www.webhostinghub.com)
33
34
= Developers =
widget-importer-exporter.php CHANGED
@@ -3,13 +3,13 @@
3
* Plugin Name: Widget Importer & Exporter
4
* Plugin URI: https://github.com/stevengliebe/widget-importer-exporter
5
* Description: Imports and exports widgets.
6
- * Version: 1.1.3
7
* Author: Steven Gliebe
8
* Author URI: http://stevengliebe.com
9
* License: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
10
* Text Domain: widget-importer-exporter
11
* Domain Path: /languages
12
- *
13
* @package Widget_Importer_Exporter
14
* @copyright Copyright (c) 2013, DreamDolphin Media, LLC
15
* @link https://github.com/stevengliebe/widget-importer-exporter
@@ -122,7 +122,7 @@ class Widget_Importer_Exporter {
122
*
123
* This will load the MO file for the current locale.
124
* The translation file must be named widget-importer-exporter-$locale.mo.
125
- *
126
* First it will check to see if the MO file exists in wp-content/languages/plugins.
127
* If not, then the 'languages' direcory inside the plugin will be used.
128
* It is ideal to keep translation files outside of the plugin to avoid loss during updates.\
@@ -166,7 +166,7 @@ class Widget_Importer_Exporter {
166
167
// Admin only
168
'admin' => array(
169
-
170
// Functions
171
WIE_INC_DIR . '/export.php',
172
WIE_INC_DIR . '/import.php',
@@ -182,7 +182,7 @@ class Widget_Importer_Exporter {
182
183
/**
184
* Load includes
185
- *
186
* Include files based on whether or not condition is met.
187
*
188
* @since 0.1
@@ -195,48 +195,48 @@ class Widget_Importer_Exporter {
195
196
// Loop conditions
197
foreach ( $includes as $condition => $files ) {
198
-
199
$do_includes = false;
200
201
// Check condition
202
switch( $condition ) {
203
-
204
// Admin Only
205
case 'admin':
206
-
207
if ( is_admin() ) {
208
$do_includes = true;
209
}
210
-
211
break;
212
-
213
// Frontend Only
214
case 'frontend':
215
-
216
if ( ! is_admin() ) {
217
$do_includes = true;
218
}
219
-
220
break;
221
-
222
// Admin or Frontend (always)
223
default:
224
-
225
$do_includes = true;
226
-
227
- break;
228
-
229
}
230
-
231
// Loop files if condition met
232
if ( $do_includes ) {
233
-
234
- foreach ( $files as $file ) {
235
- require_once trailingslashit( WIE_PATH ) . $file;
236
}
237
-
238
}
239
-
240
}
241
242
}
3
* Plugin Name: Widget Importer & Exporter
4
* Plugin URI: https://github.com/stevengliebe/widget-importer-exporter
5
* Description: Imports and exports widgets.
6
+ * Version: 1.1.4
7
* Author: Steven Gliebe
8
* Author URI: http://stevengliebe.com
9
* License: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
10
* Text Domain: widget-importer-exporter
11
* Domain Path: /languages
12
+ *
13
* @package Widget_Importer_Exporter
14
* @copyright Copyright (c) 2013, DreamDolphin Media, LLC
15
* @link https://github.com/stevengliebe/widget-importer-exporter
122
*
123
* This will load the MO file for the current locale.
124
* The translation file must be named widget-importer-exporter-$locale.mo.
125
+ *
126
* First it will check to see if the MO file exists in wp-content/languages/plugins.
127
* If not, then the 'languages' direcory inside the plugin will be used.
128
* It is ideal to keep translation files outside of the plugin to avoid loss during updates.\
166
167
// Admin only
168
'admin' => array(
169
+
170
// Functions
171
WIE_INC_DIR . '/export.php',
172
WIE_INC_DIR . '/import.php',
182
183
/**
184
* Load includes
185
+ *
186
* Include files based on whether or not condition is met.
187
*
188
* @since 0.1
195
196
// Loop conditions
197
foreach ( $includes as $condition => $files ) {
198
+
199
$do_includes = false;
200
201
// Check condition
202
switch( $condition ) {
203
+
204
// Admin Only
205
case 'admin':
206
+
207
if ( is_admin() ) {
208
$do_includes = true;
209
}
210
+
211
break;
212
+
213
// Frontend Only
214
case 'frontend':
215
+
216
if ( ! is_admin() ) {
217
$do_includes = true;
218
}
219
+
220
break;
221
+
222
// Admin or Frontend (always)
223
default:
224
+
225
$do_includes = true;
226
+
227
+ break;
228
+
229
}
230
+
231
// Loop files if condition met
232
if ( $do_includes ) {
233
+
234
+ foreach ( $files as $file ) {
235
+ require_once trailingslashit( WIE_PATH ) . $file;
236
}
237
+
238
}
239
+
240
}
241
242
}