'wp_forecast_widget', 'description' => 'WP Forecast Widget'); $control_ops = array('width' => 300, 'height' => 150); $this->WP_Widget('wp-forecast', 'WP Forecast', $widget_ops, $control_ops); } function widget( $args, $instance ) { pdebug(1,"Start of function class wpf_widget::widget ()"); // get widget params from instance $title = $instance['title']; $wpfcid = $instance['wpfcid']; if (trim($wpfcid) =="") $wpfcid="A"; // pass title to show function $args['title'] = $title; if ( $wpfcid == "?") $wpf_vars=get_wpf_opts("A"); else $wpf_vars=get_wpf_opts($wpfcid); if (!empty($language_override)) { $wpf_vars['wpf_language']=$language_override; } show($wpfcid,$args,$wpf_vars); pdebug(1,"End of function class wpf_widget::widget () "); } function update( $new_instance, $old_instance ) { pdebug(1,"Start of wpf_widget::update()"); return $new_instance; pdebug(1,"End of wpf_widget::update()"); } function form( $instance ) { pdebug(1,"Start of wpf_widget::form()"); $count = wpf_get_option('wp-forecast-count'); // get translation $locale = get_locale(); if ( empty($locale) ) $locale = 'en_US'; if(function_exists('load_textdomain')) load_textdomain("wp-forecast_".$locale,ABSPATH . "wp-content/plugins/wp-forecast/lang/".$locale.".mo"); $title = esc_attr($instance['title']); $wpfcid = esc_attr($instance['wpfcid']); // code for widget title form $out = ""; $out .= '

'; // print out widget selector $out .='

"; echo $out; pdebug(1,"End of wpf_widget::form()"); } } } ?>