WordPress.org

Make WordPress Core

Ticket #14893: 14893.patch

File 14893.patch, 919 bytes (added by hakre, 4 years ago)
  • wp-admin/widgets.php

     
    6666function retrieve_widgets() { 
    6767        global $wp_registered_widget_updates, $wp_registered_sidebars, $sidebars_widgets, $wp_registered_widgets; 
    6868 
    69         $_sidebars_widgets = array(); 
     69        $_sidebars_widgets = array( 'wp_inactive_widgets' => array() ); 
    7070        $sidebars = array_keys($wp_registered_sidebars); 
    7171 
    7272        unset( $sidebars_widgets['array_version'] ); 
     
    9090        if ( !empty($sidebars_widgets) ) { 
    9191                foreach ( $sidebars_widgets as $lost => $val ) { 
    9292                        if ( is_array($val) ) 
    93                                 $_sidebars_widgets['wp_inactive_widgets'] = array_merge( (array) $_sidebars_widgets['wp_inactive_widgets'], $val ); 
     93                                $_sidebars_widgets['wp_inactive_widgets'] = array_merge( $_sidebars_widgets['wp_inactive_widgets'], $val ); 
    9494                } 
    9595        } 
    9696