Widget Settings Importer/Exporter - Version 1.5.1

Version Description

Download this release

Release Info

Developer kevinlangleyjr
Plugin Icon wp plugin Widget Settings Importer/Exporter
Version 1.5.1
Comparing to
See all releases

Code changes from version 1.5.0 to 1.5.1

Files changed (3) hide show
  1. class-widget-data.php +5 -2
  2. readme.txt +2 -2
  3. widget-data.php +1 -1
class-widget-data.php CHANGED
@@ -19,12 +19,15 @@ class Widget_Data {
19
 
20
  private static function clear_widgets() {
21
  $sidebars = wp_get_sidebars_widgets();
22
- $inactive = isset($sidebars['wp_inactive_widgets']) ? $sidebars['wp_inactive_widgets'] : array();
23
 
24
  unset($sidebars['wp_inactive_widgets']);
25
 
26
  foreach ( $sidebars as $sidebar => $widgets ) {
27
- $inactive = array_merge($inactive, $widgets);
 
 
 
28
  $sidebars[$sidebar] = array();
29
  }
30
 
19
 
20
  private static function clear_widgets() {
21
  $sidebars = wp_get_sidebars_widgets();
22
+ $inactive = isset($sidebars['wp_inactive_widgets']) && is_array( $sidebars['wp_inactive_widgets'] ) ? $sidebars['wp_inactive_widgets'] : array();
23
 
24
  unset($sidebars['wp_inactive_widgets']);
25
 
26
  foreach ( $sidebars as $sidebar => $widgets ) {
27
+ if( is_array( $widgets ) ){
28
+ $inactive = array_merge($inactive, $widgets);
29
+ }
30
+
31
  $sidebars[$sidebar] = array();
32
  }
33
 
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: kevinlangleyjr, smccafferty, markparolisi, voceplatforms
3
  Tags: widget, import, export
4
  Requires at least: 2.8
5
- Tested up to: 4.1
6
- Stable tag: 1.5.0
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
2
  Contributors: kevinlangleyjr, smccafferty, markparolisi, voceplatforms
3
  Tags: widget, import, export
4
  Requires at least: 2.8
5
+ Tested up to: 4.7
6
+ Stable tag: 1.5.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
widget-data.php CHANGED
@@ -4,7 +4,7 @@
4
  Description: Adds functionality to export and import widget data
5
  Author: Voce Communications - Kevin Langley, Sean McCafferty, Mark Parolisi
6
  Author URI: http://vocecommunications.com
7
- Version: 1.5.0
8
  * ******************************************************************
9
  Copyright 2011-2011 Voce Communications
10
 
4
  Description: Adds functionality to export and import widget data
5
  Author: Voce Communications - Kevin Langley, Sean McCafferty, Mark Parolisi
6
  Author URI: http://vocecommunications.com
7
+ Version: 1.5.1
8
  * ******************************************************************
9
  Copyright 2011-2011 Voce Communications
10