Make WordPress Core


Ignore:
Timestamp:
09/21/2008 08:41:25 PM (17 years ago)
Author:
westi
Message:

Notice fixes see #7509 props DD32 and jacobsantos.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/widgets.php

    r8912 r8944  
    6060                continue;
    6161
     62            if ( ! isset( $widget['params'][0] ) )
     63                $widget['params'][0] = array();
    6264            ob_start();
    63                 $args = wp_list_widget_controls_dynamic_sidebar( array( 0 => array( 'widget_id' => $widget['id'], 'widget_name' => $widget['name'], '_display' => 'template', '_show' => $show ), 1 => $widget['params'][0] ) );
    64                 $sidebar_args = call_user_func_array( 'wp_widget_control', $args );
     65            $args = wp_list_widget_controls_dynamic_sidebar( array( 0 => array( 'widget_id' => $widget['id'], 'widget_name' => $widget['name'], '_display' => 'template', '_show' => $show ), 1 => $widget['params'][0] ) );
     66            $sidebar_args = call_user_func_array( 'wp_widget_control', $args );
    6567            $widget_control_template = ob_get_contents();
    6668            ob_end_clean();
     
    231233
    232234    $id_format = $widget['id'];
     235
     236    if ( ! isset( $sidebar_args['_show'] ) )
     237        $sidebar_args['_show'] = '';
     238
     239    if ( ! isset( $sidebar_args['_display'] ) )
     240        $sidebar_args['_display'] = '';
     241
    233242    // We aren't showing a widget control, we're outputing a template for a mult-widget control
    234243    if ( 'all' == $sidebar_args['_show'] && 'template' == $sidebar_args['_display'] && isset($control['params'][0]['number']) ) {
Note: See TracChangeset for help on using the changeset viewer.