<?php 

add_action('widgets_init','weather');

function weather() {
	register_widget('weather');
	
	}

class weather extends WP_Widget {
	function weather() {
			
		$widget_ops = array('classname' => 'weather','description' => 'Widget display Weather');
		$this->WP_Widget('weather',__('( LioIT ) Weather','lioit'),$widget_ops);

		}
		
	function widget( $args, $instance ) {
		extract( $args );
		/* User-selected settings. */
		$title = apply_filters('widget_title', $instance['title'] );
		

		/* Before widget (defined by themes). */
		

		/* Title of widget (before and after defined by themes). */
		if ( $title )
			
?>
              <div class="widget weatherWidget">
                  <div class="widget-weather">
                           <?php do_action('thb_weather'); ?>
                        </div><!--End weather-->
              </div><!--End MAin Ad--->

			
<?php 
		/* After widget (defined by themes). */
		
	}
	
	function update( $new_instance, $old_instance ) {
		$instance = $old_instance;

		/* Strip tags (if needed) and update the widget settings. */
		$instance['title'] = strip_tags( $new_instance['title'] );
		

		return $instance;
	}
	
function form( $instance ) {

		/* Set up some default widget settings. */
		$defaults = array( 'title' => 'Weather', 
		
 			);
		$instance = wp_parse_args( (array) $instance, $defaults ); ?>
	
    	
		
	

        
   <?php 
}
	} //end class