WordPress.org

Make WordPress Core

Changeset 6560


Ignore:
Timestamp:
01/05/2008 05:20:56 AM (12 years ago)
Author:
ryan
Message:

Fix some array warnings. Props mdawaffe. see #5583

File:
1 edited

Legend:

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

    r6556 r6560  
    637637
    638638function wp_widget_text_register() {
    639     $options = get_option('widget_text');
     639    if ( !$options = get_option('widget_text') )
     640        $options = array();
    640641    $widget_ops = array('classname' => 'widget_text', 'description' => __('Arbitrary text or HTML'));
    641642    $control_ops = array('width' => 460, 'height' => 350, 'id_base' => 'text');
     
    793794
    794795function wp_widget_categories_register() {
    795     $options = get_option( 'widget_categories' );
     796    if ( !$options = get_option( 'widget_categories' ) )
     797        $options = array();
     798
    796799    if ( isset($options['title']) )
    797800        $options = wp_widget_categories_upgrade();
     
    11581161
    11591162function wp_widget_rss_register() {
    1160     $options = get_option('widget_rss');
     1163    if ( !$options = get_option('widget_rss') )
     1164        $options = array();
    11611165    $widget_ops = array('classname' => 'widget_rss', 'description' => __( 'Entries from any RSS or Atom feed' ));
    11621166    $control_ops = array('width' => 410, 'height' => 200, 'id_base' => 'rss');
     
    13481352// Registers each instance of our widget on startup
    13491353function widget_many_register() {
    1350     $options = get_option('widget_many');
     1354    if ( !$options = get_option('widget_many') )
     1355        $options = array();
     1356
    13511357    $widget_ops = array('classname' => 'widget_many', 'description' => __('Widget which allows multiple instances'));
    13521358    $control_ops = array('width' => 400, 'height' => 350, 'id_base' => 'many');
Note: See TracChangeset for help on using the changeset viewer.