WordPress.org

Plugin Directory

Changeset 1566725


Ignore:
Timestamp:
01/02/17 23:06:09 (3 months ago)
Author:
kevinlangleyjr
Message:

Fixing array_merge issue within the clear_widgets() method of the Widget_Data class

Location:
widget-settings-importexport
Files:
8 added
3 edited

Legend:

Unmodified
Added
Removed
  • widget-settings-importexport/trunk/class-widget-data.php

    r1060404 r1566725  
    2020    private static function clear_widgets() { 
    2121        $sidebars = wp_get_sidebars_widgets(); 
    22         $inactive = isset($sidebars['wp_inactive_widgets']) ? $sidebars['wp_inactive_widgets'] : array(); 
     22        $inactive = isset($sidebars['wp_inactive_widgets']) && is_array( $sidebars['wp_inactive_widgets'] ) ? $sidebars['wp_inactive_widgets'] : array(); 
    2323 
    2424        unset($sidebars['wp_inactive_widgets']); 
    2525 
    2626        foreach ( $sidebars as $sidebar => $widgets ) { 
    27             $inactive = array_merge($inactive, $widgets); 
     27            if( is_array( $widgets ) ){ 
     28                $inactive = array_merge($inactive, $widgets); 
     29            } 
     30 
    2831            $sidebars[$sidebar] = array(); 
    2932        } 
  • widget-settings-importexport/trunk/readme.txt

    r1060404 r1566725  
    33Tags: widget, import, export 
    44Requires at least: 2.8 
    5 Tested up to: 4.1 
    6 Stable tag: 1.5.0 
     5Tested up to: 4.7 
     6Stable tag: 1.5.1 
    77License: GPLv2 or later 
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html 
  • widget-settings-importexport/trunk/widget-data.php

    r1060404 r1566725  
    55  Author: Voce Communications - Kevin Langley, Sean McCafferty, Mark Parolisi 
    66  Author URI: http://vocecommunications.com 
    7   Version: 1.5.0 
     7  Version: 1.5.1 
    88 * ****************************************************************** 
    99  Copyright 2011-2011 Voce Communications 
Note: See TracChangeset for help on using the changeset viewer.