Widget Settings Importer/Exporter - Version 1.5.3

Version Description

Download this release

Release Info

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

Code changes from version 1.5.2 to 1.5.3

Files changed (3) hide show
  1. class-widget-data.php +3 -3
  2. readme.txt +1 -1
  3. widget-data.php +1 -1
class-widget-data.php CHANGED
@@ -284,7 +284,7 @@ class Widget_Data {
284
 
285
  foreach ( $import_widgets as $import_widget ) :
286
  //if the sidebar exists
287
- if ( isset( $current_sidebars[$import_sidebar] ) ) :
288
  $title = trim( substr( $import_widget, 0, strrpos( $import_widget, '-' ) ) );
289
  $index = trim( substr( $import_widget, strrpos( $import_widget, '-' ) + 1 ) );
290
  $current_widget_data = get_option( 'widget_' . $title );
@@ -304,8 +304,8 @@ class Widget_Data {
304
  $new_widgets[$title]['_multiwidget'] = $multiwidget;
305
  } else {
306
  $current_widget_data[$new_index] = $widget_data[$title][$index];
307
- $current_multiwidget = $current_widget_data['_multiwidget'];
308
- $new_multiwidget = isset($widget_data[$title]['_multiwidget']) ? $widget_data[$title]['_multiwidget'] : false;
309
  $multiwidget = ($current_multiwidget != $new_multiwidget) ? $current_multiwidget : 1;
310
  unset( $current_widget_data['_multiwidget'] );
311
  $current_widget_data['_multiwidget'] = $multiwidget;
284
 
285
  foreach ( $import_widgets as $import_widget ) :
286
  //if the sidebar exists
287
+ if ( array_key_exists( $import_sidebar, $current_sidebars ) ) :
288
  $title = trim( substr( $import_widget, 0, strrpos( $import_widget, '-' ) ) );
289
  $index = trim( substr( $import_widget, strrpos( $import_widget, '-' ) + 1 ) );
290
  $current_widget_data = get_option( 'widget_' . $title );
304
  $new_widgets[$title]['_multiwidget'] = $multiwidget;
305
  } else {
306
  $current_widget_data[$new_index] = $widget_data[$title][$index];
307
+ $current_multiwidget = array_key_exists('_multiwidget', $current_widget_data) ? $current_widget_data['_multiwidget'] : false;
308
+ $new_multiwidget = array_key_exists('_multiwidget', $widget_data[$title]) ? $widget_data[$title]['_multiwidget'] : false;
309
  $multiwidget = ($current_multiwidget != $new_multiwidget) ? $current_multiwidget : 1;
310
  unset( $current_widget_data['_multiwidget'] );
311
  $current_widget_data['_multiwidget'] = $multiwidget;
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: kevinlangleyjr, smccafferty, markparolisi, voceplatforms
3
  Tags: widget, import, export
4
  Requires at least: 2.8
5
  Tested up to: 4.7.2
6
- Stable tag: 1.5.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
3
  Tags: widget, import, export
4
  Requires at least: 2.8
5
  Tested up to: 4.7.2
6
+ Stable tag: 1.5.3
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.2
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.3
8
  * ******************************************************************
9
  Copyright 2011-2011 Voce Communications
10