'address-info', 'description' => __( 'Widget with a simple address information.', 'yiw' ) ); $control_ops = array( 'id_base' => 'address-info' ); $this->WP_Widget( 'address-info', __( 'Address Info', 'yiw' ), $widget_ops, $control_ops ); } function form( $instance ) { global $yiw_icons_name; /* Impostazioni di default del widget */ $defaults = array( 'title' => __( 'Find Us', 'yiw' ), 'name' => 'Beauty & Clean', 'address' => 'Street Red 15', 'zip-code' => '0000185', 'state' => 'NY', 'city' => 'New York' ); $instance = wp_parse_args( (array) $instance, $defaults ); ?>

' . $instance['name'] . ' - ' . $instance['address'] . '
' . $instance['zip-code'] . ' ' . $instance['state'] . ' - ' . $instance['city'] . '
'; echo $text . $after_widget; } function update( $new_instance, $old_instance ) { $instance = $old_instance; $instance['title'] = strip_tags( $new_instance['title'] ); $instance['name'] = strip_tags( $new_instance['name'] ); $instance['address'] = $new_instance['address']; $instance['zip-code'] = $new_instance['zip-code']; $instance['state'] = $new_instance['state']; $instance['city'] = $new_instance['city']; return $instance; } } ?>